diff options
| author | 2019-07-29 07:52:04 -0700 | |
|---|---|---|
| committer | 2019-07-29 07:52:04 -0700 | |
| commit | 2777f0df7538b58dbb66cba9d4a2c82b256bf4d7 (patch) | |
| tree | 020f5d24a67be6eaae928da3b7dcc26fff0d8fe9 | |
| parent | af0279c9914c8052be52a4f37e86f379d6396505 (diff) | |
| parent | 603cf82011febcda760aed3d1cb8640b986be07c (diff) | |
Merge "Use per user method when writing or reading Live Caption secure setting" into qt-r1-dev am: 5191f05791 am: e1fc69e125
am: 603cf82011
Change-Id: I8092d110d6358758c7c00f55e4848f7a2caca658
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java index 3f3e1e32a951..a6b5b38fd728 100644 --- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java @@ -43,6 +43,7 @@ import android.os.Looper; import android.os.Message; import android.os.RemoteException; import android.os.ServiceManager; +import android.os.UserHandle; import android.os.VibrationEffect; import android.os.Vibrator; import android.provider.Settings; @@ -275,14 +276,14 @@ public class VolumeDialogControllerImpl implements VolumeDialogController, Dumpa } public boolean areCaptionsEnabled() { - int currentValue = Settings.Secure.getInt(mContext.getContentResolver(), - Settings.Secure.ODI_CAPTIONS_ENABLED, 0); + int currentValue = Settings.Secure.getIntForUser(mContext.getContentResolver(), + Settings.Secure.ODI_CAPTIONS_ENABLED, 0, UserHandle.USER_CURRENT); return currentValue == 1; } public void setCaptionsEnabled(boolean isEnabled) { - Settings.Secure.putInt(mContext.getContentResolver(), - Settings.Secure.ODI_CAPTIONS_ENABLED, isEnabled ? 1 : 0); + Settings.Secure.putIntForUser(mContext.getContentResolver(), + Settings.Secure.ODI_CAPTIONS_ENABLED, isEnabled ? 1 : 0, UserHandle.USER_CURRENT); } @Override |