Add a missing null check
We no longer have a null settings value - instead it is a null object. This change adds a missing null check that is not changed to check against the null object. bug:28406262 Change-Id: I5a40675dd226564c0ee190d0d6f7eb2a7e4673b0
This commit is contained in:
@@ -1907,7 +1907,7 @@ public class SettingsProvider extends ContentProvider {
|
|||||||
private void ensureSecureSettingAndroidIdSetLocked(SettingsState secureSettings) {
|
private void ensureSecureSettingAndroidIdSetLocked(SettingsState secureSettings) {
|
||||||
Setting value = secureSettings.getSettingLocked(Settings.Secure.ANDROID_ID);
|
Setting value = secureSettings.getSettingLocked(Settings.Secure.ANDROID_ID);
|
||||||
|
|
||||||
if (value != null) {
|
if (value.isNull()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2300,7 +2300,7 @@ public class SettingsProvider extends ContentProvider {
|
|||||||
|
|
||||||
final Setting showNotifications = systemSecureSettings.getSettingLocked(
|
final Setting showNotifications = systemSecureSettings.getSettingLocked(
|
||||||
Settings.Secure.LOCK_SCREEN_SHOW_NOTIFICATIONS);
|
Settings.Secure.LOCK_SCREEN_SHOW_NOTIFICATIONS);
|
||||||
if (showNotifications != null) {
|
if (showNotifications.isNull()) {
|
||||||
final SettingsState secureSettings = getSecureSettingsLocked(userId);
|
final SettingsState secureSettings = getSecureSettingsLocked(userId);
|
||||||
secureSettings.insertSettingLocked(
|
secureSettings.insertSettingLocked(
|
||||||
Settings.Secure.LOCK_SCREEN_SHOW_NOTIFICATIONS,
|
Settings.Secure.LOCK_SCREEN_SHOW_NOTIFICATIONS,
|
||||||
@@ -2310,7 +2310,7 @@ public class SettingsProvider extends ContentProvider {
|
|||||||
|
|
||||||
final Setting allowPrivate = systemSecureSettings.getSettingLocked(
|
final Setting allowPrivate = systemSecureSettings.getSettingLocked(
|
||||||
Settings.Secure.LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS);
|
Settings.Secure.LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS);
|
||||||
if (allowPrivate != null) {
|
if (allowPrivate.isNull()) {
|
||||||
final SettingsState secureSettings = getSecureSettingsLocked(userId);
|
final SettingsState secureSettings = getSecureSettingsLocked(userId);
|
||||||
secureSettings.insertSettingLocked(
|
secureSettings.insertSettingLocked(
|
||||||
Settings.Secure.LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS,
|
Settings.Secure.LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS,
|
||||||
|
|||||||
Reference in New Issue
Block a user