commit | 99149d59cb3d166e462eb0c52bfe752bcc470643 | [log] [tgz] |
---|---|---|
author | Jia Hao <jiahaog@users.noreply.github.com> | Tue Nov 07 07:21:23 2023 +0000 |
committer | GitHub <noreply@github.com> | Tue Nov 07 07:21:23 2023 +0000 |
tree | 74e2f4350875d6c12220778aa0e787426112803a | |
parent | 7f4d56a7f4f76c2ac60ebeb88b623ab29c4310db [diff] |
Fix ImmutableEnum lint (#47739) This was introduced in https://github.com/flutter/engine/pull/47315. Internally, this lint breaks the build with the following error: ``` shell/platform/android/io/flutter/embedding/android/KeyData.java:78: Error: DeviceType is an enum, which should be immutable, but field DeviceType.value is not final [ImmutableEnum] private long value; ~~~~~~~~~~~~~~~~~~~ ``` See also https://errorprone.info/bugpattern/ImmutableEnumChecker. Fixes: b/309552840 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
diff --git a/shell/platform/android/io/flutter/embedding/android/KeyData.java b/shell/platform/android/io/flutter/embedding/android/KeyData.java index 776372c..ef3b8eb 100644 --- a/shell/platform/android/io/flutter/embedding/android/KeyData.java +++ b/shell/platform/android/io/flutter/embedding/android/KeyData.java
@@ -75,7 +75,7 @@ kJoystick(3), kHdmi(4); - private long value; + private final long value; private DeviceType(long value) { this.value = value;