Merge \"Block camera gesture during secondary user SUW\" into nyc-mr1-dev
am: e1a3a449a4
Change-Id: I92755956d3047902086945ce7479fc16bfa70b84
This commit is contained in:
@@ -33,6 +33,7 @@ import android.os.PowerManager;
|
|||||||
import android.os.PowerManager.WakeLock;
|
import android.os.PowerManager.WakeLock;
|
||||||
import android.os.SystemClock;
|
import android.os.SystemClock;
|
||||||
import android.os.SystemProperties;
|
import android.os.SystemProperties;
|
||||||
|
import android.os.UserHandle;
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
import android.util.MutableBoolean;
|
import android.util.MutableBoolean;
|
||||||
import android.util.Slog;
|
import android.util.Slog;
|
||||||
@@ -284,8 +285,8 @@ public class GestureLauncherService extends SystemService {
|
|||||||
* @return true if camera was launched, false otherwise.
|
* @return true if camera was launched, false otherwise.
|
||||||
*/
|
*/
|
||||||
private boolean handleCameraLaunchGesture(boolean useWakelock, int source) {
|
private boolean handleCameraLaunchGesture(boolean useWakelock, int source) {
|
||||||
boolean userSetupComplete = Settings.Secure.getInt(mContext.getContentResolver(),
|
boolean userSetupComplete = Settings.Secure.getIntForUser(mContext.getContentResolver(),
|
||||||
Settings.Secure.USER_SETUP_COMPLETE, 0) != 0;
|
Settings.Secure.USER_SETUP_COMPLETE, 0, UserHandle.USER_CURRENT) != 0;
|
||||||
if (!userSetupComplete) {
|
if (!userSetupComplete) {
|
||||||
if (DBG) Slog.d(TAG, String.format(
|
if (DBG) Slog.d(TAG, String.format(
|
||||||
"userSetupComplete = %s, ignoring camera launch gesture.",
|
"userSetupComplete = %s, ignoring camera launch gesture.",
|
||||||
|
|||||||
Reference in New Issue
Block a user