Merge "Fix 2797185: Add recents to statusbar on xlarge device."

This commit is contained in:
Jim Miller
2010-08-30 18:04:30 -07:00
committed by Android (Google) Code Review
4 changed files with 42 additions and 1 deletions

View File

@@ -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);
}

View File

@@ -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>

View File

@@ -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"

View File

@@ -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.
*/