diff options
author | Jim Miller <jaggies@google.com> | 2010-08-30 18:04:30 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-08-30 18:04:30 -0700 |
commit | 91b2eb933cbafbce13e2afa2220cd72d363be947 (patch) | |
tree | 9fcfe01a6251bcff94880c6fa355867e67070523 /packages/SystemUI | |
parent | bcc2f7589a1402c24c1aa3aa3036ee73d094c2ee (diff) | |
parent | a10194936c457da55402cbfedd541fcd0cdb12d3 (diff) | |
download | frameworks_base-91b2eb933cbafbce13e2afa2220cd72d363be947.zip frameworks_base-91b2eb933cbafbce13e2afa2220cd72d363be947.tar.gz frameworks_base-91b2eb933cbafbce13e2afa2220cd72d363be947.tar.bz2 |
Merge "Fix 2797185: Add recents to statusbar on xlarge device."
Diffstat (limited to 'packages/SystemUI')
4 files changed, 42 insertions, 1 deletions
diff --git a/packages/SystemUI/proguard.flags b/packages/SystemUI/proguard.flags index 9ccc5a9..72bd776 100644 --- a/packages/SystemUI/proguard.flags +++ b/packages/SystemUI/proguard.flags @@ -1,4 +1,5 @@ -keep class com.android.systemui.statusbar.tablet.TabletStatusBarService { public void notificationIconsClicked(android.view.View); public void systemInfoClicked(android.view.View); + public void recentButtonClicked(android.view.View); } diff --git a/packages/SystemUI/res/drawable/status_bar_recent.xml b/packages/SystemUI/res/drawable/status_bar_recent.xml new file mode 100755 index 0000000..d708455 --- /dev/null +++ b/packages/SystemUI/res/drawable/status_bar_recent.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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. +--> + +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:state_pressed="true" android:drawable="@drawable/status_bar_recent_pressed" /> + <item android:drawable="@drawable/status_bar_recent_default" /> +</selector> + diff --git a/packages/SystemUI/res/layout-xlarge/status_bar.xml b/packages/SystemUI/res/layout-xlarge/status_bar.xml index 481bcde..a0c2c95 100644 --- a/packages/SystemUI/res/layout-xlarge/status_bar.xml +++ b/packages/SystemUI/res/layout-xlarge/status_bar.xml @@ -118,12 +118,21 @@ <com.android.systemui.statusbar.KeyButtonView android:id="@+id/menu" android:layout_width="wrap_content" android:layout_height="match_parent" - android:layout_toLeftOf="@+id/home" + android:layout_toLeftOf="@+id/recent" android:src="@drawable/status_bar_menu" android:paddingLeft="4dip" android:paddingRight="4dip" systemui:keyCode="82" /> + <Button android:id="@+id/recent" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:layout_toLeftOf="@+id/home" + android:background="@drawable/status_bar_recent" + android:paddingLeft="4dip" + android:paddingRight="4dip" + android:onClick="recentButtonClicked" + /> <com.android.systemui.statusbar.KeyButtonView android:id="@+id/home" android:layout_width="wrap_content" android:layout_height="match_parent" 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 087671a..312c5f4 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBarService.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBarService.java @@ -22,6 +22,7 @@ import android.app.Notification; import android.app.PendingIntent; import android.app.Service; import android.app.StatusBarManager; +import android.content.ActivityNotFoundException; import android.content.Context; import android.content.Intent; import android.content.res.Resources; @@ -495,6 +496,15 @@ public class TabletStatusBarService extends StatusBarService { mHandler.sendEmptyMessage(msg); } + public void recentButtonClicked(View v) { + if (DEBUG) Slog.d(TAG, "clicked recent apps"); + Intent intent = new Intent(); + intent.setClass(this, RecentApplicationsActivity.class); + intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK + | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS); + startActivity(intent); + } + /** * Cancel this notification and tell the status bar service about the failure. Hold no locks. */ |