OSDN Git Service

Fix unexpected null check condition flipping.
authorSeigo Nonaka <nona@google.com>
Wed, 27 Apr 2016 07:32:44 +0000 (16:32 +0900)
committerThe Android Automerger <android-build@google.com>
Wed, 27 Apr 2016 21:46:56 +0000 (14:46 -0700)
With I5a40675dd226564c0ee190d0d6f7eb2a7e4673b0, isNull() is used for
null check but accidentally the condition is flipped.

Bug:28406262
Change-Id: I776a6c259765210a7b334a81876233b594fd25ed

packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java

index 7bea566..db720bb 100644 (file)
@@ -1907,7 +1907,7 @@ public class SettingsProvider extends ContentProvider {
         private void ensureSecureSettingAndroidIdSetLocked(SettingsState secureSettings) {
             Setting value = secureSettings.getSettingLocked(Settings.Secure.ANDROID_ID);
 
-            if (value.isNull()) {
+            if (!value.isNull()) {
                 return;
             }
 
@@ -2300,7 +2300,7 @@ public class SettingsProvider extends ContentProvider {
 
                         final Setting showNotifications = systemSecureSettings.getSettingLocked(
                                 Settings.Secure.LOCK_SCREEN_SHOW_NOTIFICATIONS);
-                        if (showNotifications.isNull()) {
+                        if (!showNotifications.isNull()) {
                             final SettingsState secureSettings = getSecureSettingsLocked(userId);
                             secureSettings.insertSettingLocked(
                                     Settings.Secure.LOCK_SCREEN_SHOW_NOTIFICATIONS,
@@ -2310,7 +2310,7 @@ public class SettingsProvider extends ContentProvider {
 
                         final Setting allowPrivate = systemSecureSettings.getSettingLocked(
                                 Settings.Secure.LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS);
-                        if (allowPrivate.isNull()) {
+                        if (!allowPrivate.isNull()) {
                             final SettingsState secureSettings = getSecureSettingsLocked(userId);
                             secureSettings.insertSettingLocked(
                                     Settings.Secure.LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS,