File tree Expand file tree Collapse file tree
core/java/com/android/internal/widget
policy/src/com/android/internal/policy/impl/keyguard Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020import com .android .internal .telephony .ITelephony ;
2121import com .google .android .collect .Lists ;
2222
23+ import android .app .ActivityManagerNative ;
2324import android .app .admin .DevicePolicyManager ;
2425import android .content .BroadcastReceiver ;
2526import android .content .ContentResolver ;
@@ -225,7 +226,11 @@ public void setCurrentUser(int userId) {
225226
226227 public int getCurrentUser () {
227228 if (Process .myUid () == Process .SYSTEM_UID ) {
228- return mCurrentUserId ;
229+ try {
230+ return ActivityManagerNative .getDefault ().getCurrentUser ().id ;
231+ } catch (RemoteException re ) {
232+ return mCurrentUserId ;
233+ }
229234 } else {
230235 throw new SecurityException ("Only the system process can get the current user" );
231236 }
Original file line number Diff line number Diff line change @@ -153,7 +153,8 @@ public boolean start() {
153153 // This must show before bind to guarantee that Face Unlock has a place to display
154154 show (SERVICE_STARTUP_VIEW_TIMEOUT );
155155 if (!mBoundToService ) {
156- Log .d (TAG , "Binding to Face Unlock service" );
156+ Log .d (TAG , "Binding to Face Unlock service for user="
157+ + mLockPatternUtils .getCurrentUser ());
157158 mContext .bindService (new Intent (IFaceLockInterface .class .getName ()),
158159 mConnection ,
159160 Context .BIND_AUTO_CREATE ,
You can’t perform that action at this time.
0 commit comments