Loading core/java/android/app/ITaskStackListener.aidl +5 −0 Original line number Diff line number Diff line Loading @@ -185,4 +185,9 @@ oneway interface ITaskStackListener { * @param newDisplayId id of the new display. */ void onTaskDisplayChanged(int taskId, int newDisplayId); /** * Called when any additions or deletions to the recent tasks list have been made. */ void onRecentTaskListUpdated(); } core/java/android/app/TaskStackListener.java +4 −0 Original line number Diff line number Diff line Loading @@ -182,4 +182,8 @@ public abstract class TaskStackListener extends ITaskStackListener.Stub { @Override public void onTaskDisplayChanged(int taskId, int newDisplayId) throws RemoteException { } @Override public void onRecentTaskListUpdated() throws RemoteException { } } core/java/android/util/LruCache.java +2 −1 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.util; import android.annotation.UnsupportedAppUsage; import java.util.LinkedHashMap; import java.util.Map; Loading Loading @@ -260,7 +261,7 @@ public class LruCache<K, V> { * @param evicted true if the entry is being removed to make space, false * if the removal was caused by a {@link #put} or {@link #remove}. * @param newValue the new value for {@code key}, if it exists. If non-null, * this removal was caused by a {@link #put}. Otherwise it was caused by * this removal was caused by a {@link #put} or a {@link #get}. Otherwise it was caused by * an eviction or a {@link #remove}. */ protected void entryRemoved(boolean evicted, K key, V oldValue, V newValue) {} Loading packages/SystemUI/shared/src/com/android/systemui/shared/recents/model/TaskKeyCache.java +12 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,9 @@ import android.util.SparseArray; import com.android.systemui.shared.recents.model.Task.TaskKey; import java.util.ArrayList; import java.util.Collection; /** * Base class for both strong and LRU task key cache. */ Loading Loading @@ -76,6 +79,15 @@ public abstract class TaskKeyCache<V> { mKeys.remove(key.id); } /** @return {@link Collection} of {@link TaskKey} */ public Collection<TaskKey> getValues() { Collection<TaskKey> result = new ArrayList<>(mKeys.size()); for (int i = 0; i < mKeys.size(); i++) { result.add(mKeys.valueAt(i)); } return result; } /** Removes all the entries in the cache. */ public final synchronized void evictAll() { evictAllCache(); Loading packages/SystemUI/shared/src/com/android/systemui/shared/system/TaskStackChangeListener.java +5 −0 Original line number Diff line number Diff line Loading @@ -94,6 +94,11 @@ public abstract class TaskStackChangeListener { */ public void onTaskDisplayChanged(int taskId, int newDisplayId) { } /** * Called when any additions or deletions to the recent tasks list have been made. */ public void onRecentTaskListUpdated() { } /** * Checks that the current user matches the process. Since * {@link android.app.ITaskStackListener} is not multi-user aware, handlers of Loading Loading
core/java/android/app/ITaskStackListener.aidl +5 −0 Original line number Diff line number Diff line Loading @@ -185,4 +185,9 @@ oneway interface ITaskStackListener { * @param newDisplayId id of the new display. */ void onTaskDisplayChanged(int taskId, int newDisplayId); /** * Called when any additions or deletions to the recent tasks list have been made. */ void onRecentTaskListUpdated(); }
core/java/android/app/TaskStackListener.java +4 −0 Original line number Diff line number Diff line Loading @@ -182,4 +182,8 @@ public abstract class TaskStackListener extends ITaskStackListener.Stub { @Override public void onTaskDisplayChanged(int taskId, int newDisplayId) throws RemoteException { } @Override public void onRecentTaskListUpdated() throws RemoteException { } }
core/java/android/util/LruCache.java +2 −1 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.util; import android.annotation.UnsupportedAppUsage; import java.util.LinkedHashMap; import java.util.Map; Loading Loading @@ -260,7 +261,7 @@ public class LruCache<K, V> { * @param evicted true if the entry is being removed to make space, false * if the removal was caused by a {@link #put} or {@link #remove}. * @param newValue the new value for {@code key}, if it exists. If non-null, * this removal was caused by a {@link #put}. Otherwise it was caused by * this removal was caused by a {@link #put} or a {@link #get}. Otherwise it was caused by * an eviction or a {@link #remove}. */ protected void entryRemoved(boolean evicted, K key, V oldValue, V newValue) {} Loading
packages/SystemUI/shared/src/com/android/systemui/shared/recents/model/TaskKeyCache.java +12 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,9 @@ import android.util.SparseArray; import com.android.systemui.shared.recents.model.Task.TaskKey; import java.util.ArrayList; import java.util.Collection; /** * Base class for both strong and LRU task key cache. */ Loading Loading @@ -76,6 +79,15 @@ public abstract class TaskKeyCache<V> { mKeys.remove(key.id); } /** @return {@link Collection} of {@link TaskKey} */ public Collection<TaskKey> getValues() { Collection<TaskKey> result = new ArrayList<>(mKeys.size()); for (int i = 0; i < mKeys.size(); i++) { result.add(mKeys.valueAt(i)); } return result; } /** Removes all the entries in the cache. */ public final synchronized void evictAll() { evictAllCache(); Loading
packages/SystemUI/shared/src/com/android/systemui/shared/system/TaskStackChangeListener.java +5 −0 Original line number Diff line number Diff line Loading @@ -94,6 +94,11 @@ public abstract class TaskStackChangeListener { */ public void onTaskDisplayChanged(int taskId, int newDisplayId) { } /** * Called when any additions or deletions to the recent tasks list have been made. */ public void onRecentTaskListUpdated() { } /** * Checks that the current user matches the process. Since * {@link android.app.ITaskStackListener} is not multi-user aware, handlers of Loading