Fixing crash in SystemServicesProxy getting activity label (Bug. 14260718)

- Fixing issue with wrong margins due to moved activity icon

Change-Id: Ib3631dc4cf4244d44737ee95b597bd25653815c8
This commit is contained in:
Winson Chung
2014-04-23 15:19:56 -07:00
parent f74de0b6f3
commit 80693f9fb5
3 changed files with 27 additions and 15 deletions

View File

@@ -22,26 +22,26 @@
android:layout_width="match_parent"
android:layout_height="match_parent" />
<com.android.systemui.recents.views.TaskInfoView
android:id="@+id/task_view_info_pane"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="invisible"
android:background="#e6444444">
android:id="@+id/task_view_info_pane"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="invisible"
android:background="@color/recents_task_bar_default_background_color">
<Button
android:id="@+id/task_view_app_info_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
android:layout_gravity="top|center_horizontal"
android:text="@string/recents_app_info_button_label" />
android:id="@+id/task_view_app_info_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
android:layout_gravity="top|center_horizontal"
android:text="@string/recents_app_info_button_label" />
</com.android.systemui.recents.views.TaskInfoView>
<com.android.systemui.recents.views.TaskBarView
android:id="@+id/task_view_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="top|center_horizontal"
android:background="#e6444444">
android:background="@color/recents_task_bar_default_background_color">
<ImageView
android:id="@+id/application_icon"
android:layout_width="@dimen/recents_task_view_application_icon_size"
@@ -54,8 +54,8 @@
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|left"
android:layout_marginStart="@dimen/recents_task_view_application_icon_size"
android:layout_marginEnd="@dimen/recents_task_view_activity_icon_size"
android:textSize="24sp"
android:layout_marginEnd="8dp"
android:textSize="22sp"
android:textColor="#ffffffff"
android:text="@string/recents_empty_message"
android:fontFamily="sans-serif-thin"

View File

@@ -49,4 +49,14 @@
<!-- Tint color for the content on the notification overflow card. -->
<color name="keyguard_overflow_content_color">#ff666666</color>
<!-- The default recents task bar background color. -->
<color name="recents_task_bar_default_background_color">#e6444444</color>
<!-- The default recents task bar text color. -->
<color name="recents_task_bar_default_text_color">#ffffffff</color>
<!-- The recents task bar light text color to be drawn on top of dark backgrounds. -->
<color name="recents_task_bar_light_text_color">#ffffffff</color>
<!-- The recents task bar dark text color to be drawn on top of light backgrounds. -->
<color name="recents_task_bar_dark_text_color">#ff222222</color>
</resources>

View File

@@ -413,6 +413,8 @@ public class RecentsTaskLoader {
for (int i = 0; i < taskCount; i++) {
ActivityManager.RecentTaskInfo t = tasks.get(i);
ActivityInfo info = ssp.getActivityInfo(t.baseIntent.getComponent(), t.userId);
if (info == null) continue;
String activityLabel = (t.activityLabel == null ? ssp.getActivityLabel(info) :
t.activityLabel.toString());
BitmapDrawable activityIcon = null;