summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Nadav Bar <nadavbar@google.com> 2019-07-29 07:40:35 -0700
committer android-build-merger <android-build-merger@google.com> 2019-07-29 07:40:35 -0700
commit603cf82011febcda760aed3d1cb8640b986be07c (patch)
tree4c7c10fcf9052fbd54fcd7e6c8f8df3c702311c9
parentacf538db88e256f06b562b76f169666df549c736 (diff)
parente1fc69e1258498c3132cd321c7cf94299a88fda6 (diff)
Merge "Use per user method when writing or reading Live Caption secure setting" into qt-r1-dev am: 5191f05791
am: e1fc69e125 Change-Id: I61ae1b71336b11465633c487061f007ae8f703f9
-rw-r--r--packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java9
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 69d2e31135e8..d3862b6eed81 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;
@@ -272,14 +273,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