Loading packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java +22 −4 Original line number Original line Diff line number Diff line Loading @@ -75,6 +75,7 @@ public class RecentsPanelView extends RelativeLayout implements OnItemClickListe private RecentTasksLoader mRecentTasksLoader; private RecentTasksLoader mRecentTasksLoader; private ArrayList<TaskDescription> mRecentTaskDescriptions; private ArrayList<TaskDescription> mRecentTaskDescriptions; private Runnable mPreloadTasksRunnable; private boolean mRecentTasksDirty = true; private boolean mRecentTasksDirty = true; private TaskDescriptionAdapter mListAdapter; private TaskDescriptionAdapter mListAdapter; private int mThumbnailWidth; private int mThumbnailWidth; Loading Loading @@ -198,10 +199,16 @@ public class RecentsPanelView extends RelativeLayout implements OnItemClickListe } else { } else { if (noApps) { if (noApps) { if (DEBUG) Log.v(TAG, "Nothing to show"); if (DEBUG) Log.v(TAG, "Nothing to show"); // Need to set recent tasks to dirty so that next time we load, we // refresh the list of tasks mRecentTasksLoader.cancelLoadingThumbnails(); mRecentTasksDirty = true; return; return; } } } } } else { } else { // Need to set recent tasks to dirty so that next time we load, we // refresh the list of tasks mRecentTasksLoader.cancelLoadingThumbnails(); mRecentTasksLoader.cancelLoadingThumbnails(); mRecentTasksDirty = true; mRecentTasksDirty = true; } } Loading Loading @@ -361,6 +368,13 @@ public class RecentsPanelView extends RelativeLayout implements OnItemClickListe if (mRecentsScrim != null && mRecentsScrim.getBackground() instanceof BitmapDrawable) { if (mRecentsScrim != null && mRecentsScrim.getBackground() instanceof BitmapDrawable) { ((BitmapDrawable) mRecentsScrim.getBackground()).setTileModeY(TileMode.REPEAT); ((BitmapDrawable) mRecentsScrim.getBackground()).setTileModeY(TileMode.REPEAT); } } mPreloadTasksRunnable = new Runnable() { public void run() { setVisibility(INVISIBLE); refreshRecentTasksList(); } }; } } private void createCustomAnimations(LayoutTransition transitioner) { private void createCustomAnimations(LayoutTransition transitioner) { Loading Loading @@ -446,14 +460,18 @@ public class RecentsPanelView extends RelativeLayout implements OnItemClickListe if (!mShowing) { if (!mShowing) { int action = ev.getAction() & MotionEvent.ACTION_MASK; int action = ev.getAction() & MotionEvent.ACTION_MASK; if (action == MotionEvent.ACTION_DOWN) { if (action == MotionEvent.ACTION_DOWN) { // If we set our visibility to INVISIBLE here, we avoid an extra call to onLayout // If we set our visibility to INVISIBLE here, we avoid an extra call to // later when we become visible // onLayout later when we become visible (because onLayout is always called setVisibility(INVISIBLE); // when going from GONE) refreshRecentTasksList(); post(mPreloadTasksRunnable); } else if (action == MotionEvent.ACTION_CANCEL) { } else if (action == MotionEvent.ACTION_CANCEL) { setVisibility(GONE); setVisibility(GONE); clearRecentTasksList(); clearRecentTasksList(); // Remove the preloader if we haven't called it yet removeCallbacks(mPreloadTasksRunnable); } else if (action == MotionEvent.ACTION_UP) { } else if (action == MotionEvent.ACTION_UP) { // Remove the preloader if we haven't called it yet removeCallbacks(mPreloadTasksRunnable); if (!v.isPressed()) { if (!v.isPressed()) { setVisibility(GONE); setVisibility(GONE); clearRecentTasksList(); clearRecentTasksList(); Loading packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java +2 −3 Original line number Original line Diff line number Diff line Loading @@ -1262,9 +1262,8 @@ public class TabletStatusBar extends StatusBar implements public void onClickRecentButton() { public void onClickRecentButton() { if (DEBUG) Slog.d(TAG, "clicked recent apps; disabled=" + mDisabled); if (DEBUG) Slog.d(TAG, "clicked recent apps; disabled=" + mDisabled); if ((mDisabled & StatusBarManager.DISABLE_EXPAND) == 0) { if ((mDisabled & StatusBarManager.DISABLE_EXPAND) == 0) { int msg = (mRecentsPanel.getVisibility() == View.GONE) int msg = (mRecentsPanel.getVisibility() == View.VISIBLE) ? MSG_OPEN_RECENTS_PANEL ? MSG_CLOSE_RECENTS_PANEL : MSG_OPEN_RECENTS_PANEL; : MSG_CLOSE_RECENTS_PANEL; mHandler.removeMessages(msg); mHandler.removeMessages(msg); mHandler.sendEmptyMessage(msg); mHandler.sendEmptyMessage(msg); } } Loading Loading
packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java +22 −4 Original line number Original line Diff line number Diff line Loading @@ -75,6 +75,7 @@ public class RecentsPanelView extends RelativeLayout implements OnItemClickListe private RecentTasksLoader mRecentTasksLoader; private RecentTasksLoader mRecentTasksLoader; private ArrayList<TaskDescription> mRecentTaskDescriptions; private ArrayList<TaskDescription> mRecentTaskDescriptions; private Runnable mPreloadTasksRunnable; private boolean mRecentTasksDirty = true; private boolean mRecentTasksDirty = true; private TaskDescriptionAdapter mListAdapter; private TaskDescriptionAdapter mListAdapter; private int mThumbnailWidth; private int mThumbnailWidth; Loading Loading @@ -198,10 +199,16 @@ public class RecentsPanelView extends RelativeLayout implements OnItemClickListe } else { } else { if (noApps) { if (noApps) { if (DEBUG) Log.v(TAG, "Nothing to show"); if (DEBUG) Log.v(TAG, "Nothing to show"); // Need to set recent tasks to dirty so that next time we load, we // refresh the list of tasks mRecentTasksLoader.cancelLoadingThumbnails(); mRecentTasksDirty = true; return; return; } } } } } else { } else { // Need to set recent tasks to dirty so that next time we load, we // refresh the list of tasks mRecentTasksLoader.cancelLoadingThumbnails(); mRecentTasksLoader.cancelLoadingThumbnails(); mRecentTasksDirty = true; mRecentTasksDirty = true; } } Loading Loading @@ -361,6 +368,13 @@ public class RecentsPanelView extends RelativeLayout implements OnItemClickListe if (mRecentsScrim != null && mRecentsScrim.getBackground() instanceof BitmapDrawable) { if (mRecentsScrim != null && mRecentsScrim.getBackground() instanceof BitmapDrawable) { ((BitmapDrawable) mRecentsScrim.getBackground()).setTileModeY(TileMode.REPEAT); ((BitmapDrawable) mRecentsScrim.getBackground()).setTileModeY(TileMode.REPEAT); } } mPreloadTasksRunnable = new Runnable() { public void run() { setVisibility(INVISIBLE); refreshRecentTasksList(); } }; } } private void createCustomAnimations(LayoutTransition transitioner) { private void createCustomAnimations(LayoutTransition transitioner) { Loading Loading @@ -446,14 +460,18 @@ public class RecentsPanelView extends RelativeLayout implements OnItemClickListe if (!mShowing) { if (!mShowing) { int action = ev.getAction() & MotionEvent.ACTION_MASK; int action = ev.getAction() & MotionEvent.ACTION_MASK; if (action == MotionEvent.ACTION_DOWN) { if (action == MotionEvent.ACTION_DOWN) { // If we set our visibility to INVISIBLE here, we avoid an extra call to onLayout // If we set our visibility to INVISIBLE here, we avoid an extra call to // later when we become visible // onLayout later when we become visible (because onLayout is always called setVisibility(INVISIBLE); // when going from GONE) refreshRecentTasksList(); post(mPreloadTasksRunnable); } else if (action == MotionEvent.ACTION_CANCEL) { } else if (action == MotionEvent.ACTION_CANCEL) { setVisibility(GONE); setVisibility(GONE); clearRecentTasksList(); clearRecentTasksList(); // Remove the preloader if we haven't called it yet removeCallbacks(mPreloadTasksRunnable); } else if (action == MotionEvent.ACTION_UP) { } else if (action == MotionEvent.ACTION_UP) { // Remove the preloader if we haven't called it yet removeCallbacks(mPreloadTasksRunnable); if (!v.isPressed()) { if (!v.isPressed()) { setVisibility(GONE); setVisibility(GONE); clearRecentTasksList(); clearRecentTasksList(); Loading
packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java +2 −3 Original line number Original line Diff line number Diff line Loading @@ -1262,9 +1262,8 @@ public class TabletStatusBar extends StatusBar implements public void onClickRecentButton() { public void onClickRecentButton() { if (DEBUG) Slog.d(TAG, "clicked recent apps; disabled=" + mDisabled); if (DEBUG) Slog.d(TAG, "clicked recent apps; disabled=" + mDisabled); if ((mDisabled & StatusBarManager.DISABLE_EXPAND) == 0) { if ((mDisabled & StatusBarManager.DISABLE_EXPAND) == 0) { int msg = (mRecentsPanel.getVisibility() == View.GONE) int msg = (mRecentsPanel.getVisibility() == View.VISIBLE) ? MSG_OPEN_RECENTS_PANEL ? MSG_CLOSE_RECENTS_PANEL : MSG_OPEN_RECENTS_PANEL; : MSG_CLOSE_RECENTS_PANEL; mHandler.removeMessages(msg); mHandler.removeMessages(msg); mHandler.sendEmptyMessage(msg); mHandler.sendEmptyMessage(msg); } } Loading