OSDN Git Service

Fix call to equals that could never succeed.
authorIan Rogers <irogers@google.com>
Mon, 30 May 2016 22:16:30 +0000 (15:16 -0700)
committerIan Rogers <irogers@google.com>
Tue, 31 May 2016 14:22:56 +0000 (07:22 -0700)
Caught by Error Prone.
Bug: 27723540

Change-Id: I5901a3ca06e0cc85620f596cfa4178f5ad61d1a7

packages/SettingsLib/src/com/android/settingslib/RestrictedLockUtils.java

index 8e43bff..2265d42 100644 (file)
@@ -701,8 +701,8 @@ public class RestrictedLockUtils {
             if (userId != other.userId) {
                 return false;
             }
-            if ((component == null && other == null) ||
-                    (component != null && component.equals(other))) {
+            if ((component == null && other.component == null) ||
+                    (component != null && component.equals(other.component))) {
                 return true;
             }
             return false;