Skip to content

Commit cb2522c

Browse files
committed
Recents: apps scale down to thumbnails now
As a part of this change, Recents is now an activity. Known issues: * Jank: jump-cut as app icon appears suddenly after the aniamtion * Preloading recents is broken on phones without soft nav bar and on tablets * Thumbnail window from animation lingers/flashes sometimes Change-Id: Ie6f991f3c2e1e67f9ed84eb6adba9174ed957248
1 parent 257662e commit cb2522c

16 files changed

+635
-609
lines changed

packages/SystemUI/AndroidManifest.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
<uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
5454

5555
<application
56+
android:name="com.android.systemui.SystemUIApplication"
5657
android:persistent="true"
5758
android:allowClearUserData="false"
5859
android:allowBackup="false"
@@ -96,6 +97,16 @@
9697
android:excludeFromRecents="true">
9798
</activity>
9899

100+
<activity android:name=".recent.RecentsActivity"
101+
android:theme="@android:style/Theme.Holo.Wallpaper.NoTitleBar"
102+
android:excludeFromRecents="true"
103+
android:launchMode="singleInstance"
104+
android:exported="true">
105+
<intent-filter>
106+
<action android:name="com.android.systemui.TOGGLE_RECENTS" />
107+
</intent-filter>
108+
</activity>
109+
99110
<!-- started from UsbDeviceSettingsManager -->
100111
<activity android:name=".usb.UsbConfirmActivity"
101112
android:exported="true"

packages/SystemUI/res/layout-land/status_bar_recent_panel.xml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@
2626
android:layout_width="match_parent"
2727
systemui:recentItemLayout="@layout/status_bar_recent_item"
2828
>
29-
<View
30-
android:id="@+id/recents_transition_background"
31-
android:layout_height="match_parent"
32-
android:layout_width="match_parent"
33-
android:visibility="invisible" />
3429
<FrameLayout
3530
android:id="@+id/recents_bg_protect"
3631
android:background="@drawable/status_bar_recents_background"
@@ -40,12 +35,6 @@
4035
android:clipToPadding="false"
4136
android:clipChildren="false">
4237

43-
<ImageView
44-
android:id="@+id/recents_transition_placeholder_icon"
45-
android:layout_width="wrap_content"
46-
android:layout_height="wrap_content"
47-
android:visibility="invisible" />
48-
4938
<com.android.systemui.recent.RecentsHorizontalScrollView android:id="@+id/recents_container"
5039
android:layout_width="wrap_content"
5140
android:layout_height="match_parent"

packages/SystemUI/res/layout/status_bar_recent_panel.xml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,13 @@
2626
android:layout_width="match_parent"
2727
systemui:recentItemLayout="@layout/status_bar_recent_item"
2828
>
29-
<View
30-
android:id="@+id/recents_transition_background"
31-
android:layout_height="match_parent"
32-
android:layout_width="match_parent"
33-
android:visibility="invisible" />
3429
<FrameLayout
3530
android:id="@+id/recents_bg_protect"
3631
android:background="@drawable/status_bar_recents_background"
3732
android:layout_width="match_parent"
3833
android:layout_height="match_parent"
3934
android:layout_alignParentBottom="true">
4035

41-
<ImageView
42-
android:id="@+id/recents_transition_placeholder_icon"
43-
android:layout_width="wrap_content"
44-
android:layout_height="wrap_content"
45-
android:visibility="invisible" />
46-
4736
<com.android.systemui.recent.RecentsVerticalScrollView
4837
android:id="@+id/recents_container"
4938
android:layout_width="match_parent"

packages/SystemUI/res/layout/system_bar_recent_panel.xml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,6 @@
2828
android:clipChildren="false"
2929
systemui:recentItemLayout="@layout/system_bar_recent_item"
3030
>
31-
<View
32-
android:id="@+id/recents_transition_background"
33-
android:layout_height="match_parent"
34-
android:layout_width="match_parent"
35-
android:visibility="invisible" />
3631
<FrameLayout
3732
android:id="@+id/recents_bg_protect"
3833
android:background="@drawable/recents_bg_protect_tile"
@@ -42,11 +37,6 @@
4237
android:layout_marginBottom="@*android:dimen/system_bar_height"
4338
android:clipToPadding="false"
4439
android:clipChildren="false">
45-
<ImageView
46-
android:id="@+id/recents_transition_placeholder_icon"
47-
android:layout_width="wrap_content"
48-
android:layout_height="wrap_content"
49-
android:visibility="invisible" />
5040

5141
<com.android.systemui.recent.RecentsVerticalScrollView android:id="@+id/recents_container"
5242
android:layout_width="wrap_content"

packages/SystemUI/res/values/dimens.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
<!-- Size of application thumbnail -->
2929
<dimen name="status_bar_recents_thumbnail_width">164dp</dimen>
3030
<dimen name="status_bar_recents_thumbnail_height">145dp</dimen>
31+
<dimen name="status_bar_recents_thumbnail_bg_padding">4dp</dimen>
3132

3233
<!-- Size of application label text -->
3334
<dimen name="status_bar_recents_app_label_text_size">14dip</dimen>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
* Copyright (C) 2012 The Android Open Source Project
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.android.systemui;
18+
19+
import android.app.Application;
20+
21+
import com.android.systemui.recent.RecentTasksLoader;
22+
23+
public class SystemUIApplication extends Application {
24+
private RecentTasksLoader mRecentTasksLoader;
25+
26+
public RecentTasksLoader getRecentTasksLoader() {
27+
if (mRecentTasksLoader == null) {
28+
mRecentTasksLoader = new RecentTasksLoader(this);
29+
}
30+
return mRecentTasksLoader;
31+
}
32+
}

packages/SystemUI/src/com/android/systemui/recent/Choreographer.java

Lines changed: 0 additions & 191 deletions
This file was deleted.

0 commit comments

Comments
 (0)