diff --git a/packages/SystemUI/res/drawable-hdpi/ic_navbar_lastapp.png b/packages/SystemUI/res/drawable-hdpi/ic_navbar_lastapp.png
new file mode 100755
index 00000000000..40139651d24
Binary files /dev/null and b/packages/SystemUI/res/drawable-hdpi/ic_navbar_lastapp.png differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_navbar_lastapp_activated.png b/packages/SystemUI/res/drawable-hdpi/ic_navbar_lastapp_activated.png
new file mode 100755
index 00000000000..5167a02b613
Binary files /dev/null and b/packages/SystemUI/res/drawable-hdpi/ic_navbar_lastapp_activated.png differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_lastapp.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_lastapp.png
new file mode 100755
index 00000000000..d4226c37f19
Binary files /dev/null and b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_lastapp.png differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_lastapp.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_lastapp.png
new file mode 100755
index 00000000000..adec9aca373
Binary files /dev/null and b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_lastapp.png differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_navbar_lastapp.png b/packages/SystemUI/res/drawable-xhdpi/ic_navbar_lastapp.png
new file mode 100755
index 00000000000..40139651d24
Binary files /dev/null and b/packages/SystemUI/res/drawable-xhdpi/ic_navbar_lastapp.png differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_navbar_lastapp_activated.png b/packages/SystemUI/res/drawable-xhdpi/ic_navbar_lastapp_activated.png
new file mode 100755
index 00000000000..5167a02b613
Binary files /dev/null and b/packages/SystemUI/res/drawable-xhdpi/ic_navbar_lastapp_activated.png differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_lastapp.png b/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_lastapp.png
new file mode 100755
index 00000000000..d4226c37f19
Binary files /dev/null and b/packages/SystemUI/res/drawable-xhdpi/ic_sysbar_lastapp.png differ
diff --git a/packages/SystemUI/res/drawable/ic_action_lastapp.xml b/packages/SystemUI/res/drawable/ic_action_lastapp.xml
new file mode 100644
index 00000000000..fbd9ce70ac8
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_action_lastapp.xml
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
deleted file mode 100644
index b90672ef99e..00000000000
--- a/packages/SystemUI/res/values/strings.xml
+++ /dev/null
@@ -1,577 +0,0 @@
-
-
-
-
- System UI
-
-
- Clear
-
-
- Do not disturb
-
-
- Show notifications
-
-
- Remove from list
-
-
- App info
-
-
- Hybrid properties
-
-
- No recent apps
-
-
- Dismiss recent apps
-
-
-
- - 1 recent app
- - %d recent apps
-
-
-
- No notifications
-
-
- Ongoing
-
-
- Notifications
-
-
- Connect charger
-
-
- The battery is getting low.
-
-
- %d%% remaining
-
-
- USB charging not supported.\nUse only the supplied charger.
-
-
- Battery use
-
-
- Settings
-
-
- Wi-Fi
-
-
- Airplane mode
-
-
- Auto-rotate screen
-
-
- MUTE
-
-
- AUTO
-
-
- Notifications
-
-
-
- %d%%
-
-
-
- |
-
-
- Bluetooth tethered
-
- Set up input methods
-
-
- Physical keyboard
-
-
- Allow the app %1$s to access the USB device?
-
-
- Allow the app %1$s to access the USB accessory?
-
-
- Open %1$s when this USB device is connected?
-
-
- Open %1$s when this USB accessory is connected?
-
-
- No installed apps work with this USB accessory. Learn more about this accessory at %1$s
-
-
- USB accessory
-
-
- View
-
-
- Use by default for this USB device
-
-
- Use by default for this USB accessory
-
-
- Allow USB debugging?
-
-
- The computer\'s RSA key fingerprint is:\n%1$s
-
-
- Always allow from this computer
-
-
- Zoom to fill screen
-
-
- Stretch to fill screen
-
-
- Compatibility zoom
-
-
- When an app was designed for a smaller screen, a zoom control will appear by the clock.
-
-
- Saving screenshot\u2026
-
- Saving screenshot\u2026
-
- Screenshot is being saved.
-
- Screenshot captured.
-
- Touch to view your screenshot.
-
- Couldn\'t capture screenshot.
-
- Couldn\'t save screenshot. Storage may be in use.
-
-
- USB file transfer options
-
- Mount as a media player (MTP)
-
- Mount as a camera (PTP)
-
- Install Android File Transfer app for Mac
-
-
- Back
-
- Home
-
- Menu
-
- Recent apps
-
-
- Switch input method button.
-
- Compatibility zoom button.
-
-
- Zoom smaller to larger screen.
-
-
- Bluetooth connected.
-
- Bluetooth disconnected.
-
-
- No battery.
-
- Battery one bar.
-
- Battery two bars.
-
- Battery three bars.
-
- Battery full.
-
-
- No phone.
-
- Phone one bar.
-
- Phone two bars.
-
- Phone three bars.
-
- Phone signal full.
-
-
- No data.
-
- Data one bar.
-
- Data two bars.
-
- Data three bars.
-
- Data signal full.
-
-
- Wifi off.
-
- Wifi disconnected.
-
- Wifi one bar.
-
- Wifi two bars.
-
- Wifi three bars.
-
- Wifi signal full.
-
-
- No WiMAX.
-
- WiMAX one bar.
-
- WiMAX two bars.
-
- WiMAX three bars.
-
- WiMAX signal full.
-
-
- No signal.
-
- Not connected.
-
- Zero bars.
-
- One bar.
-
- Two bars.
-
- Three bars.
-
- Signal full.
-
-
- On.
-
- Off.
-
- Connected.
-
-
- GPRS
-
-
- 1 X
-
-
- HSPA
-
-
- 3G
-
-
- 3.5G
-
-
- HSPA+
-
-
- 4G
-
-
- CDMA
-
-
- Roaming
-
-
- Edge
-
-
- Wi-Fi
-
-
- No SIM.
-
-
- Bluetooth tethering.
-
-
- Airplane mode.
-
-
- Battery %d percent.
-
-
- System settings.
-
-
- Notifications.
-
-
- Clear notification.
-
-
- GPS enabled.
-
-
- GPS acquiring.
-
-
- TeleTypewriter enabled.
-
-
- Ringer vibrate.
-
-
- Ringer silent.
-
-
- %s dismissed.
-
- Notification dismissed.
-
-
- Notification shade.
-
- Quick settings.
-
- Recent apps.
-
-
- User %s.
-
- %1$s. %2$s
-
- Mobile %1$s. %2$s. %3$s.
-
- Battery %s.
-
- Airplane Mode %s.
-
- Bluetooth %s.
-
- Alarm set for %s.
-
-
- 2G-3G data disabled
-
- 4G data disabled
-
- Mobile data disabled
-
- Data disabled
-
- You\'ve reached the specified data usage limit.\n\nIf you re-enable data, you may be charged by the operator.
-
- Re-enable data
-
-
-
- No Internet connection
-
-
-
- Wi-Fi connected
-
-
- Searching for GPS
-
-
- Location set by GPS
-
-
- Clear all notifications.
-
-
- App info
-
-
- Close
-
-
- Notifications off
-
-
- Tap here to turn notifications back on.
-
-
- Screen will rotate automatically.
-
-
- Screen is locked in landscape orientation.
-
-
- Screen is locked in portrait orientation.
-
-
- BeanFlinger
-
-
- Daydream
-
-
- Airplane mode
-
- Charging, %d%%
-
- Charged
-
- Bluetooth
-
- Bluetooth (%d Devices)
-
- Bluetooth Off
-
- Brightness
-
- Auto Rotate
-
- Rotation Locked
-
- Input Method
-
- Location in use
-
- Media device
-
- RSSI
-
- Emergency Calls Only
-
- Settings
-
- Time
-
- Me
-
- Wi-Fi
-
- Not Connected
-
- No Network
-
- Wi-Fi Off
-
- Wi-Fi Display
-
- Wireless Display
-
- Profile
-
- Brightness
-
- AUTO
-
- Pie
-
- Hybrid Props
-
-
- Notifications appear here
-
- Access them anytime by swiping down.\nSwipe down again for system controls.
- Screen timeout set to: %1$d %2$s
-
- GPS
- GPS off
- Go to sleep
- Sound on
- Sound off
- Vibration on
- Vibration off
- On
- Off
- Sound
- Lock screen
- Network mode
- Report bug
- Sync
- Sync off
- Torch
- Torch off
- NFC
- NFC off
- Timeout
- %1$d %2$s
- Disconnected
- Tethering off
- Tethering
- Wi-Fi AP
- Wi-Fi AP off
- LTE
- LTE off
- Volume
-
-
- Choose action to assign
- Home button
- Recent button
- Search button
- Back button
- Empty button
- Menu (auto hide) button
- Menu (always show) button
- Menu button
-
- ccc, dd MMM yyyy
- hh:mm
- HH:mm
- a
-
-
diff --git a/packages/SystemUI/src/com/android/systemui/SearchPanelView.java b/packages/SystemUI/src/com/android/systemui/SearchPanelView.java
deleted file mode 100644
index daac9ed9a9c..00000000000
--- a/packages/SystemUI/src/com/android/systemui/SearchPanelView.java
+++ /dev/null
@@ -1,319 +0,0 @@
-/*
- * 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.
- */
-
-package com.android.systemui;
-
-import android.animation.LayoutTransition;
-import android.app.ActivityManagerNative;
-import android.app.ActivityOptions;
-import android.app.SearchManager;
-import android.content.ActivityNotFoundException;
-import android.content.ComponentName;
-import android.content.Context;
-import android.content.Intent;
-import android.content.res.Resources;
-import android.os.RemoteException;
-import android.os.ServiceManager;
-import android.os.UserHandle;
-import android.os.Vibrator;
-import android.provider.Settings;
-import android.util.AttributeSet;
-import android.util.Slog;
-import android.view.IWindowManager;
-import android.view.MotionEvent;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.ViewTreeObserver;
-import android.view.ViewTreeObserver.OnPreDrawListener;
-import android.widget.FrameLayout;
-
-import com.android.internal.widget.multiwaveview.GlowPadView;
-import com.android.internal.widget.multiwaveview.GlowPadView.OnTriggerListener;
-import com.android.systemui.R;
-import com.android.systemui.recent.StatusBarTouchProxy;
-import com.android.systemui.statusbar.BaseStatusBar;
-import com.android.systemui.statusbar.CommandQueue;
-import com.android.systemui.statusbar.phone.PhoneStatusBar;
-import com.android.systemui.statusbar.tablet.StatusBarPanel;
-import com.android.systemui.statusbar.tablet.TabletStatusBar;
-
-public class SearchPanelView extends FrameLayout implements
- StatusBarPanel, ActivityOptions.OnAnimationStartedListener {
- private static final int SEARCH_PANEL_HOLD_DURATION = 0;
- static final String TAG = "SearchPanelView";
- static final boolean DEBUG = TabletStatusBar.DEBUG || PhoneStatusBar.DEBUG || false;
- private static final String ASSIST_ICON_METADATA_NAME =
- "com.android.systemui.action_assist_icon";
- private final Context mContext;
- private BaseStatusBar mBar;
- private StatusBarTouchProxy mStatusBarTouchProxy;
-
- private boolean mShowing;
- private View mSearchTargetsContainer;
- private GlowPadView mGlowPadView;
- private IWindowManager mWm;
-
- public SearchPanelView(Context context, AttributeSet attrs) {
- this(context, attrs, 0);
- }
-
- public SearchPanelView(Context context, AttributeSet attrs, int defStyle) {
- super(context, attrs, defStyle);
- mContext = context;
- mWm = IWindowManager.Stub.asInterface(ServiceManager.getService("window"));
- }
-
- private void startAssistActivity() {
- if (!mBar.isDeviceProvisioned()) return;
-
- // Close Recent Apps if needed
- mBar.animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_SEARCH_PANEL);
- boolean isKeyguardShowing = false;
- try {
- isKeyguardShowing = mWm.isKeyguardLocked();
- } catch (RemoteException e) {
-
- }
-
- if (isKeyguardShowing) {
- // Have keyguard show the bouncer and launch the activity if the user succeeds.
- try {
- mWm.showAssistant();
- } catch (RemoteException e) {
- // too bad, so sad...
- }
- onAnimationStarted();
- } else {
- // Otherwise, keyguard isn't showing so launch it from here.
- Intent intent = ((SearchManager) mContext.getSystemService(Context.SEARCH_SERVICE))
- .getAssistIntent(mContext, UserHandle.USER_CURRENT);
- if (intent == null) return;
-
- try {
- ActivityManagerNative.getDefault().dismissKeyguardOnNextActivity();
- } catch (RemoteException e) {
- // too bad, so sad...
- }
-
- try {
- ActivityOptions opts = ActivityOptions.makeCustomAnimation(mContext,
- R.anim.search_launch_enter, R.anim.search_launch_exit,
- getHandler(), this);
- intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
- mContext.startActivityAsUser(intent, opts.toBundle(),
- new UserHandle(UserHandle.USER_CURRENT));
- } catch (ActivityNotFoundException e) {
- Slog.w(TAG, "Activity not found for " + intent.getAction());
- onAnimationStarted();
- }
- }
- }
-
- class GlowPadTriggerListener implements GlowPadView.OnTriggerListener {
- boolean mWaitingForLaunch;
-
- public void onGrabbed(View v, int handle) {
- }
-
- public void onReleased(View v, int handle) {
- }
-
- public void onGrabbedStateChange(View v, int handle) {
- if (!mWaitingForLaunch && OnTriggerListener.NO_HANDLE == handle) {
- mBar.hideSearchPanel();
- }
- }
-
- public void onTrigger(View v, final int target) {
- final int resId = mGlowPadView.getResourceIdForTarget(target);
- switch (resId) {
- case com.android.internal.R.drawable.ic_action_assist_generic:
- mWaitingForLaunch = true;
- startAssistActivity();
- vibrate();
- break;
- }
- }
-
- public void onFinishFinalAnimation() {
- }
- }
- final GlowPadTriggerListener mGlowPadViewListener = new GlowPadTriggerListener();
-
- @Override
- public void onAnimationStarted() {
- postDelayed(new Runnable() {
- public void run() {
- mGlowPadViewListener.mWaitingForLaunch = false;
- mBar.hideSearchPanel();
- }
- }, SEARCH_PANEL_HOLD_DURATION);
- }
-
- @Override
- protected void onFinishInflate() {
- super.onFinishInflate();
- mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
- mSearchTargetsContainer = findViewById(R.id.search_panel_container);
- mStatusBarTouchProxy = (StatusBarTouchProxy) findViewById(R.id.status_bar_touch_proxy);
- // TODO: fetch views
- mGlowPadView = (GlowPadView) findViewById(R.id.glow_pad_view);
- mGlowPadView.setOnTriggerListener(mGlowPadViewListener);
- }
-
- private void maybeSwapSearchIcon() {
- Intent intent = ((SearchManager) mContext.getSystemService(Context.SEARCH_SERVICE))
- .getAssistIntent(mContext, UserHandle.USER_CURRENT);
- if (intent != null) {
- ComponentName component = intent.getComponent();
- if (component == null || !mGlowPadView.replaceTargetDrawablesIfPresent(component,
- ASSIST_ICON_METADATA_NAME,
- com.android.internal.R.drawable.ic_action_assist_generic)) {
- if (DEBUG) Slog.v(TAG, "Couldn't grab icon for component " + component);
- }
- }
- }
-
- private boolean pointInside(int x, int y, View v) {
- final int l = v.getLeft();
- final int r = v.getRight();
- final int t = v.getTop();
- final int b = v.getBottom();
- return x >= l && x < r && y >= t && y < b;
- }
-
- public boolean isInContentArea(int x, int y) {
- if (pointInside(x, y, mSearchTargetsContainer)) {
- return true;
- } else if (mStatusBarTouchProxy != null &&
- pointInside(x, y, mStatusBarTouchProxy)) {
- return true;
- } else {
- return false;
- }
- }
-
- private final OnPreDrawListener mPreDrawListener = new ViewTreeObserver.OnPreDrawListener() {
- public boolean onPreDraw() {
- getViewTreeObserver().removeOnPreDrawListener(this);
- mGlowPadView.resumeAnimations();
- return false;
- }
- };
-
- private void vibrate() {
- Context context = getContext();
- if (Settings.System.getIntForUser(context.getContentResolver(),
- Settings.System.HAPTIC_FEEDBACK_ENABLED, 1, UserHandle.USER_CURRENT) != 0) {
- Resources res = context.getResources();
- Vibrator vibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE);
- vibrator.vibrate(res.getInteger(R.integer.config_search_panel_view_vibration_duration));
- }
- }
-
- public void show(final boolean show, boolean animate) {
- if (!show) {
- final LayoutTransition transitioner = animate ? createLayoutTransitioner() : null;
- ((ViewGroup) mSearchTargetsContainer).setLayoutTransition(transitioner);
- }
- mShowing = show;
- if (show) {
- maybeSwapSearchIcon();
- if (getVisibility() != View.VISIBLE) {
- setVisibility(View.VISIBLE);
- // Don't start the animation until we've created the layer, which is done
- // right before we are drawn
- mGlowPadView.suspendAnimations();
- mGlowPadView.ping();
- getViewTreeObserver().addOnPreDrawListener(mPreDrawListener);
- vibrate();
- }
- setFocusable(true);
- setFocusableInTouchMode(true);
- requestFocus();
- } else {
- setVisibility(View.INVISIBLE);
- }
- }
-
- public void hide(boolean animate) {
- if (mBar != null) {
- // This will indirectly cause show(false, ...) to get called
- mBar.animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE);
- } else {
- setVisibility(View.INVISIBLE);
- }
- }
-
- /**
- * We need to be aligned at the bottom. LinearLayout can't do this, so instead,
- * let LinearLayout do all the hard work, and then shift everything down to the bottom.
- */
- @Override
- protected void onLayout(boolean changed, int l, int t, int r, int b) {
- super.onLayout(changed, l, t, r, b);
- // setPanelHeight(mSearchTargetsContainer.getHeight());
- }
-
- @Override
- public boolean dispatchHoverEvent(MotionEvent event) {
- // Ignore hover events outside of this panel bounds since such events
- // generate spurious accessibility events with the panel content when
- // tapping outside of it, thus confusing the user.
- final int x = (int) event.getX();
- final int y = (int) event.getY();
- if (x >= 0 && x < getWidth() && y >= 0 && y < getHeight()) {
- return super.dispatchHoverEvent(event);
- }
- return true;
- }
-
- /**
- * Whether the panel is showing, or, if it's animating, whether it will be
- * when the animation is done.
- */
- public boolean isShowing() {
- return mShowing;
- }
-
- public void setBar(BaseStatusBar bar) {
- mBar = bar;
- }
-
- public void setStatusBarView(final View statusBarView) {
- if (mStatusBarTouchProxy != null) {
- mStatusBarTouchProxy.setStatusBar(statusBarView);
-// mGlowPadView.setOnTouchListener(new OnTouchListener() {
-// public boolean onTouch(View v, MotionEvent event) {
-// return statusBarView.onTouchEvent(event);
-// }
-// });
- }
- }
-
- private LayoutTransition createLayoutTransitioner() {
- LayoutTransition transitioner = new LayoutTransition();
- transitioner.setDuration(200);
- transitioner.setStartDelay(LayoutTransition.CHANGE_DISAPPEARING, 0);
- transitioner.setAnimator(LayoutTransition.DISAPPEARING, null);
- return transitioner;
- }
-
- public boolean isAssistantAvailable() {
- return ((SearchManager) mContext.getSystemService(Context.SEARCH_SERVICE))
- .getAssistIntent(mContext, UserHandle.USER_CURRENT) != null;
- }
-}