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:
Robin Lee
2016-03-02 02:00:05 +00:00
committed by android-build-merger

View File

@@ -750,7 +750,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
intentFilter.addAction(Intent.ACTION_USER_STOPPING);
intentFilter.addAction(Intent.ACTION_USER_ADDED);
intentFilter.addAction(Intent.ACTION_USER_REMOVED);
intentFilter.addAction(Intent.ACTION_USER_PRESENT);
intentFilter.addAction(Intent.ACTION_USER_UNLOCKED);
mContext.registerReceiverAsUser(
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.
if (mUserManager.getUserInfo(userId).isPrimary() && LockdownVpnTracker.isEnabled()) {
updateLockdownVpn();
@@ -3660,8 +3660,8 @@ public class ConnectivityService extends IConnectivityManager.Stub
onUserAdded(userId);
} else if (Intent.ACTION_USER_REMOVED.equals(action)) {
onUserRemoved(userId);
} else if (Intent.ACTION_USER_PRESENT.equals(action)) {
onUserPresent(userId);
} else if (Intent.ACTION_USER_UNLOCKED.equals(action)) {
onUserUnlocked(userId);
}
}
};