Initializing ActivityManagerWrapper before device unlock

Bug: 134406364
Change-Id: I30339c3790efeaa60db7ea3cbae76d97474c16cc
This commit is contained in:
Sunny Goyal
2019-06-12 07:41:14 -07:00
parent c1fa3abd2e
commit a327e6a3d1
@@ -278,6 +278,7 @@ public class TouchInteractionService extends Service implements
// Everything else should be initialized in initWhenUserUnlocked() below.
mKM = getSystemService(KeyguardManager.class);
mMainChoreographer = Choreographer.getInstance();
mAM = ActivityManagerWrapper.getInstance();
if (UserManagerCompat.getInstance(this).isUserUnlocked(Process.myUserHandle())) {
initWhenUserUnlocked();
@@ -404,7 +405,6 @@ public class TouchInteractionService extends Service implements
}
private void initWhenUserUnlocked() {
mAM = ActivityManagerWrapper.getInstance();
mRecentsModel = RecentsModel.INSTANCE.get(this);
mOverviewComponentObserver = new OverviewComponentObserver(this);