diff options
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/volume/VolumePanelComponent.java')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/volume/VolumePanelComponent.java | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumePanelComponent.java b/packages/SystemUI/src/com/android/systemui/volume/VolumePanelComponent.java index fa6ea9e..b072cab 100644 --- a/packages/SystemUI/src/com/android/systemui/volume/VolumePanelComponent.java +++ b/packages/SystemUI/src/com/android/systemui/volume/VolumePanelComponent.java @@ -17,6 +17,7 @@ package com.android.systemui.volume; import android.content.Context; +import android.content.Intent; import android.content.res.Configuration; import android.media.AudioManager; import android.media.IRemoteVolumeController; @@ -74,6 +75,12 @@ public class VolumePanelComponent implements VolumeComponent { } @Override + public void onZenPrioritySettings() { + mHandler.removeCallbacks(mStartZenPrioritySettings); + mHandler.post(mStartZenPrioritySettings); + } + + @Override public void onInteraction() { final KeyguardViewMediator kvm = mSysui.getComponent(KeyguardViewMediator.class); if (kvm != null) { @@ -126,12 +133,23 @@ public class VolumePanelComponent implements VolumeComponent { mPanel.postDismiss(0); } + private void startSettings(Intent intent) { + mSysui.getComponent(PhoneStatusBar.class).startActivityDismissingKeyguard(intent, + true /* onlyProvisioned */, true /* dismissShade */); + mPanel.postDismiss(mDismissDelay); + } + private final Runnable mStartZenSettings = new Runnable() { @Override public void run() { - mSysui.getComponent(PhoneStatusBar.class).startActivityDismissingKeyguard( - ZenModePanel.ZEN_SETTINGS, true /* onlyProvisioned */, true /* dismissShade */); - mPanel.postDismiss(mDismissDelay); + startSettings(ZenModePanel.ZEN_SETTINGS); + } + }; + + private final Runnable mStartZenPrioritySettings = new Runnable() { + @Override + public void run() { + startSettings(ZenModePanel.ZEN_PRIORITY_SETTINGS); } }; |