4/ Move SystemUiProxy to its own singleton instead of routing through the model
Bug: 141886704 Change-Id: I415b9ef7b57b525407e3a341b946e3ca66125102
This commit is contained in:
1 parent
629c87283f
commit
8ff53f7e65
13 files changed
+371
-229
No files matched your search
@@ -29,12 +29,9 @@ import android.content.pm.LauncherApps;
|
||||
import android.os.Build;
|
||||
import android.os.Looper;
|
||||
import android.os.Process;
|
||||
import android.os.RemoteException;
|
||||
import android.os.UserHandle;
|
||||
import android.util.Log;
|
||||
|
||||
import com.android.launcher3.util.MainThreadInitializedObject;
|
||||
import com.android.systemui.shared.recents.ISystemUiProxy;
|
||||
import com.android.systemui.shared.recents.model.Task;
|
||||
import com.android.systemui.shared.recents.model.ThumbnailData;
|
||||
import com.android.systemui.shared.system.ActivityManagerWrapper;
|
||||
@@ -60,8 +57,6 @@ public class RecentsModel extends TaskStackChangeListener {
|
||||
private final List<TaskThumbnailChangeListener> mThumbnailChangeListeners = new ArrayList<>();
|
||||
private final Context mContext;
|
||||
|
||||
private ISystemUiProxy mSystemUiProxy;
|
||||
|
||||
private final RecentTasksList mTaskList;
|
||||
private final TaskIconCache mIconCache;
|
||||
private final TaskThumbnailCache mThumbnailCache;
|
||||
@@ -177,14 +172,6 @@ public class RecentsModel extends TaskStackChangeListener {
|
||||
mIconCache.onTaskRemoved(dummyKey);
|
||||
}
|
||||
|
||||
public void setSystemUiProxy(ISystemUiProxy systemUiProxy) {
|
||||
mSystemUiProxy = systemUiProxy;
|
||||
}
|
||||
|
||||
public ISystemUiProxy getSystemUiProxy() {
|
||||
return mSystemUiProxy;
|
||||
}
|
||||
|
||||
public void onTrimMemory(int level) {
|
||||
if (level == ComponentCallbacks2.TRIM_MEMORY_UI_HIDDEN) {
|
||||
mThumbnailCache.getHighResLoadingState().setVisible(false);
|
||||
@@ -197,16 +184,7 @@ public class RecentsModel extends TaskStackChangeListener {
|
||||
}
|
||||
|
||||
public void onOverviewShown(boolean fromHome, String tag) {
|
||||
if (mSystemUiProxy == null) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
mSystemUiProxy.onOverviewShown(fromHome);
|
||||
} catch (RemoteException e) {
|
||||
Log.w(tag,
|
||||
"Failed to notify SysUI of overview shown from " + (fromHome ? "home" : "app")
|
||||
+ ": ", e);
|
||||
}
|
||||
SystemUiProxy.INSTANCE.get(mContext).onOverviewShown(fromHome, tag);
|
||||
}
|
||||
|
||||
private void setupPackageListener() {
|
||||
|
||||
Reference in new issue
Block a user