Merge "Installd: migrate legacy obb data when user 0 unlocks." into qt-dev

This commit is contained in:
Anton Hansson
2019-05-24 11:06:50 +00:00
committed by Android (Google) Code Review

View File

@@ -121,6 +121,24 @@ public class Installer extends SystemService {
}
}
@Override
public void onUnlockUser(int userId) {
if (userId == 0) {
if (!checkBeforeRemote()) return;
if (mInstalld == null) {
Slog.wtf(TAG, "Call to onUnlockUser prior to onStart.");
return;
}
try {
mInstalld.migrateLegacyObbData();
} catch (RemoteException re) {
Slog.wtf(TAG, "Error migrating legacy OBB data.", re);
}
}
}
private void connect() {
IBinder binder = ServiceManager.getService("installd");
if (binder != null) {