Merge "Show QS data saver info dialog until enabled" am: bbef1d22ed
Change-Id: I4ec11f8d11d7cc666b0af37673f0d1f41783dde1
This commit is contained in:
@@ -70,11 +70,13 @@ public class DataSaverTile extends QSTileImpl<BooleanState> implements
|
|||||||
dialog.setTitle(com.android.internal.R.string.data_saver_enable_title);
|
dialog.setTitle(com.android.internal.R.string.data_saver_enable_title);
|
||||||
dialog.setMessage(com.android.internal.R.string.data_saver_description);
|
dialog.setMessage(com.android.internal.R.string.data_saver_description);
|
||||||
dialog.setPositiveButton(com.android.internal.R.string.data_saver_enable_button,
|
dialog.setPositiveButton(com.android.internal.R.string.data_saver_enable_button,
|
||||||
(OnClickListener) (dialogInterface, which) -> toggleDataSaver());
|
(OnClickListener) (dialogInterface, which) -> {
|
||||||
|
toggleDataSaver();
|
||||||
|
Prefs.putBoolean(mContext, Prefs.Key.QS_DATA_SAVER_DIALOG_SHOWN, true);
|
||||||
|
});
|
||||||
dialog.setNegativeButton(com.android.internal.R.string.cancel, null);
|
dialog.setNegativeButton(com.android.internal.R.string.cancel, null);
|
||||||
dialog.setShowForAllUsers(true);
|
dialog.setShowForAllUsers(true);
|
||||||
dialog.show();
|
dialog.show();
|
||||||
Prefs.putBoolean(mContext, Prefs.Key.QS_DATA_SAVER_DIALOG_SHOWN, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void toggleDataSaver() {
|
private void toggleDataSaver() {
|
||||||
|
|||||||
Reference in New Issue
Block a user