Skip to content

Commit

Permalink
LastApp Toggle [1/2]
Browse files Browse the repository at this point in the history
Creates an action useable by NavBar & NavRing to toggle
between most recent apps.  Will try to ignore the launcher
when possible.  ie, if you've just rebooted and have not opened any
apps, it will do nothing.  if you open 1 app, it will toggle between
that 1 app and the launcher.  Once two apps have been opened, it will
toggle between those two apps.
It's kind of like opening recents and hitting your ParanoidAndroid#2 slot repeatedly

PS 2:  Add Icons from Hoolm.  {Thanks!}
       Re-wrote the logic for selecting next app.  Rather than
toggling back to launcher if only 1 app open, it does nothing.
toggling only occurs now when there are at least two apps open.
One issue that I still need to work out is that 'Recents' is somehow
showing up as a valid target to toggle to.  It shouldn't.

ps 3:  getRunningTasks() does not filter out 'Excludefromrecents'.
Thus we need checks for 'default launcher' and SystemUI.
as I write this, I realize I might be able to query the
ExcludeFromRecents flag of the package a bit more easily.

ps 4: Whitespace fix.
ps 5: one more whitespace fix.
ps 6: remove unnecessary dependency

Signed-off-by: Zaphod <[email protected]>
Change-Id: I0b59121b07b9ba44a2837a8db0266441ed82f9a3

Conflicts:
  • Loading branch information
manelscout4life committed Mar 26, 2013
1 parent ba2fee1 commit 415fe67
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 896 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions packages/SystemUI/res/drawable/ic_action_lastapp.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2012 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_enabled="true"
android:state_active="false"
android:state_focused="false"
android:drawable="@drawable/ic_navbar_lastapp" />

<item
android:state_enabled="true"
android:state_active="true"
android:state_focused="false"
android:drawable="@drawable/ic_navbar_lastapp_activated" />

<item
android:state_enabled="true"
android:state_active="false"
android:state_focused="true"
android:drawable="@drawable/ic_navbar_lastapp_activated" />

</selector>
577 changes: 0 additions & 577 deletions packages/SystemUI/res/values/strings.xml

This file was deleted.

319 changes: 0 additions & 319 deletions packages/SystemUI/src/com/android/systemui/SearchPanelView.java

This file was deleted.

0 comments on commit 415fe67

Please sign in to comment.