diff options
| author | George Zacharia <george.zcharia@gmail.com> | 2021-09-08 10:45:11 +0300 |
|---|---|---|
| committer | Semavi Ulusoy <doc.divxm@gmail.com> | 2021-09-08 23:02:16 +0300 |
| commit | 65fa0beb899034f9248fa1be12aa79960ed568c9 (patch) | |
| tree | bd7b79051a96896ef016780a42c32f7a4103db34 | |
| parent | 1b15aed155ef8cde84bca5eb226b1c2298256895 (diff) | |
overlays: VolumePlugins: SHOW_APP_VOLUME is Settings.Secure instead
and more fixes
Change-Id: I62cf4f030f5459cb92880446586b8037a711009e
7 files changed, 21 insertions, 21 deletions
diff --git a/AospPanel/src/com/android/plugin/volume/aosp/VolumeDialogImpl.java b/AospPanel/src/com/android/plugin/volume/aosp/VolumeDialogImpl.java index 4df89a5..c018507 100644 --- a/AospPanel/src/com/android/plugin/volume/aosp/VolumeDialogImpl.java +++ b/AospPanel/src/com/android/plugin/volume/aosp/VolumeDialogImpl.java @@ -395,7 +395,7 @@ public class VolumeDialogImpl extends PanelSideAware implements VolumeDialog { } void observe() { - mContext.getContentResolver().registerContentObserver(Settings.System.getUriFor(Settings.System.SHOW_APP_VOLUME), false, this, UserHandle.USER_ALL); + mContext.getContentResolver().registerContentObserver(Settings.Secure.getUriFor(Settings.Secure.SHOW_APP_VOLUME), false, this, UserHandle.USER_ALL); update(); } @@ -408,7 +408,7 @@ public class VolumeDialogImpl extends PanelSideAware implements VolumeDialog { public void update() { - mAppVolume = Settings.System.getIntForUser(mContext.getContentResolver(), Settings.System.SHOW_APP_VOLUME, 0, UserHandle.USER_CURRENT) == 1; + mAppVolume = Settings.Secure.getIntForUser(mContext.getContentResolver(), Settings.Secure.SHOW_APP_VOLUME, 0, UserHandle.USER_CURRENT) == 1; } } diff --git a/CompactPanel/src/com/android/plugin/volume/compact/VolumeDialogImpl.java b/CompactPanel/src/com/android/plugin/volume/compact/VolumeDialogImpl.java index fb25762..45f9f93 100644 --- a/CompactPanel/src/com/android/plugin/volume/compact/VolumeDialogImpl.java +++ b/CompactPanel/src/com/android/plugin/volume/compact/VolumeDialogImpl.java @@ -393,7 +393,7 @@ public class VolumeDialogImpl extends PanelSideAware implements VolumeDialog { } void observe() { - mContext.getContentResolver().registerContentObserver(Settings.System.getUriFor(Settings.System.SHOW_APP_VOLUME), false, this, UserHandle.USER_ALL); + mContext.getContentResolver().registerContentObserver(Settings.Secure.getUriFor(Settings.Secure.SHOW_APP_VOLUME), false, this, UserHandle.USER_ALL); update(); } @@ -404,7 +404,7 @@ public class VolumeDialogImpl extends PanelSideAware implements VolumeDialog { } public void update() { - mAppVolume = Settings.System.getIntForUser(mContext.getContentResolver(), Settings.System.SHOW_APP_VOLUME, 0, UserHandle.USER_CURRENT) == 1; + mAppVolume = Settings.Secure.getIntForUser(mContext.getContentResolver(), Settings.Secure.SHOW_APP_VOLUME, 0, UserHandle.USER_CURRENT) == 1; // updateRowsH(getActiveRow()); } } diff --git a/MiuiCompactPanel/src/co/potatoproject/plugin/volume/miui/VolumeDialogImpl.java b/MiuiCompactPanel/src/co/potatoproject/plugin/volume/miui/VolumeDialogImpl.java index eb8363e..4b9404e 100644 --- a/MiuiCompactPanel/src/co/potatoproject/plugin/volume/miui/VolumeDialogImpl.java +++ b/MiuiCompactPanel/src/co/potatoproject/plugin/volume/miui/VolumeDialogImpl.java @@ -390,7 +390,7 @@ public class VolumeDialogImpl extends PanelSideAware implements VolumeDialog { } void observe() { - mContext.getContentResolver().registerContentObserver(Settings.System.getUriFor(Settings.System.SHOW_APP_VOLUME), false, this, UserHandle.USER_ALL); + mContext.getContentResolver().registerContentObserver(Settings.Secure.getUriFor(Settings.Secure.SHOW_APP_VOLUME), false, this, UserHandle.USER_ALL); update(); } @@ -403,7 +403,7 @@ public class VolumeDialogImpl extends PanelSideAware implements VolumeDialog { public void update() { - mAppVolume = Settings.System.getIntForUser(mContext.getContentResolver(), Settings.System.SHOW_APP_VOLUME, 0, UserHandle.USER_CURRENT) == 1; + mAppVolume = Settings.Secure.getIntForUser(mContext.getContentResolver(), Settings.Secure.SHOW_APP_VOLUME, 0, UserHandle.USER_CURRENT) == 1; } } diff --git a/OosPanel/src/co/potatoproject/plugin/volume/oos/VolumeDialogImpl.java b/OosPanel/src/co/potatoproject/plugin/volume/oos/VolumeDialogImpl.java index ed53be2..efca717 100644 --- a/OosPanel/src/co/potatoproject/plugin/volume/oos/VolumeDialogImpl.java +++ b/OosPanel/src/co/potatoproject/plugin/volume/oos/VolumeDialogImpl.java @@ -190,7 +190,7 @@ public class VolumeDialogImpl implements VolumeDialog { private SettingsObserver settingsObserver; private boolean mExpanded; - private boolean mLeftVolumeRocker; + private boolean mVolumePanelOnLeft; private boolean mAppVolume; public VolumeDialogImpl() {} @@ -208,7 +208,7 @@ public class VolumeDialogImpl implements VolumeDialog { mShowActiveStreamOnly = showActiveStreamOnly(); mHasSeenODICaptionsTooltip = Prefs.getBoolean(sysuiContext, Prefs.Key.HAS_SEEN_ODI_CAPTIONS_TOOLTIP, false); - mLeftVolumeRocker = Settings.System.getInt(mContext.getContentResolver(), Settings.System.VOLUME_PANEL_ON_LEFT, 0) == 1; + mVolumePanelOnLeft = Settings.Secure.getInt(mContext.getContentResolver(), Settings.Secure.VOLUME_PANEL_ON_LEFT, 0) == 1; settingsObserver = new SettingsObserver(mHandler); settingsObserver.observe(); } @@ -384,7 +384,7 @@ public class VolumeDialogImpl implements VolumeDialog { } void observe() { - mContext.getContentResolver().registerContentObserver(Settings.System.getUriFor(Settings.System.SHOW_APP_VOLUME), false, this, UserHandle.USER_ALL); + mContext.getContentResolver().registerContentObserver(Settings.Secure.getUriFor(Settings.Secure.SHOW_APP_VOLUME), false, this, UserHandle.USER_ALL); update(); } @@ -397,7 +397,7 @@ public class VolumeDialogImpl implements VolumeDialog { public void update() { - mAppVolume = Settings.System.getIntForUser(mContext.getContentResolver(), Settings.System.SHOW_APP_VOLUME, 0, UserHandle.USER_CURRENT) == 1; + mAppVolume = Settings.Secure.getIntForUser(mContext.getContentResolver(), Settings.Secure.SHOW_APP_VOLUME, 0, UserHandle.USER_CURRENT) == 1; } } diff --git a/OreoPanel/src/com/android/plugin/volume/oreo/VolumeDialogImpl.java b/OreoPanel/src/com/android/plugin/volume/oreo/VolumeDialogImpl.java index c9c2b31..8fc1450 100644 --- a/OreoPanel/src/com/android/plugin/volume/oreo/VolumeDialogImpl.java +++ b/OreoPanel/src/com/android/plugin/volume/oreo/VolumeDialogImpl.java @@ -187,7 +187,7 @@ public class VolumeDialogImpl implements VolumeDialog { public void onCreate(Context sysuiContext, Context pluginContext) { mSysUIR = new SysUIR(pluginContext); mContext = pluginContext; - mSysUIContext = + mSysUIContext = new ContextThemeWrapper(sysuiContext, mSysUIR.style("qs_theme", sysuiContext)); mController = PluginDependency.get(this, VolumeDialogController.class); mKeyguard = (KeyguardManager) mContext.getSystemService(Context.KEYGUARD_SERVICE); @@ -223,7 +223,7 @@ public class VolumeDialogImpl implements VolumeDialog { private void initDialog() { mWindowManager = (WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE); - + mSysUIContext.getTheme().applyStyle(mSysUIContext.getThemeResId(), true); mSysUIContext.getTheme().rebase(); mContext.getTheme().setTo(mSysUIContext.getTheme()); @@ -337,7 +337,7 @@ public class VolumeDialogImpl implements VolumeDialog { } void observe() { - mContext.getContentResolver().registerContentObserver(Settings.System.getUriFor(Settings.System.SHOW_APP_VOLUME), false, this, UserHandle.USER_ALL); + mContext.getContentResolver().registerContentObserver(Settings.Secure.getUriFor(Settings.Secure.SHOW_APP_VOLUME), false, this, UserHandle.USER_ALL); update(); } @@ -348,11 +348,11 @@ public class VolumeDialogImpl implements VolumeDialog { } public void update() { - mAppVolume = Settings.System.getIntForUser(mContext.getContentResolver(), Settings.System.SHOW_APP_VOLUME, 0, UserHandle.USER_CURRENT) == 1; + mAppVolume = Settings.Secure.getIntForUser(mContext.getContentResolver(), Settings.Secure.SHOW_APP_VOLUME, 0, UserHandle.USER_CURRENT) == 1; // updateRowsH(getActiveRow()); } } - + private final OnComputeInternalInsetsListener mInsetsListener = internalInsetsInfo -> { internalInsetsInfo.touchableRegion.setEmpty(); internalInsetsInfo.setTouchableInsets(InternalInsetsInfo.TOUCHABLE_INSETS_REGION); diff --git a/P404Panel/src/co/potatoproject/plugin/volume/p404/VolumeDialogImpl.java b/P404Panel/src/co/potatoproject/plugin/volume/p404/VolumeDialogImpl.java index 2dce1b7..4490b16 100644 --- a/P404Panel/src/co/potatoproject/plugin/volume/p404/VolumeDialogImpl.java +++ b/P404Panel/src/co/potatoproject/plugin/volume/p404/VolumeDialogImpl.java @@ -189,7 +189,7 @@ public class VolumeDialogImpl implements VolumeDialog { private SettingsObserver settingsObserver; private boolean mExpanded; - private boolean mLeftVolumeRocker; + private boolean mVolumePanelOnLeft; private boolean mAppVolume; public VolumeDialogImpl() {} @@ -206,7 +206,7 @@ public class VolumeDialogImpl implements VolumeDialog { mAccessibilityMgr = mContext.getSystemService(AccessibilityManager.class); mShowActiveStreamOnly = showActiveStreamOnly(); mHasSeenODICaptionsTooltip = true; - mLeftVolumeRocker = Settings.System.getInt(mContext.getContentResolver(), Settings.System.VOLUME_PANEL_ON_LEFT, 0) == 1; + mVolumePanelOnLeft = Settings.Secure.getInt(mContext.getContentResolver(), Settings.Secure.VOLUME_PANEL_ON_LEFT, 0) == 1; settingsObserver = new SettingsObserver(mHandler); settingsObserver.observe(); } @@ -381,7 +381,7 @@ public class VolumeDialogImpl implements VolumeDialog { } void observe() { - mContext.getContentResolver().registerContentObserver(Settings.System.getUriFor(Settings.System.SHOW_APP_VOLUME), false, this, UserHandle.USER_ALL); + mContext.getContentResolver().registerContentObserver(Settings.Secure.getUriFor(Settings.Secure.SHOW_APP_VOLUME), false, this, UserHandle.USER_ALL); update(); } @@ -394,7 +394,7 @@ public class VolumeDialogImpl implements VolumeDialog { public void update() { - mAppVolume = Settings.System.getIntForUser(mContext.getContentResolver(), Settings.System.SHOW_APP_VOLUME, 0, UserHandle.USER_CURRENT) == 1; + mAppVolume = Settings.Secure.getIntForUser(mContext.getContentResolver(), Settings.Secure.SHOW_APP_VOLUME, 0, UserHandle.USER_CURRENT) == 1; } } diff --git a/ShapeShiftPanel/src/co/potatoproject/plugin/volume/ssos/VolumeDialogImpl.java b/ShapeShiftPanel/src/co/potatoproject/plugin/volume/ssos/VolumeDialogImpl.java index 132ce67..1e76154 100644 --- a/ShapeShiftPanel/src/co/potatoproject/plugin/volume/ssos/VolumeDialogImpl.java +++ b/ShapeShiftPanel/src/co/potatoproject/plugin/volume/ssos/VolumeDialogImpl.java @@ -192,7 +192,7 @@ public class VolumeDialogImpl implements VolumeDialog { private boolean mExpanded; - private boolean mLeftVolumeRocker; + private boolean mVolumePanelOnLeft; private View[] views; private Drawable[] defaultDrawables; @@ -212,7 +212,7 @@ public class VolumeDialogImpl implements VolumeDialog { mAccessibilityMgr = mContext.getSystemService(AccessibilityManager.class); mShowActiveStreamOnly = showActiveStreamOnly(); mHasSeenODICaptionsTooltip = true; - mLeftVolumeRocker = Settings.System.getInt(mContext.getContentResolver(), Settings.System.VOLUME_PANEL_ON_LEFT, 0) == 1; + mVolumePanelOnLeft = Settings.Secure.getInt(mContext.getContentResolver(), Settings.Secure.VOLUME_PANEL_ON_LEFT, 0) == 1; } public void init(int windowType, Callback callback) { |
