Bubble settings: feature, notification, app
* Removed setting from developer options * Removed bubble settings from normal notifications / channels * Feature available via notification setting * Feature screen with educational gif * App level is now a tri-state choice of all / selected / none * App level bubble controls are accessible top-level in app notifications Test: make -j40 RunSettingsRoboTests ROBOTEST_FILTER="Bubble" Bug: 138116133 Change-Id: Id103e9d3717fdc9b86a916be40c43cda9c35ac34
This commit is contained in:
@@ -27,6 +27,7 @@ import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
|
||||
public class BubbleWarningDialogFragment extends InstrumentedDialogFragment {
|
||||
static final String KEY_PKG = "p";
|
||||
static final String KEY_UID = "u";
|
||||
static final String KEY_SELECTED_PREFERENCE = "pref";
|
||||
|
||||
|
||||
@Override
|
||||
@@ -34,10 +35,11 @@ public class BubbleWarningDialogFragment extends InstrumentedDialogFragment {
|
||||
return SettingsEnums.DIALOG_APP_BUBBLE_SETTINGS;
|
||||
}
|
||||
|
||||
public BubbleWarningDialogFragment setPkgInfo(String pkg, int uid) {
|
||||
public BubbleWarningDialogFragment setPkgPrefInfo(String pkg, int uid, int preference) {
|
||||
Bundle args = new Bundle();
|
||||
args.putString(KEY_PKG, pkg);
|
||||
args.putInt(KEY_UID, uid);
|
||||
args.putInt(KEY_SELECTED_PREFERENCE, preference);
|
||||
setArguments(args);
|
||||
return this;
|
||||
}
|
||||
@@ -48,6 +50,7 @@ public class BubbleWarningDialogFragment extends InstrumentedDialogFragment {
|
||||
final Bundle args = getArguments();
|
||||
final String pkg = args.getString(KEY_PKG);
|
||||
final int uid = args.getInt(KEY_UID);
|
||||
final int pref = args.getInt(KEY_SELECTED_PREFERENCE);
|
||||
|
||||
final String title =
|
||||
getResources().getString(R.string.bubbles_feature_disabled_dialog_title);
|
||||
@@ -60,7 +63,7 @@ public class BubbleWarningDialogFragment extends InstrumentedDialogFragment {
|
||||
.setPositiveButton(R.string.bubbles_feature_disabled_button_approve,
|
||||
(dialog, id) ->
|
||||
BubblePreferenceController.applyBubblesApproval(
|
||||
getContext(), pkg, uid))
|
||||
getContext(), pkg, uid, pref))
|
||||
.setNegativeButton(R.string.bubbles_feature_disabled_button_cancel,
|
||||
(dialog, id) ->
|
||||
BubblePreferenceController.revertBubblesApproval(
|
||||
|
||||
Reference in New Issue
Block a user