diff options
| author | 2016-10-05 17:49:09 +0000 | |
|---|---|---|
| committer | 2016-10-05 19:44:35 +0000 | |
| commit | 501d59dcea4e48f4abf00fbe671d17290cb1e66c (patch) | |
| tree | 689e58c6a56a7bece0959e15050ead3fcaa6a587 | |
| parent | c3eedd972dbd4f7c12428de0dc1bc86e55e13dc5 (diff) | |
Revert "Bump up preloading recents on boot up to user unlocked."
This reverts commit c3eedd972dbd4f7c12428de0dc1bc86e55e13dc5.
Bug: 31823698
Change-Id: I575c64ff19463e84ebdb2950a798a371de4cfa13
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/recents/Recents.java | 26 | ||||
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java | 6 | 
2 files changed, 3 insertions, 29 deletions
| diff --git a/packages/SystemUI/src/com/android/systemui/recents/Recents.java b/packages/SystemUI/src/com/android/systemui/recents/Recents.java index de51c939b13e..e117bfeb1364 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/Recents.java +++ b/packages/SystemUI/src/com/android/systemui/recents/Recents.java @@ -18,12 +18,10 @@ package com.android.systemui.recents;  import android.app.ActivityManager;  import android.app.UiModeManager; -import android.content.BroadcastReceiver;  import android.content.ComponentName;  import android.content.ContentResolver;  import android.content.Context;  import android.content.Intent; -import android.content.IntentFilter;  import android.content.ServiceConnection;  import android.content.pm.ActivityInfo;  import android.content.res.Configuration; @@ -98,7 +96,7 @@ public class Recents extends SystemUI      // and does not reside in the home stack.      private String mOverrideRecentsPackageName; -    private Handler mHandler = new Handler(); +    private Handler mHandler;      private RecentsImpl mImpl;      private int mDraggingInRecentsCurrentUser; @@ -164,20 +162,6 @@ public class Recents extends SystemUI          }      }; - -    private BroadcastReceiver mSystemUserUnlockedReceiver = new BroadcastReceiver() { -        @Override -        public void onReceive(Context context, Intent intent) { -            if (Intent.ACTION_USER_UNLOCKED.equals(intent.getAction())) { -                int userId = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, UserHandle.USER_NULL); -                if (userId != UserHandle.USER_NULL) { -                    mImpl.onUserUnlocked(userId); -                } -            } -        } -    }; - -      /**       * Returns the callbacks interface that non-system users can call.       */ @@ -207,7 +191,7 @@ public class Recents extends SystemUI          sSystemServicesProxy = SystemServicesProxy.getInstance(mContext);          sTaskLoader = new RecentsTaskLoader(mContext);          sConfiguration = new RecentsConfiguration(mContext); - +        mHandler = new Handler();          UiModeManager uiModeManager = (UiModeManager) mContext.                  getSystemService(Context.UI_MODE_SERVICE);          if (uiModeManager.getCurrentModeType() == Configuration.UI_MODE_TYPE_TELEVISION) { @@ -237,12 +221,6 @@ public class Recents extends SystemUI              // For the system user, initialize an instance of the interface that we can pass to the              // secondary user              mSystemToUserCallbacks = new RecentsSystemUser(mContext, mImpl); - -            // Listen for user-unlocked to kick off preloading recents -            IntentFilter filter = new IntentFilter(); -            filter.addAction(Intent.ACTION_USER_UNLOCKED); -            mContext.registerReceiverAsUser(mSystemUserUnlockedReceiver, UserHandle.SYSTEM, filter, -                    null /* permission */, null /* scheduler */);          } else {              // For the secondary user, bind to the primary user's service to get a persistent              // interface to register its implementation and to later update its state diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java index d813170f9239..2757fc4f5cc7 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java +++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java @@ -186,7 +186,7 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener          reloadResources();      } -    public void onUserUnlocked(int userId) { +    public void onBootCompleted() {          // When we start, preload the data associated with the previous recent tasks.          // We can use a new plan since the caches will be the same.          RecentsTaskLoader loader = Recents.getTaskLoader(); @@ -199,10 +199,6 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener          loader.loadTasks(mContext, plan, launchOpts);      } -    public void onBootCompleted() { -        // Do nothing -    } -      public void onConfigurationChanged() {          reloadResources();          mDummyStackView.reloadOnConfigurationChange(); |