Merge "qt-r1-bubbles-dev @ build 5835883" into qt-qpr1-dev-plus-aosp

This commit is contained in:
Mady Mellor
2019-09-11 22:40:20 +00:00
committed by Android (Google) Code Review
11 changed files with 54 additions and 60 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 */);
}