summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorSiarhei Vishniakou <svv@google.com>2019-10-15 15:18:55 -0700
committerSiarhei Vishniakou <svv@google.com>2019-10-15 17:27:21 -0700
commit7480ae28e4122af53515ff68b787cb6e71f6e632 (patch)
tree040cbe797263a405dceada94e6f876fd14016584 /core/java/android
parent047790a4936744ed888b24e9c689d48273bc0c55 (diff)
Remove name from InputMonitor
InputMonitor already contains an inputchannel. And inputchannel has a name. Using the latest codegen tool, toString would already properly print name because InputChannel has toString. So we don't need to duplicate this field in InputMonitor. Bug: 142581626 Test: presubmit Change-Id: I2915cdc9928ab50991539593e584173e2231c16f
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/view/InputMonitor.java57
1 files changed, 27 insertions, 30 deletions
diff --git a/core/java/android/view/InputMonitor.java b/core/java/android/view/InputMonitor.java
index 1a1d7e682f6e..ad1f201ba3c1 100644
--- a/core/java/android/view/InputMonitor.java
+++ b/core/java/android/view/InputMonitor.java
@@ -40,8 +40,6 @@ public final class InputMonitor implements Parcelable {
private static final boolean DEBUG = false;
@NonNull
- private final String mName;
- @NonNull
private final InputChannel mInputChannel;
@NonNull
private final IInputMonitorHost mHost;
@@ -81,23 +79,19 @@ public final class InputMonitor implements Parcelable {
- // Code below generated by codegen v1.0.1.
+ // Code below generated by codegen v1.0.7.
//
// DO NOT MODIFY!
+ // CHECKSTYLE:OFF Generated code
//
// To regenerate run:
// $ codegen $ANDROID_BUILD_TOP/frameworks/base/core/java/android/view/InputMonitor.java
- //
- // CHECKSTYLE:OFF Generated code
+
@DataClass.Generated.Member
public InputMonitor(
- @NonNull String name,
@NonNull InputChannel inputChannel,
@NonNull IInputMonitorHost host) {
- this.mName = name;
- com.android.internal.util.AnnotationValidations.validate(
- NonNull.class, null, mName);
this.mInputChannel = inputChannel;
com.android.internal.util.AnnotationValidations.validate(
NonNull.class, null, mInputChannel);
@@ -109,11 +103,6 @@ public final class InputMonitor implements Parcelable {
}
@DataClass.Generated.Member
- public @NonNull String getName() {
- return mName;
- }
-
- @DataClass.Generated.Member
public @NonNull InputChannel getInputChannel() {
return mInputChannel;
}
@@ -130,7 +119,6 @@ public final class InputMonitor implements Parcelable {
// String fieldNameToString() { ... }
return "InputMonitor { " +
- "name = " + mName + ", " +
"inputChannel = " + mInputChannel + ", " +
"host = " + mHost +
" }";
@@ -142,7 +130,6 @@ public final class InputMonitor implements Parcelable {
// You can override field parcelling by defining methods like:
// void parcelFieldName(Parcel dest, int flags) { ... }
- dest.writeString(mName);
dest.writeTypedObject(mInputChannel, flags);
dest.writeStrongInterface(mHost);
}
@@ -151,6 +138,26 @@ public final class InputMonitor implements Parcelable {
@DataClass.Generated.Member
public int describeContents() { return 0; }
+ /** @hide */
+ @SuppressWarnings({"unchecked", "RedundantCast"})
+ @DataClass.Generated.Member
+ /* package-private */ InputMonitor(Parcel in) {
+ // You can override field unparcelling by defining methods like:
+ // static FieldType unparcelFieldName(Parcel in) { ... }
+
+ InputChannel inputChannel = (InputChannel) in.readTypedObject(InputChannel.CREATOR);
+ IInputMonitorHost host = IInputMonitorHost.Stub.asInterface(in.readStrongBinder());
+
+ this.mInputChannel = inputChannel;
+ com.android.internal.util.AnnotationValidations.validate(
+ NonNull.class, null, mInputChannel);
+ this.mHost = host;
+ com.android.internal.util.AnnotationValidations.validate(
+ NonNull.class, null, mHost);
+
+ // onConstructed(); // You can define this method to get a callback
+ }
+
@DataClass.Generated.Member
public static final @NonNull Parcelable.Creator<InputMonitor> CREATOR
= new Parcelable.Creator<InputMonitor>() {
@@ -160,26 +167,16 @@ public final class InputMonitor implements Parcelable {
}
@Override
- @SuppressWarnings({"unchecked", "RedundantCast"})
public InputMonitor createFromParcel(Parcel in) {
- // You can override field unparcelling by defining methods like:
- // static FieldType unparcelFieldName(Parcel in) { ... }
-
- String name = in.readString();
- InputChannel inputChannel = (InputChannel) in.readTypedObject(InputChannel.CREATOR);
- IInputMonitorHost host = IInputMonitorHost.Stub.asInterface(in.readStrongBinder());
- return new InputMonitor(
- name,
- inputChannel,
- host);
+ return new InputMonitor(in);
}
};
@DataClass.Generated(
- time = 1569871940995L,
- codegenVersion = "1.0.1",
+ time = 1571177265149L,
+ codegenVersion = "1.0.7",
sourceFile = "frameworks/base/core/java/android/view/InputMonitor.java",
- inputSignatures = "private static final java.lang.String TAG\nprivate static final boolean DEBUG\nprivate final @android.annotation.NonNull java.lang.String mName\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)")
+ 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)")
@Deprecated
private void __metadata() {}