| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
package android.view; |
| 18 |
|
| 19 |
import android.annotation.NonNull; |
| 20 |
import android.os.Parcel; |
| 21 |
import android.os.Parcelable; |
| 22 |
import android.os.RemoteException; |
| 23 |
|
| 24 |
import com.android.internal.util.DataClass; |
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
@DataClass(genToString = true) |
| 37 |
public final class InputMonitor implements Parcelable { |
| 38 |
private static final String TAG = "InputMonitor"; |
| 39 |
|
| 40 |
private static final boolean DEBUG = false; |
| 41 |
|
| 42 |
@NonNull |
| 43 |
private final InputChannel mInputChannel; |
| 44 |
@NonNull |
| 45 |
private final IInputMonitorHost mHost; |
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
public void pilferPointers() { |
| 57 |
try { |
| 58 |
mHost.pilferPointers(); |
| 59 |
} catch (RemoteException e) { |
| 60 |
e.rethrowFromSystemServer(); |
| 61 |
} |
| 62 |
} |
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
public void dispose() { |
| 72 |
mInputChannel.dispose(); |
| 73 |
try { |
| 74 |
mHost.dispose(); |
| 75 |
} catch (RemoteException e) { |
| 76 |
e.rethrowFromSystemServer(); |
| 77 |
} |
| 78 |
} |
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
@DataClass.Generated.Member |
| 96 |
public InputMonitor( |
| 97 |
@NonNull InputChannel inputChannel, |
| 98 |
@NonNull IInputMonitorHost host) { |
| 99 |
this.mInputChannel = inputChannel; |
| 100 |
com.android.internal.util.AnnotationValidations.validate( |
| 101 |
NonNull.class, null, mInputChannel); |
| 102 |
this.mHost = host; |
| 103 |
com.android.internal.util.AnnotationValidations.validate( |
| 104 |
NonNull.class, null, mHost); |
| 105 |
|
| 106 |
|
| 107 |
} |
| 108 |
|
| 109 |
@DataClass.Generated.Member |
| 110 |
public @NonNull InputChannel getInputChannel() { |
| 111 |
return mInputChannel; |
| 112 |
} |
| 113 |
|
| 114 |
@DataClass.Generated.Member |
| 115 |
public @NonNull IInputMonitorHost getHost() { |
| 116 |
return mHost; |
| 117 |
} |
| 118 |
|
| 119 |
@Override |
| 120 |
@DataClass.Generated.Member |
| 121 |
public String toString() { |
| 122 |
|
| 123 |
|
| 124 |
|
| 125 |
return "InputMonitor { " + |
| 126 |
"inputChannel = " + mInputChannel + ", " + |
| 127 |
"host = " + mHost + |
| 128 |
" }"; |
| 129 |
} |
| 130 |
|
| 131 |
@Override |
| 132 |
@DataClass.Generated.Member |
| 133 |
public void writeToParcel(@NonNull Parcel dest, int flags) { |
| 134 |
|
| 135 |
|
| 136 |
|
| 137 |
dest.writeTypedObject(mInputChannel, flags); |
| 138 |
dest.writeStrongInterface(mHost); |
| 139 |
} |
| 140 |
|
| 141 |
@Override |
| 142 |
@DataClass.Generated.Member |
| 143 |
public int describeContents() { return 0; } |
| 144 |
|
| 145 |
|
| 146 |
@SuppressWarnings({"unchecked", "RedundantCast"}) |
| 147 |
@DataClass.Generated.Member |
| 148 |
InputMonitor(@NonNull Parcel in) { |
| 149 |
|
| 150 |
|
| 151 |
|
| 152 |
InputChannel inputChannel = (InputChannel) in.readTypedObject(InputChannel.CREATOR); |
| 153 |
IInputMonitorHost host = IInputMonitorHost.Stub.asInterface(in.readStrongBinder()); |
| 154 |
|
| 155 |
this.mInputChannel = inputChannel; |
| 156 |
com.android.internal.util.AnnotationValidations.validate( |
| 157 |
NonNull.class, null, mInputChannel); |
| 158 |
this.mHost = host; |
| 159 |
com.android.internal.util.AnnotationValidations.validate( |
| 160 |
NonNull.class, null, mHost); |
| 161 |
|
| 162 |
|
| 163 |
} |
| 164 |
|
| 165 |
@DataClass.Generated.Member |
| 166 |
public static final @NonNull Parcelable.Creator<InputMonitor> CREATOR |
| 167 |
= new Parcelable.Creator<InputMonitor>() { |
| 168 |
@Override |
| 169 |
public InputMonitor[] newArray(int size) { |
| 170 |
return new InputMonitor[size]; |
| 171 |
} |
| 172 |
|
| 173 |
@Override |
| 174 |
public InputMonitor createFromParcel(@NonNull Parcel in) { |
| 175 |
return new InputMonitor(in); |
| 176 |
} |
| 177 |
}; |
| 178 |
|
| 179 |
@DataClass.Generated( |
| 180 |
time = 1637697281750L, |
| 181 |
codegenVersion = "1.0.23", |
| 182 |
sourceFile = "frameworks/base/core/java/android/view/InputMonitor.java", |
| 183 |
inputSignatures = "private static final java.lang.String TAG\nprivate static final boolean DEBUG\nprivate final @android.annotation.NonNull android.view.InputChannel mInputChannel\nprivate final @android.annotation.NonNull android.view.IInputMonitorHost mHost\npublic void pilferPointers()\npublic void dispose()\nclass InputMonitor extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genToString=true)") |
| 184 |
@Deprecated |
| 185 |
private void __metadata() {} |
| 186 |
|
| 187 |
|
| 188 |
|
| 189 |
|
| 190 |
|
| 191 |
} |