qt-r1-bubbles-dev @ build 5835883

Test: presubmit setup on source branch

Bug: 129158983
Bug: 136034310
Bug: 137876221

Change-Id: I5ade70c2101d09eed4698ce29bd3242483ec7f8b
Merged-In: If2b813f24cf5998829fe417e32179c5e8283d308
Merged-In: I58f0287ed99a4daf3758316e4004bca05f17b0d1
This commit is contained in:
Mady Mellor
2019-08-29 15:38:40 -07:00
15 changed files with 61 additions and 67 deletions

View File

@@ -16,8 +16,6 @@
package com.android.settings.development;
import static android.provider.Settings.Secure.NOTIFICATION_BUBBLES;
import android.content.Context;
import android.provider.Settings;
@@ -42,7 +40,7 @@ public class BubbleGlobalPreferenceController extends DeveloperOptionsPreference
@Override
public String getPreferenceKey() {
return NOTIFICATION_BUBBLES;
return Settings.Global.NOTIFICATION_BUBBLES;
}
@Override
@@ -64,12 +62,12 @@ public class BubbleGlobalPreferenceController extends DeveloperOptionsPreference
}
private boolean isEnabled() {
return Settings.Secure.getInt(mContext.getContentResolver(),
NOTIFICATION_BUBBLES, OFF) == ON;
return Settings.Global.getInt(mContext.getContentResolver(),
Settings.Global.NOTIFICATION_BUBBLES, OFF) == ON;
}
private void writeSetting(boolean isEnabled) {
Settings.Secure.putInt(mContext.getContentResolver(),
NOTIFICATION_BUBBLES, isEnabled ? ON : OFF);
Settings.Global.putInt(mContext.getContentResolver(),
Settings.Global.NOTIFICATION_BUBBLES, isEnabled ? ON : OFF);
}
}

View File

@@ -16,7 +16,7 @@
package com.android.settings.notification;
import static android.provider.Settings.Secure.NOTIFICATION_BUBBLES;
import static android.provider.Settings.Global.NOTIFICATION_BUBBLES;
import android.annotation.Nullable;
import android.content.Context;
@@ -113,7 +113,7 @@ public class BubblePreferenceController extends NotificationPreferenceController
}
private boolean isGloballyEnabled() {
return Settings.Secure.getInt(mContext.getContentResolver(),
return Settings.Global.getInt(mContext.getContentResolver(),
NOTIFICATION_BUBBLES, SYSTEM_WIDE_OFF) == SYSTEM_WIDE_ON;
}
@@ -124,7 +124,7 @@ public class BubblePreferenceController extends NotificationPreferenceController
backend.setAllowBubbles(pkg, uid, false);
// changing the global settings will cause the observer on the host page to reload
// correct preference state
Settings.Secure.putInt(mContext.getContentResolver(),
Settings.Global.putInt(mContext.getContentResolver(),
NOTIFICATION_BUBBLES, SYSTEM_WIDE_OFF);
}
@@ -134,7 +134,7 @@ public class BubblePreferenceController extends NotificationPreferenceController
backend.setAllowBubbles(pkg, uid, true);
// changing the global settings will cause the observer on the host page to reload
// correct preference state
Settings.Secure.putInt(mContext.getContentResolver(),
Settings.Global.putInt(mContext.getContentResolver(),
NOTIFICATION_BUBBLES, SYSTEM_WIDE_ON);
}
}

View File

@@ -16,7 +16,7 @@
package com.android.settings.notification;
import static android.provider.Settings.Secure.NOTIFICATION_BUBBLES;
import static android.provider.Settings.Global.NOTIFICATION_BUBBLES;
import android.app.settings.SettingsEnums;
import android.content.Context;
@@ -100,7 +100,7 @@ public class BubbleSummaryPreferenceController extends NotificationPreferenceCon
}
private boolean isGloballyEnabled() {
return Settings.Secure.getInt(mContext.getContentResolver(),
return Settings.Global.getInt(mContext.getContentResolver(),
NOTIFICATION_BUBBLES, SYSTEM_WIDE_OFF) == SYSTEM_WIDE_ON;
}
}

View File

@@ -16,8 +16,6 @@
package com.android.settings.notification;
import static android.provider.Settings.Secure.NOTIFICATION_BUBBLES;
import android.content.Context;
import android.provider.Settings;

View File

@@ -47,8 +47,8 @@ public class GlobalBubblePermissionObserverMixin extends ContentObserver {
public void onStart() {
mContext.getContentResolver().registerContentObserver(
Settings.Secure.getUriFor(
Settings.Secure.NOTIFICATION_BUBBLES),
Settings.Global.getUriFor(
Settings.Global.NOTIFICATION_BUBBLES),
false /* notifyForDescendants */,
this /* observer */);
}