diff options
author | John Spurlock <jspurlock@google.com> | 2014-10-23 20:16:22 -0400 |
---|---|---|
committer | John Spurlock <jspurlock@google.com> | 2014-10-23 20:16:22 -0400 |
commit | f2565a8b487f6ded259debe33016fc2d896e8681 (patch) | |
tree | 0de81200b7cc512cf3dfce85c6111f5c71b002fc /packages/SystemUI/src/com/android/systemui/volume | |
parent | f6e297398ba23ce7d26cf2e0efaf0d8a2230fe1c (diff) | |
download | frameworks_base-f2565a8b487f6ded259debe33016fc2d896e8681.zip frameworks_base-f2565a8b487f6ded259debe33016fc2d896e8681.tar.gz frameworks_base-f2565a8b487f6ded259debe33016fc2d896e8681.tar.bz2 |
Volume: Make VolumeUI startup configurable.
Can now disable the default volume dialog in SystemUI with
a standard product overlay.
Bug: 17753150
Change-Id: I305015dbfc40cde2428fa593c89af0f4568e1b74
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/volume')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/volume/VolumeUI.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeUI.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeUI.java index 0586a83..0fe6d89 100644 --- a/packages/SystemUI/src/com/android/systemui/volume/VolumeUI.java +++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeUI.java @@ -1,7 +1,6 @@ package com.android.systemui.volume; import android.content.Context; -import android.content.Intent; import android.content.res.Configuration; import android.database.ContentObserver; import android.media.AudioManager; @@ -11,13 +10,10 @@ import android.media.session.ISessionController; import android.media.session.MediaController; import android.media.session.MediaSessionManager; import android.net.Uri; -import android.os.AsyncTask; import android.os.Handler; import android.os.RemoteException; -import android.os.UserHandle; import android.provider.Settings; import android.util.Log; -import android.view.WindowManagerGlobal; import com.android.systemui.R; import com.android.systemui.SystemUI; @@ -53,6 +49,7 @@ public class VolumeUI extends SystemUI { private final Handler mHandler = new Handler(); + private boolean mEnabled; private AudioManager mAudioManager; private MediaSessionManager mMediaSessionManager; private VolumeController mVolumeController; @@ -63,6 +60,8 @@ public class VolumeUI extends SystemUI { @Override public void start() { + mEnabled = mContext.getResources().getBoolean(R.bool.enable_volume_ui); + if (!mEnabled) return; mAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); mMediaSessionManager = (MediaSessionManager) mContext .getSystemService(Context.MEDIA_SESSION_SERVICE); @@ -84,6 +83,7 @@ public class VolumeUI extends SystemUI { @Override public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { + pw.print("mEnabled="); pw.println(mEnabled); if (mPanel != null) { mPanel.dump(fd, pw, args); } |