Merge "ConnectivityService: listen to USER_UNLOCKED too" into nyc-dev am: 2f4286b792
am: fc46e9e4ca * commit 'fc46e9e4caf6c0dfe0b6f905a06c2d2b132d8173': ConnectivityService: listen to USER_UNLOCKED too
This commit is contained in:
@@ -750,7 +750,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||||||
intentFilter.addAction(Intent.ACTION_USER_STOPPING);
|
intentFilter.addAction(Intent.ACTION_USER_STOPPING);
|
||||||
intentFilter.addAction(Intent.ACTION_USER_ADDED);
|
intentFilter.addAction(Intent.ACTION_USER_ADDED);
|
||||||
intentFilter.addAction(Intent.ACTION_USER_REMOVED);
|
intentFilter.addAction(Intent.ACTION_USER_REMOVED);
|
||||||
intentFilter.addAction(Intent.ACTION_USER_PRESENT);
|
intentFilter.addAction(Intent.ACTION_USER_UNLOCKED);
|
||||||
mContext.registerReceiverAsUser(
|
mContext.registerReceiverAsUser(
|
||||||
mUserIntentReceiver, UserHandle.ALL, intentFilter, null, null);
|
mUserIntentReceiver, UserHandle.ALL, intentFilter, null, null);
|
||||||
|
|
||||||
@@ -3636,7 +3636,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onUserPresent(int userId) {
|
private void onUserUnlocked(int userId) {
|
||||||
// User present may be sent because of an unlock, which might mean an unlocked keystore.
|
// User present may be sent because of an unlock, which might mean an unlocked keystore.
|
||||||
if (mUserManager.getUserInfo(userId).isPrimary() && LockdownVpnTracker.isEnabled()) {
|
if (mUserManager.getUserInfo(userId).isPrimary() && LockdownVpnTracker.isEnabled()) {
|
||||||
updateLockdownVpn();
|
updateLockdownVpn();
|
||||||
@@ -3660,8 +3660,8 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||||||
onUserAdded(userId);
|
onUserAdded(userId);
|
||||||
} else if (Intent.ACTION_USER_REMOVED.equals(action)) {
|
} else if (Intent.ACTION_USER_REMOVED.equals(action)) {
|
||||||
onUserRemoved(userId);
|
onUserRemoved(userId);
|
||||||
} else if (Intent.ACTION_USER_PRESENT.equals(action)) {
|
} else if (Intent.ACTION_USER_UNLOCKED.equals(action)) {
|
||||||
onUserPresent(userId);
|
onUserUnlocked(userId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user