Loading core/java/android/app/ContextImpl.java +4 −3 Original line number Diff line number Diff line Loading @@ -1405,12 +1405,13 @@ class ContextImpl extends Context { public boolean bindService(Intent service, ServiceConnection conn, int flags) { warnIfCallingFromSystemProcess(); return bindService(service, conn, flags, UserHandle.getUserId(Process.myUid())); return bindServiceAsUser(service, conn, flags, Process.myUserHandle()); } /** @hide */ @Override public boolean bindService(Intent service, ServiceConnection conn, int flags, int userHandle) { public boolean bindServiceAsUser(Intent service, ServiceConnection conn, int flags, UserHandle user) { IServiceConnection sd; if (conn == null) { throw new IllegalArgumentException("connection is null"); Loading @@ -1432,7 +1433,7 @@ class ContextImpl extends Context { int res = ActivityManagerNative.getDefault().bindService( mMainThread.getApplicationThread(), getActivityToken(), service, service.resolveTypeIfNeeded(getContentResolver()), sd, flags, userHandle); sd, flags, user.getIdentifier()); if (res < 0) { throw new SecurityException( "Not allowed to bind to service " + service); Loading core/java/android/content/Context.java +1 −1 Original line number Diff line number Diff line Loading @@ -1677,7 +1677,7 @@ public abstract class Context { * argument for use by system server and other multi-user aware code. * @hide */ public boolean bindService(Intent service, ServiceConnection conn, int flags, int userHandle) { public boolean bindServiceAsUser(Intent service, ServiceConnection conn, int flags, UserHandle user) { throw new RuntimeException("Not implemented. Must override in a subclass."); } Loading core/java/android/content/ContextWrapper.java +3 −2 Original line number Diff line number Diff line Loading @@ -475,8 +475,9 @@ public class ContextWrapper extends Context { /** @hide */ @Override public boolean bindService(Intent service, ServiceConnection conn, int flags, int userHandle) { return mBase.bindService(service, conn, flags, userHandle); public boolean bindServiceAsUser(Intent service, ServiceConnection conn, int flags, UserHandle user) { return mBase.bindServiceAsUser(service, conn, flags, user); } @Override Loading policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +2 −2 Original line number Diff line number Diff line Loading @@ -3349,8 +3349,8 @@ public class PhoneWindowManager implements WindowManagerPolicy { @Override public void onServiceDisconnected(ComponentName name) {} }; if (mContext.bindService( intent, conn, Context.BIND_AUTO_CREATE, UserHandle.USER_CURRENT)) { if (mContext.bindServiceAsUser( intent, conn, Context.BIND_AUTO_CREATE, UserHandle.CURRENT)) { mScreenshotConnection = conn; mHandler.postDelayed(mScreenshotTimeout, 10000); } Loading policy/src/com/android/internal/policy/impl/keyguard/FaceUnlock.java +2 −2 Original line number Diff line number Diff line Loading @@ -128,10 +128,10 @@ public class FaceUnlock implements BiometricSensorUnlock, Handler.Callback { if (!mBoundToService) { Log.d(TAG, "Binding to Face Unlock service for user=" + mLockPatternUtils.getCurrentUser()); mContext.bindService(new Intent(IFaceLockInterface.class.getName()), mContext.bindServiceAsUser(new Intent(IFaceLockInterface.class.getName()), mConnection, Context.BIND_AUTO_CREATE, mLockPatternUtils.getCurrentUser()); new UserHandle(mLockPatternUtils.getCurrentUser())); mBoundToService = true; } else { Log.w(TAG, "Attempt to bind to Face Unlock when already bound"); Loading Loading
core/java/android/app/ContextImpl.java +4 −3 Original line number Diff line number Diff line Loading @@ -1405,12 +1405,13 @@ class ContextImpl extends Context { public boolean bindService(Intent service, ServiceConnection conn, int flags) { warnIfCallingFromSystemProcess(); return bindService(service, conn, flags, UserHandle.getUserId(Process.myUid())); return bindServiceAsUser(service, conn, flags, Process.myUserHandle()); } /** @hide */ @Override public boolean bindService(Intent service, ServiceConnection conn, int flags, int userHandle) { public boolean bindServiceAsUser(Intent service, ServiceConnection conn, int flags, UserHandle user) { IServiceConnection sd; if (conn == null) { throw new IllegalArgumentException("connection is null"); Loading @@ -1432,7 +1433,7 @@ class ContextImpl extends Context { int res = ActivityManagerNative.getDefault().bindService( mMainThread.getApplicationThread(), getActivityToken(), service, service.resolveTypeIfNeeded(getContentResolver()), sd, flags, userHandle); sd, flags, user.getIdentifier()); if (res < 0) { throw new SecurityException( "Not allowed to bind to service " + service); Loading
core/java/android/content/Context.java +1 −1 Original line number Diff line number Diff line Loading @@ -1677,7 +1677,7 @@ public abstract class Context { * argument for use by system server and other multi-user aware code. * @hide */ public boolean bindService(Intent service, ServiceConnection conn, int flags, int userHandle) { public boolean bindServiceAsUser(Intent service, ServiceConnection conn, int flags, UserHandle user) { throw new RuntimeException("Not implemented. Must override in a subclass."); } Loading
core/java/android/content/ContextWrapper.java +3 −2 Original line number Diff line number Diff line Loading @@ -475,8 +475,9 @@ public class ContextWrapper extends Context { /** @hide */ @Override public boolean bindService(Intent service, ServiceConnection conn, int flags, int userHandle) { return mBase.bindService(service, conn, flags, userHandle); public boolean bindServiceAsUser(Intent service, ServiceConnection conn, int flags, UserHandle user) { return mBase.bindServiceAsUser(service, conn, flags, user); } @Override Loading
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +2 −2 Original line number Diff line number Diff line Loading @@ -3349,8 +3349,8 @@ public class PhoneWindowManager implements WindowManagerPolicy { @Override public void onServiceDisconnected(ComponentName name) {} }; if (mContext.bindService( intent, conn, Context.BIND_AUTO_CREATE, UserHandle.USER_CURRENT)) { if (mContext.bindServiceAsUser( intent, conn, Context.BIND_AUTO_CREATE, UserHandle.CURRENT)) { mScreenshotConnection = conn; mHandler.postDelayed(mScreenshotTimeout, 10000); } Loading
policy/src/com/android/internal/policy/impl/keyguard/FaceUnlock.java +2 −2 Original line number Diff line number Diff line Loading @@ -128,10 +128,10 @@ public class FaceUnlock implements BiometricSensorUnlock, Handler.Callback { if (!mBoundToService) { Log.d(TAG, "Binding to Face Unlock service for user=" + mLockPatternUtils.getCurrentUser()); mContext.bindService(new Intent(IFaceLockInterface.class.getName()), mContext.bindServiceAsUser(new Intent(IFaceLockInterface.class.getName()), mConnection, Context.BIND_AUTO_CREATE, mLockPatternUtils.getCurrentUser()); new UserHandle(mLockPatternUtils.getCurrentUser())); mBoundToService = true; } else { Log.w(TAG, "Attempt to bind to Face Unlock when already bound"); Loading