| 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.IBinder; |
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
public final class InputApplicationHandle { |
| 29 |
|
| 30 |
|
| 31 |
@SuppressWarnings("unused") |
| 32 |
private long ptr; |
| 33 |
|
| 34 |
|
| 35 |
public final @NonNull String name; |
| 36 |
|
| 37 |
|
| 38 |
public final long dispatchingTimeoutMillis; |
| 39 |
|
| 40 |
public final @NonNull IBinder token; |
| 41 |
|
| 42 |
private native void nativeDispose(); |
| 43 |
|
| 44 |
public InputApplicationHandle(@NonNull IBinder token, @NonNull String name, |
| 45 |
long dispatchingTimeoutMillis) { |
| 46 |
this.token = token; |
| 47 |
this.name = name; |
| 48 |
this.dispatchingTimeoutMillis = dispatchingTimeoutMillis; |
| 49 |
} |
| 50 |
|
| 51 |
public InputApplicationHandle(InputApplicationHandle handle) { |
| 52 |
this.token = handle.token; |
| 53 |
this.dispatchingTimeoutMillis = handle.dispatchingTimeoutMillis; |
| 54 |
this.name = handle.name; |
| 55 |
} |
| 56 |
|
| 57 |
@Override |
| 58 |
protected void finalize() throws Throwable { |
| 59 |
try { |
| 60 |
nativeDispose(); |
| 61 |
} finally { |
| 62 |
super.finalize(); |
| 63 |
} |
| 64 |
} |
| 65 |
} |