Skip to content

Commit

Permalink
Add ICS 'Recent Apps' button to Status bar [evilisto]
Browse files Browse the repository at this point in the history
  • Loading branch information
TwistedUmbrella committed Mar 20, 2012
1 parent 538a512 commit 0377e4b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
Binary file modified packages/SystemUI/res/drawable-hdpi/ic_sysbar_recent.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions packages/SystemUI/res/layout/status_bar_expanded.xml
Expand Up @@ -79,6 +79,18 @@
android:contentDescription="@string/accessibility_settings_button"
/>

<com.android.systemui.statusbar.policy.KeyButtonView
android:paddingLeft="4.0dip"
android:paddingRight="4.0dip"
android:id="@id/recent_apps"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:src="@drawable/ic_sysbar_recent"
android:layout_toRightOf="@id/settings_button"
android:contentDescription="@string/accessibility_recent"
systemui:keyCode="187"
systemui:glowBackground="@drawable/ic_sysbar_highlight" />

<ImageView android:id="@+id/clear_all_button"
android:layout_width="wrap_content"
android:layout_height="match_parent"
Expand Down
Expand Up @@ -1671,8 +1671,12 @@ public long interceptKeyBeforeDispatching(WindowState win, KeyEvent event, int p
}
return 0;
} else if (keyCode == KeyEvent.KEYCODE_APP_SWITCH) {
if (down && repeatCount == 0) {
showOrHideRecentAppsDialog(RECENT_APPS_BEHAVIOR_SHOW_OR_DISMISS);
if (down && repeatCount == 0 && !keyguardOn) {
try {
mStatusBarService.toggleRecentApps();
} catch (RemoteException e) {
Slog.e(TAG, "RemoteException when showing recent apps", e);
}
}
return -1;
} else if (keyCode == KeyEvent.KEYCODE_BACK) {
Expand Down

0 comments on commit 0377e4b

Please sign in to comment.