From 013cfc1116e3382981aa0da903d97fc4fdb2c791 Mon Sep 17 00:00:00 2001 From: Joe Onorato Date: Wed, 8 Sep 2010 15:23:18 -0400 Subject: [PATCH] move recent apps around, attempting to make it not crash. I think the problem is some kind of Context mismatch because the resource was in the framework but referencing an app class. Change-Id: Ia6b37c9c8be5dddc836331859e779cd80dd32596 --- core/res/res/values/strings.xml | 10 ++++++++-- packages/SystemUI/AndroidManifest.xml | 2 +- .../SystemUI}/res/layout/recent_apps_activity.xml | 8 ++++---- packages/SystemUI/res/values/strings.xml | 13 +++++++++++++ .../RecentApplicationsActivity.java | 5 +++-- .../RecentApplicationsCarouselView.java | 2 +- .../statusbar/tablet/TabletStatusBarService.java | 1 + 7 files changed, 31 insertions(+), 10 deletions(-) rename {core/res => packages/SystemUI}/res/layout/recent_apps_activity.xml (87%) rename packages/SystemUI/src/com/android/systemui/{statusbar => recent}/RecentApplicationsActivity.java (99%) rename packages/SystemUI/src/com/android/systemui/{statusbar => recent}/RecentApplicationsCarouselView.java (96%) diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml index e9d799b24c210..1981ac0901b42 100644 --- a/core/res/res/values/strings.xml +++ b/core/res/res/values/strings.xml @@ -283,9 +283,15 @@ Your phone will shut down. - + Recent - + No recent applications. diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml index c81da70fb0ead..f1f31cf5d6d83 100644 --- a/packages/SystemUI/AndroidManifest.xml +++ b/packages/SystemUI/AndroidManifest.xml @@ -29,7 +29,7 @@ android:excludeFromRecents="true"> - diff --git a/core/res/res/layout/recent_apps_activity.xml b/packages/SystemUI/res/layout/recent_apps_activity.xml similarity index 87% rename from core/res/res/layout/recent_apps_activity.xml rename to packages/SystemUI/res/layout/recent_apps_activity.xml index 45a200e3fca6a..ec661e8aa319f 100644 --- a/core/res/res/layout/recent_apps_activity.xml +++ b/packages/SystemUI/res/layout/recent_apps_activity.xml @@ -32,7 +32,7 @@ android:textColor="#80FFFFFF" android:textStyle="bold" android:singleLine="true" - android:text="@android:string/recent_tasks_title" + android:text="@string/recent_tasks_title" android:visibility="gone"/> @@ -42,14 +42,14 @@ android:layout_height="wrap_content" android:layout_gravity="center" android:textAppearance="?android:attr/textAppearanceSmall" - android:text="@android:string/no_recent_tasks" + android:text="@string/recent_tasks_empty" android:visibility="gone"/> - - + diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml index 2df3b6d518589..037dc4af1c3d0 100644 --- a/packages/SystemUI/res/values/strings.xml +++ b/packages/SystemUI/res/values/strings.xml @@ -54,4 +54,17 @@ Settings + + + Recent + + No recent applications. + + diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/RecentApplicationsActivity.java b/packages/SystemUI/src/com/android/systemui/recent/RecentApplicationsActivity.java similarity index 99% rename from packages/SystemUI/src/com/android/systemui/statusbar/RecentApplicationsActivity.java rename to packages/SystemUI/src/com/android/systemui/recent/RecentApplicationsActivity.java index 6e5d241dee137..6838dda871e28 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/RecentApplicationsActivity.java +++ b/packages/SystemUI/src/com/android/systemui/recent/RecentApplicationsActivity.java @@ -15,11 +15,12 @@ */ -package com.android.systemui.statusbar; +package com.android.systemui.recent; + +import com.android.systemui.R; import com.android.ex.carousel.CarouselView; import com.android.ex.carousel.CarouselRS.CarouselCallback; -import com.android.internal.R; import java.util.ArrayList; import java.util.List; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/RecentApplicationsCarouselView.java b/packages/SystemUI/src/com/android/systemui/recent/RecentApplicationsCarouselView.java similarity index 96% rename from packages/SystemUI/src/com/android/systemui/statusbar/RecentApplicationsCarouselView.java rename to packages/SystemUI/src/com/android/systemui/recent/RecentApplicationsCarouselView.java index f5fcb11cd1c75..1c8ec95cf4cab 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/RecentApplicationsCarouselView.java +++ b/packages/SystemUI/src/com/android/systemui/recent/RecentApplicationsCarouselView.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.systemui.statusbar; +package com.android.systemui.recent; import android.content.Context; import android.util.AttributeSet; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBarService.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBarService.java index 814d375310972..6f74924d6d7cf 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBarService.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBarService.java @@ -47,6 +47,7 @@ import com.android.internal.statusbar.StatusBarIcon; import com.android.internal.statusbar.StatusBarNotification; import com.android.systemui.statusbar.*; +import com.android.systemui.recent.RecentApplicationsActivity; import com.android.systemui.R; public class TabletStatusBarService extends StatusBarService {