Merge "Fix errorprone warnings that should be errors" am: 5744d7c560
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2255054 Change-Id: I65ce6c4fdedd32ff6feb4b5e210b508aafc4e589 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -10,7 +10,7 @@ import java.util.Objects;
|
||||
* Holds packageName:userId pairs without any heavyweight fields.
|
||||
* {@see ApplicationInfo}
|
||||
*/
|
||||
class AppVpnInfo implements Comparable {
|
||||
class AppVpnInfo implements Comparable<AppVpnInfo> {
|
||||
public final int userId;
|
||||
public final String packageName;
|
||||
|
||||
@@ -20,12 +20,10 @@ class AppVpnInfo implements Comparable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(Object other) {
|
||||
AppVpnInfo that = (AppVpnInfo) other;
|
||||
|
||||
int result = packageName.compareTo(that.packageName);
|
||||
public int compareTo(AppVpnInfo other) {
|
||||
int result = packageName.compareTo(other.packageName);
|
||||
if (result == 0) {
|
||||
result = that.userId - userId;
|
||||
result = other.userId - userId;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
Reference in New Issue
Block a user