Merge "Don't allow enable/disable of tuner on lockscreen" into nyc-dev
This commit is contained in:
@@ -352,20 +352,23 @@ public class QuickStatusBarHeader extends BaseStatusBarHeader implements
|
|||||||
MetricsLogger.action(mContext,
|
MetricsLogger.action(mContext,
|
||||||
MetricsProto.MetricsEvent.ACTION_QS_EXPANDED_SETTINGS_LAUNCH);
|
MetricsProto.MetricsEvent.ACTION_QS_EXPANDED_SETTINGS_LAUNCH);
|
||||||
if (mSettingsButton.isTunerClick()) {
|
if (mSettingsButton.isTunerClick()) {
|
||||||
if (TunerService.isTunerEnabled(mContext)) {
|
mHost.startRunnableDismissingKeyguard(() -> post(() -> {
|
||||||
TunerService.showResetRequest(mContext, new Runnable() {
|
if (TunerService.isTunerEnabled(mContext)) {
|
||||||
@Override
|
TunerService.showResetRequest(mContext, () -> {
|
||||||
public void run() {
|
|
||||||
// Relaunch settings so that the tuner disappears.
|
// Relaunch settings so that the tuner disappears.
|
||||||
startSettingsActivity();
|
startSettingsActivity();
|
||||||
}
|
});
|
||||||
});
|
} else {
|
||||||
} else {
|
Toast.makeText(getContext(), R.string.tuner_toast,
|
||||||
Toast.makeText(getContext(), R.string.tuner_toast, Toast.LENGTH_LONG).show();
|
Toast.LENGTH_LONG).show();
|
||||||
TunerService.setTunerEnabled(mContext, true);
|
TunerService.setTunerEnabled(mContext, true);
|
||||||
}
|
}
|
||||||
|
startSettingsActivity();
|
||||||
|
|
||||||
|
}));
|
||||||
|
} else {
|
||||||
|
startSettingsActivity();
|
||||||
}
|
}
|
||||||
startSettingsActivity();
|
|
||||||
} else if (v == mAlarmStatus && mNextAlarm != null) {
|
} else if (v == mAlarmStatus && mNextAlarm != null) {
|
||||||
PendingIntent showIntent = mNextAlarm.getShowIntent();
|
PendingIntent showIntent = mNextAlarm.getShowIntent();
|
||||||
if (showIntent != null && showIntent.isActivity()) {
|
if (showIntent != null && showIntent.isActivity()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user