Fix 2797185: Add recents to statusbar on xlarge device.
Change-Id: I9d2b099347b31189b96596273e38b5c2df8f4432
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
21
packages/SystemUI/res/drawable/status_bar_recent.xml
Executable file
21
packages/SystemUI/res/drawable/status_bar_recent.xml
Executable 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>
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user