Loading packages/SystemUI/res/drawable/recents_task_view_header_bg_color.xml 0 → 100644 +22 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2014 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <corners android:topLeftRadius="@dimen/recents_task_view_rounded_corners_radius" android:topRightRadius="@dimen/recents_task_view_rounded_corners_radius"/> <solid android:color="#00000000" /> </shape> No newline at end of file packages/SystemUI/res/layout/recents_task_view.xml +2 −3 Original line number Diff line number Diff line Loading @@ -17,8 +17,7 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:focusable="true" android:background="#FFffffff"> android:focusable="true"> <com.android.systemui.recents.views.TaskViewThumbnail android:id="@+id/task_view_thumbnail" android:layout_width="match_parent" Loading packages/SystemUI/res/values/config.xml +4 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,10 @@ ImageView --> <bool name="config_recents_thumbnail_image_fits_to_xy">false</bool> <!-- Whether recents should use hardware layers for its taskviews. This flag can be enabled for devices where the java drawing of round rects may be slow --> <bool name="config_recents_use_hardware_layers">false</bool> <!-- The number of app thumbnails we keep in memory --> <integer name="config_recents_max_thumbnail_count">10</integer> Loading packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java +2 −0 Original line number Diff line number Diff line Loading @@ -119,6 +119,7 @@ public class RecentsConfiguration { public int launchedToTaskId; /** Misc **/ public boolean useHardwareLayers; public int altTabKeyDelay; /** Dev options and global settings */ Loading Loading @@ -271,6 +272,7 @@ public class RecentsConfiguration { res.getInteger(R.integer.recents_nav_bar_scrim_enter_duration); // Misc useHardwareLayers = res.getBoolean(R.bool.config_recents_use_hardware_layers); altTabKeyDelay = res.getInteger(R.integer.recents_alt_tab_key_delay); } Loading packages/SystemUI/src/com/android/systemui/recents/model/RecentsTaskLoader.java +5 −9 Original line number Diff line number Diff line Loading @@ -204,7 +204,8 @@ class TaskResourceLoader implements Runnable { if (!mCancelled) { // Notify that the task data has changed final Drawable newIcon = cachedIcon; final Bitmap newThumbnail = cachedThumbnail; final Bitmap newThumbnail = cachedThumbnail == mDefaultThumbnail ? null : cachedThumbnail; mMainThreadHandler.post(new Runnable() { @Override public void run() { Loading Loading @@ -252,7 +253,6 @@ public class RecentsTaskLoader { BitmapDrawable mDefaultApplicationIcon; Bitmap mDefaultThumbnail; Bitmap mLoadingThumbnail; /** Private Constructor */ private RecentsTaskLoader(Context context) { Loading @@ -271,9 +271,6 @@ public class RecentsTaskLoader { mDefaultThumbnail = Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888); mDefaultThumbnail.setHasAlpha(false); mDefaultThumbnail.eraseColor(0xFFffffff); mLoadingThumbnail = Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888); mLoadingThumbnail.setHasAlpha(false); mLoadingThumbnail.eraseColor(0xFFffffff); mDefaultApplicationIcon = new BitmapDrawable(context.getResources(), icon); // Initialize the proxy, cache and loaders Loading Loading @@ -500,17 +497,16 @@ public class RecentsTaskLoader { // use the default assets in their place until they load boolean requiresLoad = (applicationIcon == null) || (thumbnail == null); applicationIcon = applicationIcon != null ? applicationIcon : mDefaultApplicationIcon; thumbnail = thumbnail != null ? thumbnail : mDefaultThumbnail; if (requiresLoad) { mLoadQueue.addTask(t); } t.notifyTaskDataLoaded(thumbnail, applicationIcon); t.notifyTaskDataLoaded(thumbnail == mDefaultThumbnail ? null : thumbnail, applicationIcon); } /** Releases the task resource data back into the pool. */ public void unloadTaskData(Task t) { mLoadQueue.removeTask(t); t.notifyTaskDataUnloaded(mDefaultThumbnail, mDefaultApplicationIcon); t.notifyTaskDataUnloaded(null, mDefaultApplicationIcon); } /** Completely removes the resource data from the pool. */ Loading @@ -519,7 +515,7 @@ public class RecentsTaskLoader { mThumbnailCache.remove(t.key); mApplicationIconCache.remove(t.key); if (notifyTaskDataUnloaded) { t.notifyTaskDataUnloaded(mDefaultThumbnail, mDefaultApplicationIcon); t.notifyTaskDataUnloaded(null, mDefaultApplicationIcon); } } Loading Loading
packages/SystemUI/res/drawable/recents_task_view_header_bg_color.xml 0 → 100644 +22 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2014 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <corners android:topLeftRadius="@dimen/recents_task_view_rounded_corners_radius" android:topRightRadius="@dimen/recents_task_view_rounded_corners_radius"/> <solid android:color="#00000000" /> </shape> No newline at end of file
packages/SystemUI/res/layout/recents_task_view.xml +2 −3 Original line number Diff line number Diff line Loading @@ -17,8 +17,7 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:focusable="true" android:background="#FFffffff"> android:focusable="true"> <com.android.systemui.recents.views.TaskViewThumbnail android:id="@+id/task_view_thumbnail" android:layout_width="match_parent" Loading
packages/SystemUI/res/values/config.xml +4 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,10 @@ ImageView --> <bool name="config_recents_thumbnail_image_fits_to_xy">false</bool> <!-- Whether recents should use hardware layers for its taskviews. This flag can be enabled for devices where the java drawing of round rects may be slow --> <bool name="config_recents_use_hardware_layers">false</bool> <!-- The number of app thumbnails we keep in memory --> <integer name="config_recents_max_thumbnail_count">10</integer> Loading
packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java +2 −0 Original line number Diff line number Diff line Loading @@ -119,6 +119,7 @@ public class RecentsConfiguration { public int launchedToTaskId; /** Misc **/ public boolean useHardwareLayers; public int altTabKeyDelay; /** Dev options and global settings */ Loading Loading @@ -271,6 +272,7 @@ public class RecentsConfiguration { res.getInteger(R.integer.recents_nav_bar_scrim_enter_duration); // Misc useHardwareLayers = res.getBoolean(R.bool.config_recents_use_hardware_layers); altTabKeyDelay = res.getInteger(R.integer.recents_alt_tab_key_delay); } Loading
packages/SystemUI/src/com/android/systemui/recents/model/RecentsTaskLoader.java +5 −9 Original line number Diff line number Diff line Loading @@ -204,7 +204,8 @@ class TaskResourceLoader implements Runnable { if (!mCancelled) { // Notify that the task data has changed final Drawable newIcon = cachedIcon; final Bitmap newThumbnail = cachedThumbnail; final Bitmap newThumbnail = cachedThumbnail == mDefaultThumbnail ? null : cachedThumbnail; mMainThreadHandler.post(new Runnable() { @Override public void run() { Loading Loading @@ -252,7 +253,6 @@ public class RecentsTaskLoader { BitmapDrawable mDefaultApplicationIcon; Bitmap mDefaultThumbnail; Bitmap mLoadingThumbnail; /** Private Constructor */ private RecentsTaskLoader(Context context) { Loading @@ -271,9 +271,6 @@ public class RecentsTaskLoader { mDefaultThumbnail = Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888); mDefaultThumbnail.setHasAlpha(false); mDefaultThumbnail.eraseColor(0xFFffffff); mLoadingThumbnail = Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888); mLoadingThumbnail.setHasAlpha(false); mLoadingThumbnail.eraseColor(0xFFffffff); mDefaultApplicationIcon = new BitmapDrawable(context.getResources(), icon); // Initialize the proxy, cache and loaders Loading Loading @@ -500,17 +497,16 @@ public class RecentsTaskLoader { // use the default assets in their place until they load boolean requiresLoad = (applicationIcon == null) || (thumbnail == null); applicationIcon = applicationIcon != null ? applicationIcon : mDefaultApplicationIcon; thumbnail = thumbnail != null ? thumbnail : mDefaultThumbnail; if (requiresLoad) { mLoadQueue.addTask(t); } t.notifyTaskDataLoaded(thumbnail, applicationIcon); t.notifyTaskDataLoaded(thumbnail == mDefaultThumbnail ? null : thumbnail, applicationIcon); } /** Releases the task resource data back into the pool. */ public void unloadTaskData(Task t) { mLoadQueue.removeTask(t); t.notifyTaskDataUnloaded(mDefaultThumbnail, mDefaultApplicationIcon); t.notifyTaskDataUnloaded(null, mDefaultApplicationIcon); } /** Completely removes the resource data from the pool. */ Loading @@ -519,7 +515,7 @@ public class RecentsTaskLoader { mThumbnailCache.remove(t.key); mApplicationIconCache.remove(t.key); if (notifyTaskDataUnloaded) { t.notifyTaskDataUnloaded(mDefaultThumbnail, mDefaultApplicationIcon); t.notifyTaskDataUnloaded(null, mDefaultApplicationIcon); } } Loading