Loading packages/SystemUI/src/com/android/systemui/RecentsComponent.java +0 −3 Original line number Diff line number Diff line Loading @@ -22,9 +22,6 @@ import android.view.View; public interface RecentsComponent { void showRecentApps(boolean triggeredFromAltTab, boolean fromHome); void hideRecentApps(boolean triggeredFromAltTab, boolean triggeredFromHomeKey); void toggleRecents(); void preloadRecents(); void showNextAffiliatedTask(); void showPrevAffiliatedTask(); Loading packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java +3 −3 Original line number Diff line number Diff line Loading @@ -70,7 +70,7 @@ public class PipManager implements BasePipManager { TaskStackListener mTaskStackListener = new TaskStackListener() { @Override public void onActivityPinned(String packageName, int taskId) { if (!checkCurrentUserId(false /* debug */)) { if (!checkCurrentUserId(mContext, false /* debug */)) { return; } Loading @@ -85,7 +85,7 @@ public class PipManager implements BasePipManager { @Override public void onActivityUnpinned() { if (!checkCurrentUserId(false /* debug */)) { if (!checkCurrentUserId(mContext, false /* debug */)) { return; } Loading Loading @@ -114,7 +114,7 @@ public class PipManager implements BasePipManager { @Override public void onPinnedActivityRestartAttempt(boolean clearedTask) { if (!checkCurrentUserId(false /* debug */)) { if (!checkCurrentUserId(mContext, false /* debug */)) { return; } Loading packages/SystemUI/src/com/android/systemui/pip/tv/PipManager.java +4 −4 Original line number Diff line number Diff line Loading @@ -577,7 +577,7 @@ public class PipManager implements BasePipManager { @Override public void onTaskStackChanged() { if (DEBUG) Log.d(TAG, "onTaskStackChanged()"); if (!checkCurrentUserId(DEBUG)) { if (!checkCurrentUserId(mContext, DEBUG)) { return; } if (getState() != STATE_NO_PIP) { Loading Loading @@ -614,7 +614,7 @@ public class PipManager implements BasePipManager { @Override public void onActivityPinned(String packageName, int taskId) { if (DEBUG) Log.d(TAG, "onActivityPinned()"); if (!checkCurrentUserId(DEBUG)) { if (!checkCurrentUserId(mContext, DEBUG)) { return; } StackInfo stackInfo = getPinnedStackInfo(); Loading @@ -641,7 +641,7 @@ public class PipManager implements BasePipManager { @Override public void onPinnedActivityRestartAttempt(boolean clearedTask) { if (DEBUG) Log.d(TAG, "onPinnedActivityRestartAttempt()"); if (!checkCurrentUserId(DEBUG)) { if (!checkCurrentUserId(mContext, DEBUG)) { return; } // If PIPed activity is launched again by Launcher or intent, make it fullscreen. Loading @@ -651,7 +651,7 @@ public class PipManager implements BasePipManager { @Override public void onPinnedStackAnimationEnded() { if (DEBUG) Log.d(TAG, "onPinnedStackAnimationEnded()"); if (!checkCurrentUserId(DEBUG)) { if (!checkCurrentUserId(mContext, DEBUG)) { return; } switch (getState()) { Loading packages/SystemUI/src/com/android/systemui/recents/Recents.java +10 −11 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ package com.android.systemui.recents; import static com.android.systemui.statusbar.phone.StatusBar.SYSTEM_DIALOG_REASON_RECENT_APPS; import android.app.ActivityManager; import android.app.UiModeManager; import android.content.ComponentName; import android.content.ContentResolver; import android.content.Context; Loading @@ -33,7 +32,6 @@ import android.hardware.display.DisplayManager; import android.os.Build; import android.os.Handler; import android.os.IBinder; import android.os.Looper; import android.os.RemoteException; import android.os.SystemProperties; import android.os.UserHandle; Loading @@ -41,7 +39,6 @@ import android.provider.Settings; import android.util.EventLog; import android.util.Log; import android.view.Display; import android.view.WindowManager; import android.widget.Toast; import com.android.internal.logging.MetricsLogger; Loading @@ -60,11 +57,12 @@ import com.android.systemui.recents.events.component.ScreenPinningRequestEvent; import com.android.systemui.recents.events.component.ShowUserToastEvent; import com.android.systemui.recents.events.ui.RecentsDrawnEvent; import com.android.systemui.recents.misc.SystemServicesProxy; import com.android.systemui.recents.model.HighResThumbnailLoader; import com.android.systemui.recents.model.RecentsTaskLoader; import com.android.systemui.stackdivider.Divider; import com.android.systemui.statusbar.CommandQueue; import java.io.FileDescriptor; import java.io.PrintWriter; import java.util.ArrayList; import java.util.HashSet; import java.util.Set; Loading Loading @@ -322,16 +320,11 @@ public class Recents extends SystemUI } } @Override public void toggleRecentApps() { toggleRecents(); } /** * Toggles the Recents activity. */ @Override public void toggleRecents() { public void toggleRecentApps() { // Ensure the device has been provisioned before allowing the user to interact with // recents if (!isUserSetup()) { Loading Loading @@ -368,7 +361,7 @@ public class Recents extends SystemUI * Preloads info for the Recents activity. */ @Override public void preloadRecents() { public void preloadRecentApps() { // Ensure the device has been provisioned before allowing the user to interact with // recents if (!isUserSetup()) { Loading Loading @@ -792,4 +785,10 @@ public class Recents extends SystemUI } return false; } @Override public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { pw.println("Recents"); pw.println(" currentUserId=" + SystemServicesProxy.getInstance(mContext).getCurrentUser()); } } packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java +46 −22 Original line number Diff line number Diff line Loading @@ -119,6 +119,11 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener @Override public void onTaskStackChangedBackground() { // Check this is for the right user if (!checkCurrentUserId(mContext, false /* debug */)) { return; } // Preloads the next task RecentsConfiguration config = Recents.getConfiguration(); if (config.svelteLevel == RecentsConfiguration.SVELTE_NONE) { Loading Loading @@ -161,6 +166,11 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener @Override public void onActivityPinned(String packageName, int taskId) { // Check this is for the right user if (!checkCurrentUserId(mContext, false /* debug */)) { return; } // This time needs to be fetched the same way the last active time is fetched in // {@link TaskRecord#touchActiveTime} Recents.getConfiguration().getLaunchState().launchedFromPipApp = true; Loading @@ -172,12 +182,22 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener @Override public void onActivityUnpinned() { // Check this is for the right user if (!checkCurrentUserId(mContext, false /* debug */)) { return; } EventBus.getDefault().send(new ActivityUnpinnedEvent()); sLastPipTime = -1; } @Override public void onTaskSnapshotChanged(int taskId, TaskSnapshot snapshot) { // Check this is for the right user if (!checkCurrentUserId(mContext, false /* debug */)) { return; } EventBus.getDefault().send(new TaskSnapshotChangedEvent(taskId, snapshot)); } } Loading Loading @@ -413,7 +433,9 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener public void preloadRecents() { // Preload only the raw task list into a new load plan (which will be consumed by the // RecentsActivity) only if there is a task to animate to. // RecentsActivity) only if there is a task to animate to. Post this to ensure that we // don't block the touch feedback on the nav bar button which triggers this. mHandler.post(() -> { SystemServicesProxy ssp = Recents.getSystemServices(); MutableBoolean isHomeStackVisible = new MutableBoolean(true); if (!ssp.isRecentsActivityVisible(isHomeStackVisible)) { Loading @@ -427,16 +449,18 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener loader.preloadTasks(sInstanceLoadPlan, runningTask.id, !isHomeStackVisible.value); TaskStack stack = sInstanceLoadPlan.getTaskStack(); if (stack.getTaskCount() > 0) { // Only preload the icon (but not the thumbnail since it may not have been taken for // the pausing activity) // Only preload the icon (but not the thumbnail since it may not have been taken // for the pausing activity) preloadIcon(runningTask.id); // At this point, we don't know anything about the stack state. So only calculate // the dimensions of the thumbnail that we need for the transition into Recents, but // do not draw it until we construct the activity options when we start Recents // At this point, we don't know anything about the stack state. So only // calculate the dimensions of the thumbnail that we need for the transition // into Recents, but do not draw it until we construct the activity options when // we start Recents updateHeaderBarLayout(stack, null /* window rect override*/); } } }); } public void cancelPreloadingRecents() { Loading Loading
packages/SystemUI/src/com/android/systemui/RecentsComponent.java +0 −3 Original line number Diff line number Diff line Loading @@ -22,9 +22,6 @@ import android.view.View; public interface RecentsComponent { void showRecentApps(boolean triggeredFromAltTab, boolean fromHome); void hideRecentApps(boolean triggeredFromAltTab, boolean triggeredFromHomeKey); void toggleRecents(); void preloadRecents(); void showNextAffiliatedTask(); void showPrevAffiliatedTask(); Loading
packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java +3 −3 Original line number Diff line number Diff line Loading @@ -70,7 +70,7 @@ public class PipManager implements BasePipManager { TaskStackListener mTaskStackListener = new TaskStackListener() { @Override public void onActivityPinned(String packageName, int taskId) { if (!checkCurrentUserId(false /* debug */)) { if (!checkCurrentUserId(mContext, false /* debug */)) { return; } Loading @@ -85,7 +85,7 @@ public class PipManager implements BasePipManager { @Override public void onActivityUnpinned() { if (!checkCurrentUserId(false /* debug */)) { if (!checkCurrentUserId(mContext, false /* debug */)) { return; } Loading Loading @@ -114,7 +114,7 @@ public class PipManager implements BasePipManager { @Override public void onPinnedActivityRestartAttempt(boolean clearedTask) { if (!checkCurrentUserId(false /* debug */)) { if (!checkCurrentUserId(mContext, false /* debug */)) { return; } Loading
packages/SystemUI/src/com/android/systemui/pip/tv/PipManager.java +4 −4 Original line number Diff line number Diff line Loading @@ -577,7 +577,7 @@ public class PipManager implements BasePipManager { @Override public void onTaskStackChanged() { if (DEBUG) Log.d(TAG, "onTaskStackChanged()"); if (!checkCurrentUserId(DEBUG)) { if (!checkCurrentUserId(mContext, DEBUG)) { return; } if (getState() != STATE_NO_PIP) { Loading Loading @@ -614,7 +614,7 @@ public class PipManager implements BasePipManager { @Override public void onActivityPinned(String packageName, int taskId) { if (DEBUG) Log.d(TAG, "onActivityPinned()"); if (!checkCurrentUserId(DEBUG)) { if (!checkCurrentUserId(mContext, DEBUG)) { return; } StackInfo stackInfo = getPinnedStackInfo(); Loading @@ -641,7 +641,7 @@ public class PipManager implements BasePipManager { @Override public void onPinnedActivityRestartAttempt(boolean clearedTask) { if (DEBUG) Log.d(TAG, "onPinnedActivityRestartAttempt()"); if (!checkCurrentUserId(DEBUG)) { if (!checkCurrentUserId(mContext, DEBUG)) { return; } // If PIPed activity is launched again by Launcher or intent, make it fullscreen. Loading @@ -651,7 +651,7 @@ public class PipManager implements BasePipManager { @Override public void onPinnedStackAnimationEnded() { if (DEBUG) Log.d(TAG, "onPinnedStackAnimationEnded()"); if (!checkCurrentUserId(DEBUG)) { if (!checkCurrentUserId(mContext, DEBUG)) { return; } switch (getState()) { Loading
packages/SystemUI/src/com/android/systemui/recents/Recents.java +10 −11 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ package com.android.systemui.recents; import static com.android.systemui.statusbar.phone.StatusBar.SYSTEM_DIALOG_REASON_RECENT_APPS; import android.app.ActivityManager; import android.app.UiModeManager; import android.content.ComponentName; import android.content.ContentResolver; import android.content.Context; Loading @@ -33,7 +32,6 @@ import android.hardware.display.DisplayManager; import android.os.Build; import android.os.Handler; import android.os.IBinder; import android.os.Looper; import android.os.RemoteException; import android.os.SystemProperties; import android.os.UserHandle; Loading @@ -41,7 +39,6 @@ import android.provider.Settings; import android.util.EventLog; import android.util.Log; import android.view.Display; import android.view.WindowManager; import android.widget.Toast; import com.android.internal.logging.MetricsLogger; Loading @@ -60,11 +57,12 @@ import com.android.systemui.recents.events.component.ScreenPinningRequestEvent; import com.android.systemui.recents.events.component.ShowUserToastEvent; import com.android.systemui.recents.events.ui.RecentsDrawnEvent; import com.android.systemui.recents.misc.SystemServicesProxy; import com.android.systemui.recents.model.HighResThumbnailLoader; import com.android.systemui.recents.model.RecentsTaskLoader; import com.android.systemui.stackdivider.Divider; import com.android.systemui.statusbar.CommandQueue; import java.io.FileDescriptor; import java.io.PrintWriter; import java.util.ArrayList; import java.util.HashSet; import java.util.Set; Loading Loading @@ -322,16 +320,11 @@ public class Recents extends SystemUI } } @Override public void toggleRecentApps() { toggleRecents(); } /** * Toggles the Recents activity. */ @Override public void toggleRecents() { public void toggleRecentApps() { // Ensure the device has been provisioned before allowing the user to interact with // recents if (!isUserSetup()) { Loading Loading @@ -368,7 +361,7 @@ public class Recents extends SystemUI * Preloads info for the Recents activity. */ @Override public void preloadRecents() { public void preloadRecentApps() { // Ensure the device has been provisioned before allowing the user to interact with // recents if (!isUserSetup()) { Loading Loading @@ -792,4 +785,10 @@ public class Recents extends SystemUI } return false; } @Override public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { pw.println("Recents"); pw.println(" currentUserId=" + SystemServicesProxy.getInstance(mContext).getCurrentUser()); } }
packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java +46 −22 Original line number Diff line number Diff line Loading @@ -119,6 +119,11 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener @Override public void onTaskStackChangedBackground() { // Check this is for the right user if (!checkCurrentUserId(mContext, false /* debug */)) { return; } // Preloads the next task RecentsConfiguration config = Recents.getConfiguration(); if (config.svelteLevel == RecentsConfiguration.SVELTE_NONE) { Loading Loading @@ -161,6 +166,11 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener @Override public void onActivityPinned(String packageName, int taskId) { // Check this is for the right user if (!checkCurrentUserId(mContext, false /* debug */)) { return; } // This time needs to be fetched the same way the last active time is fetched in // {@link TaskRecord#touchActiveTime} Recents.getConfiguration().getLaunchState().launchedFromPipApp = true; Loading @@ -172,12 +182,22 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener @Override public void onActivityUnpinned() { // Check this is for the right user if (!checkCurrentUserId(mContext, false /* debug */)) { return; } EventBus.getDefault().send(new ActivityUnpinnedEvent()); sLastPipTime = -1; } @Override public void onTaskSnapshotChanged(int taskId, TaskSnapshot snapshot) { // Check this is for the right user if (!checkCurrentUserId(mContext, false /* debug */)) { return; } EventBus.getDefault().send(new TaskSnapshotChangedEvent(taskId, snapshot)); } } Loading Loading @@ -413,7 +433,9 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener public void preloadRecents() { // Preload only the raw task list into a new load plan (which will be consumed by the // RecentsActivity) only if there is a task to animate to. // RecentsActivity) only if there is a task to animate to. Post this to ensure that we // don't block the touch feedback on the nav bar button which triggers this. mHandler.post(() -> { SystemServicesProxy ssp = Recents.getSystemServices(); MutableBoolean isHomeStackVisible = new MutableBoolean(true); if (!ssp.isRecentsActivityVisible(isHomeStackVisible)) { Loading @@ -427,16 +449,18 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener loader.preloadTasks(sInstanceLoadPlan, runningTask.id, !isHomeStackVisible.value); TaskStack stack = sInstanceLoadPlan.getTaskStack(); if (stack.getTaskCount() > 0) { // Only preload the icon (but not the thumbnail since it may not have been taken for // the pausing activity) // Only preload the icon (but not the thumbnail since it may not have been taken // for the pausing activity) preloadIcon(runningTask.id); // At this point, we don't know anything about the stack state. So only calculate // the dimensions of the thumbnail that we need for the transition into Recents, but // do not draw it until we construct the activity options when we start Recents // At this point, we don't know anything about the stack state. So only // calculate the dimensions of the thumbnail that we need for the transition // into Recents, but do not draw it until we construct the activity options when // we start Recents updateHeaderBarLayout(stack, null /* window rect override*/); } } }); } public void cancelPreloadingRecents() { Loading