Merge "Update RouteInfo docs and make public."
diff --git a/Android.mk b/Android.mk
index edabdb4..19ee855 100644
--- a/Android.mk
+++ b/Android.mk
@@ -147,6 +147,8 @@
 	core/java/android/hardware/display/IDisplayManagerCallback.aidl \
 	core/java/android/hardware/hdmi/IHdmiCecListener.aidl \
 	core/java/android/hardware/hdmi/IHdmiCecService.aidl \
+	core/java/android/hardware/hdmi/IHdmiControlCallback.aidl \
+	core/java/android/hardware/hdmi/IHdmiControlService.aidl \
 	core/java/android/hardware/input/IInputManager.aidl \
 	core/java/android/hardware/input/IInputDevicesChangedListener.aidl \
 	core/java/android/hardware/location/IFusedLocationHardware.aidl \
diff --git a/api/current.txt b/api/current.txt
index be7ca33..128c4d2 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -6630,6 +6630,7 @@
     field public static final java.lang.String DROPBOX_SERVICE = "dropbox";
     field public static final java.lang.String FINGERPRINT_SERVICE = "fingerprint";
     field public static final java.lang.String HDMI_CEC_SERVICE = "hdmi_cec";
+    field public static final java.lang.String HDMI_CONTROL_SERVICE = "hdmi_control";
     field public static final java.lang.String INPUT_METHOD_SERVICE = "input_method";
     field public static final java.lang.String INPUT_SERVICE = "input";
     field public static final java.lang.String KEYGUARD_SERVICE = "keyguard";
@@ -12503,9 +12504,15 @@
     field public static final int MESSAGE_VENDOR_REMOTE_BUTTON_UP = 139; // 0x8b
     field public static final int POWER_STATUS_ON = 0; // 0x0
     field public static final int POWER_STATUS_STANDBY = 1; // 0x1
+    field public static final int POWER_STATUS_TRANSIENT_TO_ON = 2; // 0x2
+    field public static final int POWER_STATUS_TRANSIENT_TO_STANDBY = 3; // 0x3
     field public static final int POWER_STATUS_UNKNOWN = -1; // 0xffffffff
-    field public static final int POWER_TRANSIENT_TO_ON = 2; // 0x2
-    field public static final int POWER_TRANSIENT_TO_STANDBY = 3; // 0x3
+    field public static final int RESULT_ALREADY_IN_PROGRESS = 4; // 0x4
+    field public static final int RESULT_EXCEPTION = 5; // 0x5
+    field public static final int RESULT_SOURCE_NOT_AVAILABLE = 2; // 0x2
+    field public static final int RESULT_SUCCESS = 0; // 0x0
+    field public static final int RESULT_TARGET_NOT_AVAILABLE = 3; // 0x3
+    field public static final int RESULT_TIMEOUT = 1; // 0x1
     field public static final int UNKNOWN_VENDOR_ID = 16777215; // 0xffffff
   }
 
@@ -12551,6 +12558,27 @@
     field public static final byte[] EMPTY_PARAM;
   }
 
+  public final class HdmiControlManager {
+    method public android.hardware.hdmi.HdmiPlaybackClient getPlaybackClient();
+    method public android.hardware.hdmi.HdmiTvClient getTvClient();
+  }
+
+  public final class HdmiPlaybackClient {
+    method public void oneTouchPlay(android.hardware.hdmi.HdmiPlaybackClient.OneTouchPlayCallback);
+    method public void queryDisplayStatus(android.hardware.hdmi.HdmiPlaybackClient.DisplayStatusCallback);
+  }
+
+  public static abstract interface HdmiPlaybackClient.DisplayStatusCallback {
+    method public abstract void onComplete(int);
+  }
+
+  public static abstract interface HdmiPlaybackClient.OneTouchPlayCallback {
+    method public abstract void onComplete(int);
+  }
+
+  public final class HdmiTvClient {
+  }
+
 }
 
 package android.hardware.input {
diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java
index 74d2e9a..f7f51fe 100644
--- a/core/java/android/content/Context.java
+++ b/core/java/android/content/Context.java
@@ -2583,13 +2583,24 @@
 
     /**
      * Use with {@link #getSystemService} to retrieve a
-     * {@link android.hardware.hdmi.HdmiCecManager for controlling and managing
+     * {@link android.hardware.hdmi.HdmiCecManager} for controlling and managing
      * HDMI-CEC protocol.
      *
      * @see #getSystemService
      * @see android.hardware.hdmi.HdmiCecManager
      */
-     public static final String HDMI_CEC_SERVICE = "hdmi_cec";
+    // TODO: Remove this once HdmiControlService is ready.
+    public static final String HDMI_CEC_SERVICE = "hdmi_cec";
+
+    /**
+     * Use with {@link #getSystemService} to retrieve a
+     * {@link android.hardware.hdmi.HdmiControlManager} for controlling and managing
+     * HDMI-CEC protocol.
+     *
+     * @see #getSystemService
+     * @see android.hardware.hdmi.HdmiControlManager
+     */
+    public static final String HDMI_CONTROL_SERVICE = "hdmi_control";
 
     /**
      * Use with {@link #getSystemService} to retrieve a
diff --git a/core/java/android/hardware/hdmi/HdmiCec.java b/core/java/android/hardware/hdmi/HdmiCec.java
index 9193f89..a71a74d 100644
--- a/core/java/android/hardware/hdmi/HdmiCec.java
+++ b/core/java/android/hardware/hdmi/HdmiCec.java
@@ -171,8 +171,15 @@
     public static final int POWER_STATUS_UNKNOWN = -1;
     public static final int POWER_STATUS_ON = 0;
     public static final int POWER_STATUS_STANDBY = 1;
-    public static final int POWER_TRANSIENT_TO_ON = 2;
-    public static final int POWER_TRANSIENT_TO_STANDBY = 3;
+    public static final int POWER_STATUS_TRANSIENT_TO_ON = 2;
+    public static final int POWER_STATUS_TRANSIENT_TO_STANDBY = 3;
+
+    public static final int RESULT_SUCCESS = 0;
+    public static final int RESULT_TIMEOUT = 1;
+    public static final int RESULT_SOURCE_NOT_AVAILABLE = 2;
+    public static final int RESULT_TARGET_NOT_AVAILABLE = 3;
+    public static final int RESULT_ALREADY_IN_PROGRESS = 4;
+    public static final int RESULT_EXCEPTION = 5;
 
     private static final int[] ADDRESS_TO_TYPE = {
         DEVICE_TV,  // ADDR_TV
diff --git a/core/java/android/hardware/hdmi/HdmiControlManager.java b/core/java/android/hardware/hdmi/HdmiControlManager.java
new file mode 100644
index 0000000..a3f27b9
--- /dev/null
+++ b/core/java/android/hardware/hdmi/HdmiControlManager.java
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2014 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 android.hardware.hdmi;
+
+import android.annotation.Nullable;
+/**
+ * The {@link HdmiControlManager} class is used to send HDMI control messages
+ * to attached CEC devices.
+ *
+ * <p>Provides various HDMI client instances that represent HDMI-CEC logical devices
+ * hosted in the system. {@link #getTvClient()}, for instance will return an
+ * {@link HdmiTvClient} object if the system is configured to host one. Android system
+ * can host more than one logical CEC devices. If multiple types are configured they
+ * all work as if they were independent logical devices running in the system.
+ */
+public final class HdmiControlManager {
+    @Nullable private final IHdmiControlService mService;
+
+    /**
+     * @hide - hide this constructor because it has a parameter of type
+     * IHdmiControlService, which is a system private class. The right way
+     * to create an instance of this class is using the factory
+     * Context.getSystemService.
+     */
+    public HdmiControlManager(IHdmiControlService service) {
+        mService = service;
+    }
+
+    /**
+     * Gets an object that represents a HDMI-CEC logical device of type playback on the system.
+     *
+     * <p>Used to send HDMI control messages to other devices like TV or audio amplifier through
+     * HDMI bus. It is also possible to communicate with other logical devices hosted in the same
+     * system if the system is configured to host more than one type of HDMI-CEC logical devices.
+     *
+     * @return {@link HdmiPlaybackClient} instance. {@code null} on failure.
+     */
+    @Nullable
+    public HdmiPlaybackClient getPlaybackClient() {
+        if (mService == null) {
+            return null;
+        }
+        return new HdmiPlaybackClient(mService);
+    }
+
+    /**
+     * Gets an object that represents a HDMI-CEC logical device of type TV on the system.
+     *
+     * <p>Used to send HDMI control messages to other devices and manage them through
+     * HDMI bus. It is also possible to communicate with other logical devices hosted in the same
+     * system if the system is configured to host more than one type of HDMI-CEC logical devices.
+     *
+     * @return {@link HdmiTvClient} instance. {@code null} on failure.
+     */
+    @Nullable
+    public HdmiTvClient getTvClient() {
+        if (mService == null) {
+            return null;
+        }
+        return new HdmiTvClient(mService);
+    }
+}
diff --git a/core/java/android/hardware/hdmi/HdmiPlaybackClient.java b/core/java/android/hardware/hdmi/HdmiPlaybackClient.java
new file mode 100644
index 0000000..83da29a
--- /dev/null
+++ b/core/java/android/hardware/hdmi/HdmiPlaybackClient.java
@@ -0,0 +1,116 @@
+/*
+ * Copyright (C) 2014 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 android.hardware.hdmi;
+
+import android.os.RemoteException;
+
+import android.util.Log;
+
+/**
+ * HdmiPlaybackClient represents HDMI-CEC logical device of type Playback
+ * in the Android system which acts as a playback device such as set-top box.
+ * It provides with methods that control, get information from TV/Display device
+ * connected through HDMI bus.
+ */
+public final class HdmiPlaybackClient {
+    private static final String TAG = "HdmiPlaybackClient";
+
+    private final IHdmiControlService mService;
+
+    /**
+     * Listener used by the client to get the result of one touch play operation.
+     */
+    public interface OneTouchPlayCallback {
+        /**
+         * Called when the result of the feature one touch play is returned.
+         *
+         * @param result the result of the operation. {@link HdmiCec#RESULT_SUCCESS}
+         *         if successful.
+         */
+        public void onComplete(int result);
+    }
+
+    /**
+     * Listener used by the client to get display device status.
+     */
+    public interface DisplayStatusCallback {
+        /**
+         * Called when display device status is reported.
+         *
+         * @param status display device status
+         * @see {@link HdmiCec#POWER_STATUS_ON}
+         * @see {@link HdmiCec#POWER_STATUS_STANDBY}
+         * @see {@link HdmiCec#POWER_STATUS_TRANSIENT_TO_ON}
+         * @see {@link HdmiCec#POWER_STATUS_TRANSIENT_TO_STANDBY}
+         * @see {@link HdmiCec#POWER_STATUS_UNKNOWN}
+         */
+        public void onComplete(int status);
+    }
+
+    HdmiPlaybackClient(IHdmiControlService service) {
+        mService = service;
+    }
+
+    /**
+     * Perform the feature 'one touch play' from playback device to turn on display
+     * and switch the input.
+     *
+     * @param callback {@link OneTouchPlayCallback} object to get informed
+     *         of the result
+     */
+    public void oneTouchPlay(OneTouchPlayCallback callback) {
+        // TODO: Use PendingResult.
+        try {
+            mService.oneTouchPlay(getCallbackWrapper(callback));
+        } catch (RemoteException e) {
+            Log.e(TAG, "oneTouchPlay threw exception ", e);
+        }
+    }
+
+    /**
+     * Get the status of display device connected through HDMI bus.
+     *
+     * @param callback {@link DisplayStatusCallback} object to get informed
+     *         of the result
+     */
+    public void queryDisplayStatus(DisplayStatusCallback callback) {
+        // TODO: PendingResult.
+        try {
+            mService.oneTouchPlay(getCallbackWrapper(callback));
+        } catch (RemoteException e) {
+            Log.e(TAG, "queryDisplayStatus threw exception ", e);
+        }
+    }
+
+    private IHdmiControlCallback getCallbackWrapper(final OneTouchPlayCallback callback) {
+        return new IHdmiControlCallback.Stub() {
+            @Override
+            public void onComplete(int result) {
+                callback.onComplete(result);
+            }
+        };
+    }
+
+    private IHdmiControlCallback getCallbackWrapper(final DisplayStatusCallback callback) {
+        return new IHdmiControlCallback.Stub() {
+            @Override
+            public void onComplete(int status) {
+                callback.onComplete(status);
+            }
+        };
+    }
+}
diff --git a/core/java/android/hardware/hdmi/HdmiTvClient.java b/core/java/android/hardware/hdmi/HdmiTvClient.java
new file mode 100644
index 0000000..73c72472
--- /dev/null
+++ b/core/java/android/hardware/hdmi/HdmiTvClient.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2014 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 android.hardware.hdmi;
+
+/**
+ * HdmiTvClient represents HDMI-CEC logical device of type TV in the Android system
+ * which acts as TV/Display. It provides with methods that manage, interact with other
+ * devices on the CEC bus.
+ */
+public final class HdmiTvClient {
+    private static final String TAG = "HdmiTvClient";
+
+    private final IHdmiControlService mService;
+
+    HdmiTvClient(IHdmiControlService service) {
+        mService = service;
+    }
+}
diff --git a/core/java/android/hardware/hdmi/IHdmiControlCallback.aidl b/core/java/android/hardware/hdmi/IHdmiControlCallback.aidl
new file mode 100644
index 0000000..ef3dd47
--- /dev/null
+++ b/core/java/android/hardware/hdmi/IHdmiControlCallback.aidl
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2014 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 android.hardware.hdmi;
+
+/**
+ * Callback interface definition for HDMI client to get informed of
+ * the result of various API invocation.
+ *
+ * @hide
+ */
+oneway interface IHdmiControlCallback {
+    void onComplete(int result);
+}
diff --git a/core/java/android/hardware/hdmi/IHdmiControlService.aidl b/core/java/android/hardware/hdmi/IHdmiControlService.aidl
new file mode 100644
index 0000000..f790ed9
--- /dev/null
+++ b/core/java/android/hardware/hdmi/IHdmiControlService.aidl
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2014 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 android.hardware.hdmi;
+
+import android.hardware.hdmi.HdmiCecMessage;
+import android.hardware.hdmi.IHdmiControlCallback;
+
+/**
+ * Binder interface that clients running in the application process
+ * will use to perform HDMI-CEC features by communicating with other devices
+ * on the bus.
+ *
+ * @hide
+ */
+interface IHdmiControlService {
+    int oneTouchPlay(IHdmiControlCallback callback);
+    int queryDisplayStatus(IHdmiControlCallback callback);
+}
diff --git a/core/java/android/preference/PreferenceManager.java b/core/java/android/preference/PreferenceManager.java
index 5c8c8e9..ad940c6 100644
--- a/core/java/android/preference/PreferenceManager.java
+++ b/core/java/android/preference/PreferenceManager.java
@@ -621,8 +621,9 @@
      * Registers a listener.
      * 
      * @see OnActivityStopListener
+     * @hide
      */
-    void registerOnActivityStopListener(OnActivityStopListener listener) {
+    public void registerOnActivityStopListener(OnActivityStopListener listener) {
         synchronized (this) {
             if (mActivityStopListeners == null) {
                 mActivityStopListeners = new ArrayList<OnActivityStopListener>();
@@ -638,8 +639,9 @@
      * Unregisters a listener.
      * 
      * @see OnActivityStopListener
+     * @hide
      */
-    void unregisterOnActivityStopListener(OnActivityStopListener listener) {
+    public void unregisterOnActivityStopListener(OnActivityStopListener listener) {
         synchronized (this) {
             if (mActivityStopListeners != null) {
                 mActivityStopListeners.remove(listener);
diff --git a/core/java/android/preference/SeekBarVolumizer.java b/core/java/android/preference/SeekBarVolumizer.java
new file mode 100644
index 0000000..d2d6ade
--- /dev/null
+++ b/core/java/android/preference/SeekBarVolumizer.java
@@ -0,0 +1,248 @@
+/*
+ * Copyright (C) 2014 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 android.preference;
+
+import android.content.Context;
+import android.database.ContentObserver;
+import android.media.AudioManager;
+import android.media.Ringtone;
+import android.media.RingtoneManager;
+import android.net.Uri;
+import android.os.Handler;
+import android.os.HandlerThread;
+import android.os.Message;
+import android.preference.VolumePreference.VolumeStore;
+import android.provider.Settings;
+import android.provider.Settings.System;
+import android.util.Log;
+import android.widget.SeekBar;
+import android.widget.SeekBar.OnSeekBarChangeListener;
+
+/**
+ * Turns a {@link SeekBar} into a volume control.
+ * @hide
+ */
+public class SeekBarVolumizer implements OnSeekBarChangeListener, Handler.Callback {
+
+    public interface Callback {
+        void onSampleStarting(SeekBarVolumizer sbv);
+    }
+
+    private Context mContext;
+    private Handler mHandler;
+    private final Callback mCallback;
+
+    private AudioManager mAudioManager;
+    private int mStreamType;
+    private int mOriginalStreamVolume;
+    private Ringtone mRingtone;
+
+    private int mLastProgress = -1;
+    private SeekBar mSeekBar;
+    private int mVolumeBeforeMute = -1;
+
+    private static final int MSG_SET_STREAM_VOLUME = 0;
+    private static final int MSG_START_SAMPLE = 1;
+    private static final int MSG_STOP_SAMPLE = 2;
+    private static final int CHECK_RINGTONE_PLAYBACK_DELAY_MS = 1000;
+
+    private ContentObserver mVolumeObserver = new ContentObserver(mHandler) {
+        @Override
+        public void onChange(boolean selfChange) {
+            super.onChange(selfChange);
+            if (mSeekBar != null && mAudioManager != null) {
+                int volume = mAudioManager.getStreamVolume(mStreamType);
+                mSeekBar.setProgress(volume);
+            }
+        }
+    };
+
+    public SeekBarVolumizer(Context context, SeekBar seekBar, int streamType, Uri defaultUri,
+            Callback callback) {
+        mContext = context;
+        mAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
+        mStreamType = streamType;
+        mSeekBar = seekBar;
+
+        HandlerThread thread = new HandlerThread(VolumePreference.TAG + ".CallbackHandler");
+        thread.start();
+        mHandler = new Handler(thread.getLooper(), this);
+        mCallback = callback;
+
+        initSeekBar(seekBar, defaultUri);
+    }
+
+    private void initSeekBar(SeekBar seekBar, Uri defaultUri) {
+        seekBar.setMax(mAudioManager.getStreamMaxVolume(mStreamType));
+        mOriginalStreamVolume = mAudioManager.getStreamVolume(mStreamType);
+        seekBar.setProgress(mOriginalStreamVolume);
+        seekBar.setOnSeekBarChangeListener(this);
+
+        mContext.getContentResolver().registerContentObserver(
+                System.getUriFor(System.VOLUME_SETTINGS[mStreamType]),
+                false, mVolumeObserver);
+
+        if (defaultUri == null) {
+            if (mStreamType == AudioManager.STREAM_RING) {
+                defaultUri = Settings.System.DEFAULT_RINGTONE_URI;
+            } else if (mStreamType == AudioManager.STREAM_NOTIFICATION) {
+                defaultUri = Settings.System.DEFAULT_NOTIFICATION_URI;
+            } else {
+                defaultUri = Settings.System.DEFAULT_ALARM_ALERT_URI;
+            }
+        }
+
+        mRingtone = RingtoneManager.getRingtone(mContext, defaultUri);
+
+        if (mRingtone != null) {
+            mRingtone.setStreamType(mStreamType);
+        }
+    }
+
+    @Override
+    public boolean handleMessage(Message msg) {
+        switch (msg.what) {
+            case MSG_SET_STREAM_VOLUME:
+                mAudioManager.setStreamVolume(mStreamType, mLastProgress, 0);
+                break;
+            case MSG_START_SAMPLE:
+                onStartSample();
+                break;
+            case MSG_STOP_SAMPLE:
+                onStopSample();
+                break;
+            default:
+                Log.e(VolumePreference.TAG, "invalid SeekBarVolumizer message: "+msg.what);
+        }
+        return true;
+    }
+
+    private void postStartSample() {
+        mHandler.removeMessages(MSG_START_SAMPLE);
+        mHandler.sendMessageDelayed(mHandler.obtainMessage(MSG_START_SAMPLE),
+                isSamplePlaying() ? CHECK_RINGTONE_PLAYBACK_DELAY_MS : 0);
+    }
+
+    private void onStartSample() {
+        if (!isSamplePlaying()) {
+            if (mCallback != null) {
+                mCallback.onSampleStarting(this);
+            }
+            if (mRingtone != null) {
+                mRingtone.play();
+            }
+        }
+    }
+
+    void postStopSample() {
+        // remove pending delayed start messages
+        mHandler.removeMessages(MSG_START_SAMPLE);
+        mHandler.removeMessages(MSG_STOP_SAMPLE);
+        mHandler.sendMessage(mHandler.obtainMessage(MSG_STOP_SAMPLE));
+    }
+
+    private void onStopSample() {
+        if (mRingtone != null) {
+            mRingtone.stop();
+        }
+    }
+
+    public void stop() {
+        postStopSample();
+        mContext.getContentResolver().unregisterContentObserver(mVolumeObserver);
+        mSeekBar.setOnSeekBarChangeListener(null);
+    }
+
+    public void revertVolume() {
+        mAudioManager.setStreamVolume(mStreamType, mOriginalStreamVolume, 0);
+    }
+
+    public void onProgressChanged(SeekBar seekBar, int progress,
+            boolean fromTouch) {
+        if (!fromTouch) {
+            return;
+        }
+
+        postSetVolume(progress);
+    }
+
+    void postSetVolume(int progress) {
+        // Do the volume changing separately to give responsive UI
+        mLastProgress = progress;
+        mHandler.removeMessages(MSG_SET_STREAM_VOLUME);
+        mHandler.sendMessage(mHandler.obtainMessage(MSG_SET_STREAM_VOLUME));
+    }
+
+    public void onStartTrackingTouch(SeekBar seekBar) {
+    }
+
+    public void onStopTrackingTouch(SeekBar seekBar) {
+        postStartSample();
+    }
+
+    public boolean isSamplePlaying() {
+        return mRingtone != null && mRingtone.isPlaying();
+    }
+
+    public void startSample() {
+        postStartSample();
+    }
+
+    public void stopSample() {
+        postStopSample();
+    }
+
+    public SeekBar getSeekBar() {
+        return mSeekBar;
+    }
+
+    public void changeVolumeBy(int amount) {
+        mSeekBar.incrementProgressBy(amount);
+        postSetVolume(mSeekBar.getProgress());
+        postStartSample();
+        mVolumeBeforeMute = -1;
+    }
+
+    public void muteVolume() {
+        if (mVolumeBeforeMute != -1) {
+            mSeekBar.setProgress(mVolumeBeforeMute);
+            postSetVolume(mVolumeBeforeMute);
+            postStartSample();
+            mVolumeBeforeMute = -1;
+        } else {
+            mVolumeBeforeMute = mSeekBar.getProgress();
+            mSeekBar.setProgress(0);
+            postStopSample();
+            postSetVolume(0);
+        }
+    }
+
+    public void onSaveInstanceState(VolumeStore volumeStore) {
+        if (mLastProgress >= 0) {
+            volumeStore.volume = mLastProgress;
+            volumeStore.originalVolume = mOriginalStreamVolume;
+        }
+    }
+
+    public void onRestoreInstanceState(VolumeStore volumeStore) {
+        if (volumeStore.volume != -1) {
+            mOriginalStreamVolume = volumeStore.originalVolume;
+            mLastProgress = volumeStore.volume;
+            postSetVolume(mLastProgress);
+        }
+    }
+}
\ No newline at end of file
diff --git a/core/java/android/preference/VolumePreference.java b/core/java/android/preference/VolumePreference.java
index 39cb826..171e5c3 100644
--- a/core/java/android/preference/VolumePreference.java
+++ b/core/java/android/preference/VolumePreference.java
@@ -19,32 +19,20 @@
 import android.app.Dialog;
 import android.content.Context;
 import android.content.res.TypedArray;
-import android.database.ContentObserver;
-import android.media.AudioManager;
-import android.media.Ringtone;
-import android.media.RingtoneManager;
-import android.net.Uri;
-import android.os.Handler;
-import android.os.HandlerThread;
-import android.os.Message;
 import android.os.Parcel;
 import android.os.Parcelable;
-import android.provider.Settings;
-import android.provider.Settings.System;
 import android.util.AttributeSet;
-import android.util.Log;
 import android.view.KeyEvent;
 import android.view.View;
 import android.widget.SeekBar;
-import android.widget.SeekBar.OnSeekBarChangeListener;
 
 /**
  * @hide
  */
 public class VolumePreference extends SeekBarDialogPreference implements
-        PreferenceManager.OnActivityStopListener, View.OnKeyListener {
+        PreferenceManager.OnActivityStopListener, View.OnKeyListener, SeekBarVolumizer.Callback {
 
-    private static final String TAG = "VolumePreference";
+    static final String TAG = "VolumePreference";
 
     private int mStreamType;
 
@@ -78,7 +66,7 @@
         super.onBindDialogView(view);
 
         final SeekBar seekBar = (SeekBar) view.findViewById(com.android.internal.R.id.seekbar);
-        mSeekBarVolumizer = new SeekBarVolumizer(getContext(), seekBar, mStreamType);
+        mSeekBarVolumizer = new SeekBarVolumizer(getContext(), seekBar, mStreamType, null, this);
 
         getPreferenceManager().registerOnActivityStopListener(this);
 
@@ -152,7 +140,8 @@
 
     }
 
-    protected void onSampleStarting(SeekBarVolumizer volumizer) {
+    @Override
+    public void onSampleStarting(SeekBarVolumizer volumizer) {
         if (mSeekBarVolumizer != null && volumizer != mSeekBarVolumizer) {
             mSeekBarVolumizer.stopSample();
         }
@@ -228,213 +217,4 @@
             }
         };
     }
-
-    /**
-     * Turns a {@link SeekBar} into a volume control.
-     */
-    public class SeekBarVolumizer implements OnSeekBarChangeListener, Handler.Callback {
-
-        private Context mContext;
-        private Handler mHandler;
-
-        private AudioManager mAudioManager;
-        private int mStreamType;
-        private int mOriginalStreamVolume;
-        private Ringtone mRingtone;
-
-        private int mLastProgress = -1;
-        private SeekBar mSeekBar;
-        private int mVolumeBeforeMute = -1;
-
-        private static final int MSG_SET_STREAM_VOLUME = 0;
-        private static final int MSG_START_SAMPLE = 1;
-        private static final int MSG_STOP_SAMPLE = 2;
-        private static final int CHECK_RINGTONE_PLAYBACK_DELAY_MS = 1000;
-
-        private ContentObserver mVolumeObserver = new ContentObserver(mHandler) {
-            @Override
-            public void onChange(boolean selfChange) {
-                super.onChange(selfChange);
-                if (mSeekBar != null && mAudioManager != null) {
-                    int volume = mAudioManager.getStreamVolume(mStreamType);
-                    mSeekBar.setProgress(volume);
-                }
-            }
-        };
-
-        public SeekBarVolumizer(Context context, SeekBar seekBar, int streamType) {
-            this(context, seekBar, streamType, null);
-        }
-
-        public SeekBarVolumizer(Context context, SeekBar seekBar, int streamType, Uri defaultUri) {
-            mContext = context;
-            mAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
-            mStreamType = streamType;
-            mSeekBar = seekBar;
-
-            HandlerThread thread = new HandlerThread(TAG + ".CallbackHandler");
-            thread.start();
-            mHandler = new Handler(thread.getLooper(), this);
-
-            initSeekBar(seekBar, defaultUri);
-        }
-
-        private void initSeekBar(SeekBar seekBar, Uri defaultUri) {
-            seekBar.setMax(mAudioManager.getStreamMaxVolume(mStreamType));
-            mOriginalStreamVolume = mAudioManager.getStreamVolume(mStreamType);
-            seekBar.setProgress(mOriginalStreamVolume);
-            seekBar.setOnSeekBarChangeListener(this);
-
-            mContext.getContentResolver().registerContentObserver(
-                    System.getUriFor(System.VOLUME_SETTINGS[mStreamType]),
-                    false, mVolumeObserver);
-
-            if (defaultUri == null) {
-                if (mStreamType == AudioManager.STREAM_RING) {
-                    defaultUri = Settings.System.DEFAULT_RINGTONE_URI;
-                } else if (mStreamType == AudioManager.STREAM_NOTIFICATION) {
-                    defaultUri = Settings.System.DEFAULT_NOTIFICATION_URI;
-                } else {
-                    defaultUri = Settings.System.DEFAULT_ALARM_ALERT_URI;
-                }
-            }
-
-            mRingtone = RingtoneManager.getRingtone(mContext, defaultUri);
-
-            if (mRingtone != null) {
-                mRingtone.setStreamType(mStreamType);
-            }
-        }
-
-        @Override
-        public boolean handleMessage(Message msg) {
-            switch (msg.what) {
-                case MSG_SET_STREAM_VOLUME:
-                    mAudioManager.setStreamVolume(mStreamType, mLastProgress, 0);
-                    break;
-                case MSG_START_SAMPLE:
-                    onStartSample();
-                    break;
-                case MSG_STOP_SAMPLE:
-                    onStopSample();
-                    break;
-                default:
-                    Log.e(TAG, "invalid SeekBarVolumizer message: "+msg.what);
-            }
-            return true;
-        }
-
-        private void postStartSample() {
-            mHandler.removeMessages(MSG_START_SAMPLE);
-            mHandler.sendMessageDelayed(mHandler.obtainMessage(MSG_START_SAMPLE),
-                    isSamplePlaying() ? CHECK_RINGTONE_PLAYBACK_DELAY_MS : 0);
-        }
-
-        private void onStartSample() {
-            if (!isSamplePlaying()) {
-                onSampleStarting(this);
-                if (mRingtone != null) {
-                    mRingtone.play();
-                }
-            }
-        }
-
-        private void postStopSample() {
-            // remove pending delayed start messages
-            mHandler.removeMessages(MSG_START_SAMPLE);
-            mHandler.removeMessages(MSG_STOP_SAMPLE);
-            mHandler.sendMessage(mHandler.obtainMessage(MSG_STOP_SAMPLE));
-        }
-
-        private void onStopSample() {
-            if (mRingtone != null) {
-                mRingtone.stop();
-            }
-        }
-
-        public void stop() {
-            postStopSample();
-            mContext.getContentResolver().unregisterContentObserver(mVolumeObserver);
-            mSeekBar.setOnSeekBarChangeListener(null);
-        }
-
-        public void revertVolume() {
-            mAudioManager.setStreamVolume(mStreamType, mOriginalStreamVolume, 0);
-        }
-
-        public void onProgressChanged(SeekBar seekBar, int progress,
-                boolean fromTouch) {
-            if (!fromTouch) {
-                return;
-            }
-
-            postSetVolume(progress);
-        }
-
-        void postSetVolume(int progress) {
-            // Do the volume changing separately to give responsive UI
-            mLastProgress = progress;
-            mHandler.removeMessages(MSG_SET_STREAM_VOLUME);
-            mHandler.sendMessage(mHandler.obtainMessage(MSG_SET_STREAM_VOLUME));
-        }
-
-        public void onStartTrackingTouch(SeekBar seekBar) {
-        }
-
-        public void onStopTrackingTouch(SeekBar seekBar) {
-            postStartSample();
-        }
-
-        public boolean isSamplePlaying() {
-            return mRingtone != null && mRingtone.isPlaying();
-        }
-
-        public void startSample() {
-            postStartSample();
-        }
-
-        public void stopSample() {
-            postStopSample();
-        }
-
-        public SeekBar getSeekBar() {
-            return mSeekBar;
-        }
-
-        public void changeVolumeBy(int amount) {
-            mSeekBar.incrementProgressBy(amount);
-            postSetVolume(mSeekBar.getProgress());
-            postStartSample();
-            mVolumeBeforeMute = -1;
-        }
-
-        public void muteVolume() {
-            if (mVolumeBeforeMute != -1) {
-                mSeekBar.setProgress(mVolumeBeforeMute);
-                postSetVolume(mVolumeBeforeMute);
-                postStartSample();
-                mVolumeBeforeMute = -1;
-            } else {
-                mVolumeBeforeMute = mSeekBar.getProgress();
-                mSeekBar.setProgress(0);
-                postStopSample();
-                postSetVolume(0);
-            }
-        }
-
-        public void onSaveInstanceState(VolumeStore volumeStore) {
-            if (mLastProgress >= 0) {
-                volumeStore.volume = mLastProgress;
-                volumeStore.originalVolume = mOriginalStreamVolume;
-            }
-        }
-
-        public void onRestoreInstanceState(VolumeStore volumeStore) {
-            if (volumeStore.volume != -1) {
-                mOriginalStreamVolume = volumeStore.originalVolume;
-                mLastProgress = volumeStore.volume;
-                postSetVolume(mLastProgress);
-            }
-        }
-    }
 }
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index cd28085..e896063 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -4556,6 +4556,12 @@
         public static final String PAYMENT_SERVICE_SEARCH_URI = "payment_service_search_uri";
 
         /**
+         * If enabled, intercepted notifications will be displayed (not suppressed) in zen mode.
+         * @hide
+         */
+        public static final String DISPLAY_INTERCEPTED_NOTIFICATIONS = "display_intercepted_notifications";
+
+        /**
          * This are the settings to be backed up.
          *
          * NOTE: Settings are backed up and restored in the order they appear
diff --git a/core/java/com/android/internal/app/WindowDecorActionBar.java b/core/java/com/android/internal/app/WindowDecorActionBar.java
index 79a8f44..a238ae3 100644
--- a/core/java/com/android/internal/app/WindowDecorActionBar.java
+++ b/core/java/com/android/internal/app/WindowDecorActionBar.java
@@ -183,7 +183,7 @@
 
     private void init(View decor) {
         mOverlayLayout = (ActionBarOverlayLayout) decor.findViewById(
-                com.android.internal.R.id.action_bar_overlay_layout);
+                com.android.internal.R.id.decor_content_parent);
         if (mOverlayLayout != null) {
             mOverlayLayout.setActionBarVisibilityCallback(this);
         }
diff --git a/core/java/com/android/internal/widget/ActionBarOverlayLayout.java b/core/java/com/android/internal/widget/ActionBarOverlayLayout.java
index 19d58bf..7ab4bed 100644
--- a/core/java/com/android/internal/widget/ActionBarOverlayLayout.java
+++ b/core/java/com/android/internal/widget/ActionBarOverlayLayout.java
@@ -19,26 +19,34 @@
 import android.animation.Animator;
 import android.animation.AnimatorListenerAdapter;
 import android.content.Context;
+import android.content.pm.ActivityInfo;
 import android.content.res.TypedArray;
 import android.graphics.Canvas;
 import android.graphics.Rect;
 import android.graphics.drawable.Drawable;
 import android.os.Build;
+import android.os.Parcelable;
 import android.util.AttributeSet;
 import android.util.IntProperty;
+import android.util.Log;
 import android.util.Property;
+import android.util.SparseArray;
+import android.view.KeyEvent;
+import android.view.Menu;
 import android.view.View;
 import android.view.ViewGroup;
 import android.view.ViewPropertyAnimator;
+import android.view.Window;
 import android.view.WindowInsets;
 import android.widget.OverScroller;
+import com.android.internal.view.menu.MenuPresenter;
 
 /**
  * Special layout for the containing of an overlay action bar (and its
  * content) to correctly handle fitting system windows when the content
  * has request that its layout ignore them.
  */
-public class ActionBarOverlayLayout extends ViewGroup {
+public class ActionBarOverlayLayout extends ViewGroup implements DecorContentParent {
     private static final String TAG = "ActionBarOverlayLayout";
 
     private int mActionBarHeight;
@@ -47,7 +55,7 @@
 
     // The main UI elements that we handle the layout of.
     private View mContent;
-    private View mActionBarBottom;
+    private ActionBarContainer mActionBarBottom;
     private ActionBarContainer mActionBarTop;
 
     // Some interior UI elements.
@@ -556,7 +564,8 @@
             mActionBarTop = (ActionBarContainer) findViewById(
                     com.android.internal.R.id.action_bar_container);
             mActionBarView = (ActionBarView) findViewById(com.android.internal.R.id.action_bar);
-            mActionBarBottom = findViewById(com.android.internal.R.id.split_action_bar);
+            mActionBarBottom = (ActionBarContainer) findViewById(
+                    com.android.internal.R.id.split_action_bar);
         }
     }
 
@@ -629,6 +638,179 @@
         return finalY > mActionBarTop.getHeight();
     }
 
+    @Override
+    public boolean dispatchKeyEvent(KeyEvent event) {
+        if (super.dispatchKeyEvent(event)) {
+            return true;
+        }
+
+        if (event.getKeyCode() == KeyEvent.KEYCODE_BACK) {
+            final int action = event.getAction();
+
+            // Collapse any expanded action views.
+            if (mActionBarView != null && mActionBarView.hasExpandedActionView()) {
+                if (action == KeyEvent.ACTION_UP) {
+                    mActionBarView.collapseActionView();
+                }
+                return true;
+            }
+        }
+
+        return false;
+    }
+
+    @Override
+    public void setWindowCallback(Window.Callback cb) {
+        pullChildren();
+        mActionBarView.setWindowCallback(cb);
+    }
+
+    @Override
+    public void setWindowTitle(CharSequence title) {
+        pullChildren();
+        mActionBarView.setWindowTitle(title);
+    }
+
+    @Override
+    public CharSequence getTitle() {
+        pullChildren();
+        return mActionBarView.getTitle();
+    }
+
+    @Override
+    public void initFeature(int windowFeature) {
+        pullChildren();
+        switch (windowFeature) {
+            case Window.FEATURE_PROGRESS:
+                mActionBarView.initProgress();
+                break;
+            case Window.FEATURE_INDETERMINATE_PROGRESS:
+                mActionBarView.initIndeterminateProgress();
+                break;
+            case Window.FEATURE_ACTION_BAR_OVERLAY:
+                setOverlayMode(true);
+                break;
+        }
+    }
+
+    @Override
+    public void setUiOptions(int uiOptions) {
+        boolean splitActionBar = false;
+        final boolean splitWhenNarrow =
+                (uiOptions & ActivityInfo.UIOPTION_SPLIT_ACTION_BAR_WHEN_NARROW) != 0;
+        if (splitWhenNarrow) {
+            splitActionBar = getContext().getResources().getBoolean(
+                    com.android.internal.R.bool.split_action_bar_is_narrow);
+        }
+        if (splitActionBar) {
+            pullChildren();
+            if (mActionBarBottom != null) {
+                mActionBarView.setSplitView(mActionBarBottom);
+                mActionBarView.setSplitActionBar(splitActionBar);
+                mActionBarView.setSplitWhenNarrow(splitWhenNarrow);
+
+                final ActionBarContextView cab = (ActionBarContextView) findViewById(
+                        com.android.internal.R.id.action_context_bar);
+                cab.setSplitView(mActionBarBottom);
+                cab.setSplitActionBar(splitActionBar);
+                cab.setSplitWhenNarrow(splitWhenNarrow);
+            } else if (splitActionBar) {
+                Log.e(TAG, "Requested split action bar with " +
+                        "incompatible window decor! Ignoring request.");
+            }
+        }
+    }
+
+    @Override
+    public boolean hasIcon() {
+        pullChildren();
+        return mActionBarView.hasIcon();
+    }
+
+    @Override
+    public boolean hasLogo() {
+        pullChildren();
+        return mActionBarView.hasLogo();
+    }
+
+    @Override
+    public void setIcon(int resId) {
+        pullChildren();
+        mActionBarView.setIcon(resId);
+    }
+
+    @Override
+    public void setIcon(Drawable d) {
+        pullChildren();
+        mActionBarView.setIcon(d);
+    }
+
+    @Override
+    public void setLogo(int resId) {
+        pullChildren();
+        mActionBarView.setLogo(resId);
+    }
+
+    @Override
+    public boolean canShowOverflowMenu() {
+        pullChildren();
+        return mActionBarView.isOverflowReserved() && mActionBarView.getVisibility() == VISIBLE;
+    }
+
+    @Override
+    public boolean isOverflowMenuShowing() {
+        pullChildren();
+        return mActionBarView.isOverflowMenuShowing();
+    }
+
+    @Override
+    public boolean isOverflowMenuShowPending() {
+        pullChildren();
+        return mActionBarView.isOverflowMenuShowPending();
+    }
+
+    @Override
+    public boolean showOverflowMenu() {
+        pullChildren();
+        return mActionBarView.showOverflowMenu();
+    }
+
+    @Override
+    public boolean hideOverflowMenu() {
+        pullChildren();
+        return mActionBarView.hideOverflowMenu();
+    }
+
+    @Override
+    public void setMenuPrepared() {
+        pullChildren();
+        mActionBarView.setMenuPrepared();
+    }
+
+    @Override
+    public void setMenu(Menu menu, MenuPresenter.Callback cb) {
+        pullChildren();
+        mActionBarView.setMenu(menu, cb);
+    }
+
+    @Override
+    public void saveToolbarHierarchyState(SparseArray<Parcelable> toolbarStates) {
+        pullChildren();
+        mActionBarView.saveHierarchyState(toolbarStates);
+    }
+
+    @Override
+    public void restoreToolbarHierarchyState(SparseArray<Parcelable> toolbarStates) {
+        pullChildren();
+        mActionBarView.restoreHierarchyState(toolbarStates);
+    }
+
+    @Override
+    public void dismissPopups() {
+        pullChildren();
+        mActionBarView.dismissPopupMenus();
+    }
+
     public static class LayoutParams extends MarginLayoutParams {
         public LayoutParams(Context c, AttributeSet attrs) {
             super(c, attrs);
diff --git a/core/java/com/android/internal/widget/DecorContentParent.java b/core/java/com/android/internal/widget/DecorContentParent.java
new file mode 100644
index 0000000..4fa370a
--- /dev/null
+++ b/core/java/com/android/internal/widget/DecorContentParent.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2014 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.internal.widget;
+
+import android.graphics.drawable.Drawable;
+import android.os.Parcelable;
+import android.util.SparseArray;
+import android.view.Menu;
+import android.view.Window;
+import com.android.internal.view.menu.MenuPresenter;
+
+/**
+ * Implemented by the top-level decor layout for a window. DecorContentParent offers
+ * entry points for a number of title/window decor features.
+ */
+public interface DecorContentParent {
+    void setWindowCallback(Window.Callback cb);
+    void setWindowTitle(CharSequence title);
+    CharSequence getTitle();
+    void initFeature(int windowFeature);
+    void setUiOptions(int uiOptions);
+    boolean hasIcon();
+    boolean hasLogo();
+    void setIcon(int resId);
+    void setIcon(Drawable d);
+    void setLogo(int resId);
+    boolean canShowOverflowMenu();
+    boolean isOverflowMenuShowing();
+    boolean isOverflowMenuShowPending();
+    boolean showOverflowMenu();
+    boolean hideOverflowMenu();
+    void setMenuPrepared();
+    void setMenu(Menu menu, MenuPresenter.Callback cb);
+    void saveToolbarHierarchyState(SparseArray<Parcelable> toolbarStates);
+    void restoreToolbarHierarchyState(SparseArray<Parcelable> toolbarStates);
+    void dismissPopups();
+
+}
diff --git a/core/res/res/layout-xlarge/screen_action_bar.xml b/core/res/res/layout-xlarge/screen_action_bar.xml
deleted file mode 100644
index 02c99fe..0000000
--- a/core/res/res/layout-xlarge/screen_action_bar.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2010 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.
--->
-
-<!--
-This is an optimized layout for a screen with
-the Action Bar enabled overlaying application content.
--->
-
-<com.android.internal.widget.ActionBarOverlayLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/action_bar_overlay_layout"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:splitMotionEvents="false">
-    <FrameLayout android:id="@android:id/content"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent" />
-    <com.android.internal.widget.ActionBarContainer
-        android:id="@+id/action_bar_container"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_alignParentTop="true"
-        style="?android:attr/actionBarStyle"
-        android:viewName="android:action_bar"
-        android:gravity="top">
-        <com.android.internal.widget.ActionBarView
-            android:id="@+id/action_bar"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            style="?android:attr/actionBarStyle" />
-        <com.android.internal.widget.ActionBarContextView
-            android:id="@+id/action_context_bar"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:visibility="gone"
-            style="?android:attr/actionModeStyle" />
-    </com.android.internal.widget.ActionBarContainer>
-</com.android.internal.widget.ActionBarOverlayLayout>
diff --git a/core/res/res/layout/screen_action_bar.xml b/core/res/res/layout/screen_action_bar.xml
index eb237b3..8bf8416 100644
--- a/core/res/res/layout/screen_action_bar.xml
+++ b/core/res/res/layout/screen_action_bar.xml
@@ -20,7 +20,7 @@
 
 <com.android.internal.widget.ActionBarOverlayLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/action_bar_overlay_layout"
+    android:id="@+id/decor_content_parent"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:splitMotionEvents="false"
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index 3746780..9fba1bf 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -355,10 +355,6 @@
              when there is not reserved space for their UI (such as an Action Bar). -->
         <attr name="windowActionModeOverlay" format="boolean" />
 
-        <!-- Flag indicating that the action bar should be split to provide more
-             room for elements. -->
-        <attr name="windowSplitActionBar" format="boolean" />
-
         <!-- Defines the default soft input state that this window would
              like when it is displayed.  Corresponds
              to {@link android.view.WindowManager.LayoutParams#softInputMode}. -->
@@ -1705,7 +1701,6 @@
         <attr name="windowActionBar" />
         <attr name="windowActionModeOverlay" />
         <attr name="windowActionBarOverlay" />
-        <attr name="windowSplitActionBar" />
         <attr name="windowEnableSplitTouch" />
         <attr name="windowCloseOnTouchOutside" />
         <attr name="windowTranslucentStatus" />
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 2f0ac49..2d60b86 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -31,7 +31,6 @@
   <java-symbol type="id" name="account_type" />
   <java-symbol type="id" name="action_bar" />
   <java-symbol type="id" name="action_bar_container" />
-  <java-symbol type="id" name="action_bar_overlay_layout" />
   <java-symbol type="id" name="action_bar_title" />
   <java-symbol type="id" name="action_bar_subtitle" />
   <java-symbol type="id" name="action_context_bar" />
@@ -61,6 +60,7 @@
   <java-symbol type="id" name="day" />
   <java-symbol type="id" name="day_names" />
   <java-symbol type="id" name="decrement" />
+  <java-symbol type="id" name="decor_content_parent" />
   <java-symbol type="id" name="default_activity_button" />
   <java-symbol type="id" name="deny_button" />
   <java-symbol type="id" name="description" />
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_airplane_off.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_airplane_off.png
deleted file mode 100644
index 6f48fe8..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_airplane_off.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_airplane_on.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_airplane_on.png
deleted file mode 100644
index 5f2e95a..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_airplane_on.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_bluetooth_not_connected.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_bluetooth_not_connected.png
deleted file mode 100644
index e417a19..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_bluetooth_not_connected.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_bluetooth_off.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_bluetooth_off.png
deleted file mode 100644
index f325220..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_bluetooth_off.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_bluetooth_on.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_bluetooth_on.png
deleted file mode 100644
index ee88a1b..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_bluetooth_on.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_cast_connecting_0.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_cast_connecting_0.png
deleted file mode 100644
index 48606a8..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_cast_connecting_0.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_cast_connecting_1.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_cast_connecting_1.png
deleted file mode 100644
index d006f13..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_cast_connecting_1.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_cast_connecting_2.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_cast_connecting_2.png
deleted file mode 100644
index 867947b..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_cast_connecting_2.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_color_space_alpha.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_color_space_alpha.png
deleted file mode 100644
index fe6dc52..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_color_space_alpha.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_inversion_alpha.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_inversion_alpha.png
deleted file mode 100644
index aea75c1..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_inversion_alpha.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_zen_full.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_zen_full.png
deleted file mode 100644
index fa23e85..0000000
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_zen_full.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_zen_limited.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_zen_limited.png
deleted file mode 100644
index aa8635c..0000000
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_zen_limited.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-ldrtl-hdpi/ic_qs_airplane_off.png b/packages/SystemUI/res/drawable-ldrtl-hdpi/ic_qs_airplane_off.png
deleted file mode 100644
index c36809b..0000000
--- a/packages/SystemUI/res/drawable-ldrtl-hdpi/ic_qs_airplane_off.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-ldrtl-hdpi/ic_qs_airplane_on.png b/packages/SystemUI/res/drawable-ldrtl-hdpi/ic_qs_airplane_on.png
deleted file mode 100644
index 6158c01..0000000
--- a/packages/SystemUI/res/drawable-ldrtl-hdpi/ic_qs_airplane_on.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-ldrtl-mdpi/ic_qs_airplane_off.png b/packages/SystemUI/res/drawable-ldrtl-mdpi/ic_qs_airplane_off.png
deleted file mode 100644
index 084799a..0000000
--- a/packages/SystemUI/res/drawable-ldrtl-mdpi/ic_qs_airplane_off.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-ldrtl-mdpi/ic_qs_airplane_on.png b/packages/SystemUI/res/drawable-ldrtl-mdpi/ic_qs_airplane_on.png
deleted file mode 100644
index c37ba79..0000000
--- a/packages/SystemUI/res/drawable-ldrtl-mdpi/ic_qs_airplane_on.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-ldrtl-xhdpi/ic_qs_airplane_off.png b/packages/SystemUI/res/drawable-ldrtl-xhdpi/ic_qs_airplane_off.png
deleted file mode 100644
index 714f07e..0000000
--- a/packages/SystemUI/res/drawable-ldrtl-xhdpi/ic_qs_airplane_off.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-ldrtl-xhdpi/ic_qs_airplane_on.png b/packages/SystemUI/res/drawable-ldrtl-xhdpi/ic_qs_airplane_on.png
deleted file mode 100644
index d59f0e92..0000000
--- a/packages/SystemUI/res/drawable-ldrtl-xhdpi/ic_qs_airplane_on.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-ldrtl-xxhdpi/ic_qs_airplane_off.png b/packages/SystemUI/res/drawable-ldrtl-xxhdpi/ic_qs_airplane_off.png
deleted file mode 100644
index 6fc556d..0000000
--- a/packages/SystemUI/res/drawable-ldrtl-xxhdpi/ic_qs_airplane_off.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-ldrtl-xxhdpi/ic_qs_airplane_on.png b/packages/SystemUI/res/drawable-ldrtl-xxhdpi/ic_qs_airplane_on.png
deleted file mode 100644
index a2342fc..0000000
--- a/packages/SystemUI/res/drawable-ldrtl-xxhdpi/ic_qs_airplane_on.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_airplane_off.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_airplane_off.png
deleted file mode 100644
index 95df4d45..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_airplane_off.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_airplane_on.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_airplane_on.png
deleted file mode 100644
index 251fc30..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_airplane_on.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_bluetooth_not_connected.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_bluetooth_not_connected.png
deleted file mode 100644
index b01b27f..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_bluetooth_not_connected.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_bluetooth_off.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_bluetooth_off.png
deleted file mode 100644
index 541e801..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_bluetooth_off.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_bluetooth_on.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_bluetooth_on.png
deleted file mode 100644
index 0acf3a4..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_bluetooth_on.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_cast_connecting_0.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_cast_connecting_0.png
deleted file mode 100644
index 25fc759..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_cast_connecting_0.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_cast_connecting_1.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_cast_connecting_1.png
deleted file mode 100644
index 9dfc3c6..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_cast_connecting_1.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_cast_connecting_2.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_cast_connecting_2.png
deleted file mode 100644
index 82f4113..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_cast_connecting_2.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_color_space_alpha.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_color_space_alpha.png
deleted file mode 100644
index 18b6029..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_color_space_alpha.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_inversion_alpha.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_inversion_alpha.png
deleted file mode 100644
index b6ea14e..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_inversion_alpha.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_zen_full.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_zen_full.png
deleted file mode 100644
index b0185a5..0000000
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_zen_full.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_zen_limited.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_zen_limited.png
deleted file mode 100644
index 949ab10..0000000
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_zen_limited.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_airplane_off.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_airplane_off.png
deleted file mode 100644
index 4411097..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_airplane_off.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_airplane_on.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_airplane_on.png
deleted file mode 100644
index 79e4ff6..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_airplane_on.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_bluetooth_not_connected.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_bluetooth_not_connected.png
deleted file mode 100644
index ce965c2..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_bluetooth_not_connected.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_bluetooth_off.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_bluetooth_off.png
deleted file mode 100644
index c798fd6..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_bluetooth_off.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_bluetooth_on.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_bluetooth_on.png
deleted file mode 100644
index ac5b09d..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_bluetooth_on.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_cast_connecting_0.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_cast_connecting_0.png
deleted file mode 100644
index 945c606..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_cast_connecting_0.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_cast_connecting_1.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_cast_connecting_1.png
deleted file mode 100644
index 0a3f73e..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_cast_connecting_1.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_cast_connecting_2.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_cast_connecting_2.png
deleted file mode 100644
index 398cbef..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_cast_connecting_2.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_color_space_alpha.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_color_space_alpha.png
deleted file mode 100644
index 95cf67f..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_color_space_alpha.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_inversion_alpha.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_inversion_alpha.png
deleted file mode 100644
index efd8b9e..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_inversion_alpha.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_zen_full.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_zen_full.png
deleted file mode 100644
index 7f7cb63..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/stat_sys_zen_full.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_zen_limited.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_zen_limited.png
deleted file mode 100644
index abdeb3b..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/stat_sys_zen_limited.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_airplane_off.png b/packages/SystemUI/res/drawable-xxhdpi/ic_qs_airplane_off.png
deleted file mode 100644
index 65b0204..0000000
--- a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_airplane_off.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_airplane_on.png b/packages/SystemUI/res/drawable-xxhdpi/ic_qs_airplane_on.png
deleted file mode 100644
index dd16165..0000000
--- a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_airplane_on.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_bluetooth_not_connected.png b/packages/SystemUI/res/drawable-xxhdpi/ic_qs_bluetooth_not_connected.png
deleted file mode 100644
index c5b7333..0000000
--- a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_bluetooth_not_connected.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_bluetooth_off.png b/packages/SystemUI/res/drawable-xxhdpi/ic_qs_bluetooth_off.png
deleted file mode 100644
index 1045e07..0000000
--- a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_bluetooth_off.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_bluetooth_on.png b/packages/SystemUI/res/drawable-xxhdpi/ic_qs_bluetooth_on.png
deleted file mode 100644
index 7c20110..0000000
--- a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_bluetooth_on.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_cast_connecting_0.png b/packages/SystemUI/res/drawable-xxhdpi/ic_qs_cast_connecting_0.png
deleted file mode 100644
index 4621d18..0000000
--- a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_cast_connecting_0.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_cast_connecting_1.png b/packages/SystemUI/res/drawable-xxhdpi/ic_qs_cast_connecting_1.png
deleted file mode 100644
index a1ab61b..0000000
--- a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_cast_connecting_1.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_cast_connecting_2.png b/packages/SystemUI/res/drawable-xxhdpi/ic_qs_cast_connecting_2.png
deleted file mode 100644
index ea42a7f..0000000
--- a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_cast_connecting_2.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_color_space_alpha.png b/packages/SystemUI/res/drawable-xxhdpi/ic_qs_color_space_alpha.png
deleted file mode 100644
index 7f441c8..0000000
--- a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_color_space_alpha.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_inversion_alpha.png b/packages/SystemUI/res/drawable-xxhdpi/ic_qs_inversion_alpha.png
deleted file mode 100644
index ce9bae2..0000000
--- a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_inversion_alpha.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xxhdpi/stat_sys_zen_full.png b/packages/SystemUI/res/drawable-xxhdpi/stat_sys_zen_full.png
deleted file mode 100644
index afe85b4..0000000
--- a/packages/SystemUI/res/drawable-xxhdpi/stat_sys_zen_full.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xxhdpi/stat_sys_zen_limited.png b/packages/SystemUI/res/drawable-xxhdpi/stat_sys_zen_limited.png
deleted file mode 100644
index 5e5053f..0000000
--- a/packages/SystemUI/res/drawable-xxhdpi/stat_sys_zen_limited.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable/ic_location_off_anim.xml b/packages/SystemUI/res/drawable/ic_location_off_anim.xml
deleted file mode 100644
index 864eda1..0000000
--- a/packages/SystemUI/res/drawable/ic_location_off_anim.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-Copyright (C) 2014 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.
--->
-<animation-list
-        xmlns:android="http://schemas.android.com/apk/res/android"
-        android:oneshot="true">
-    <item android:drawable="@drawable/ic_location_24_01" android:duration="16" />
-    <item android:drawable="@drawable/ic_location_24_02" android:duration="16" />
-    <item android:drawable="@drawable/ic_location_24_03" android:duration="16" />
-    <item android:drawable="@drawable/ic_location_24_04" android:duration="16" />
-    <item android:drawable="@drawable/ic_location_24_05" android:duration="16" />
-    <item android:drawable="@drawable/ic_location_24_06" android:duration="16" />
-    <item android:drawable="@drawable/ic_location_24_07" android:duration="16" />
-    <item android:drawable="@drawable/ic_location_24_08" android:duration="16" />
-    <item android:drawable="@drawable/ic_location_24_09" android:duration="16" />
-    <item android:drawable="@drawable/ic_location_24_10" android:duration="16" />
-    <item android:drawable="@drawable/ic_location_24_11" android:duration="16" />
-</animation-list>
diff --git a/packages/SystemUI/res/drawable/ic_location_on_anim.xml b/packages/SystemUI/res/drawable/ic_location_on_anim.xml
deleted file mode 100644
index 65a8afe..0000000
--- a/packages/SystemUI/res/drawable/ic_location_on_anim.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-Copyright (C) 2014 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.
--->
-<animation-list
-        xmlns:android="http://schemas.android.com/apk/res/android"
-        android:oneshot="true">
-    <item android:drawable="@drawable/ic_location_24_11" android:duration="16" />
-    <item android:drawable="@drawable/ic_location_24_10" android:duration="16" />
-    <item android:drawable="@drawable/ic_location_24_09" android:duration="16" />
-    <item android:drawable="@drawable/ic_location_24_08" android:duration="16" />
-    <item android:drawable="@drawable/ic_location_24_07" android:duration="16" />
-    <item android:drawable="@drawable/ic_location_24_06" android:duration="16" />
-    <item android:drawable="@drawable/ic_location_24_05" android:duration="16" />
-    <item android:drawable="@drawable/ic_location_24_04" android:duration="16" />
-    <item android:drawable="@drawable/ic_location_24_03" android:duration="16" />
-    <item android:drawable="@drawable/ic_location_24_02" android:duration="16" />
-    <item android:drawable="@drawable/ic_location_24_01" android:duration="16" />
-</animation-list>
diff --git a/packages/SystemUI/res/drawable/ic_qs_airplane.xml b/packages/SystemUI/res/drawable/ic_qs_airplane_off.xml
similarity index 85%
copy from packages/SystemUI/res/drawable/ic_qs_airplane.xml
copy to packages/SystemUI/res/drawable/ic_qs_airplane_off.xml
index ffe571f..9f0ec67 100644
--- a/packages/SystemUI/res/drawable/ic_qs_airplane.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_airplane_off.xml
@@ -23,9 +23,13 @@
         android:viewportHeight="24.0"/>
 
     <path
-        android:fill="#FF000000"
+        android:fill="#00000000"
+        android:stroke="#CCCCCC"
+        android:strokeWidth="1.0"
         android:pathData="M10.2,9.0"/>
     <path
-        android:fill="#FF000000"
+        android:fill="#00000000"
+        android:stroke="#CCCCCC"
+        android:strokeWidth="1.0"
         android:pathData="M21.0,16.0l0.0,-2.0l-8.0,-5.0L13.0,3.5C13.0,2.7 12.3,2.0 11.5,2.0C10.7,2.0 10.0,2.7 10.0,3.5L10.0,9.0l-8.0,5.0l0.0,2.0l8.0,-2.5L10.0,19.0l-2.0,1.5L8.0,22.0l3.5,-1.0l3.5,1.0l0.0,-1.5L13.0,19.0l0.0,-5.5L21.0,16.0z"/>
 </vector>
diff --git a/packages/SystemUI/res/drawable/ic_qs_airplane.xml b/packages/SystemUI/res/drawable/ic_qs_airplane_on.xml
similarity index 94%
rename from packages/SystemUI/res/drawable/ic_qs_airplane.xml
rename to packages/SystemUI/res/drawable/ic_qs_airplane_on.xml
index ffe571f..95c20bb 100644
--- a/packages/SystemUI/res/drawable/ic_qs_airplane.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_airplane_on.xml
@@ -23,9 +23,9 @@
         android:viewportHeight="24.0"/>
 
     <path
-        android:fill="#FF000000"
+        android:fill="#FFFFFFFF"
         android:pathData="M10.2,9.0"/>
     <path
-        android:fill="#FF000000"
+        android:fill="#FFFFFFFF"
         android:pathData="M21.0,16.0l0.0,-2.0l-8.0,-5.0L13.0,3.5C13.0,2.7 12.3,2.0 11.5,2.0C10.7,2.0 10.0,2.7 10.0,3.5L10.0,9.0l-8.0,5.0l0.0,2.0l8.0,-2.5L10.0,19.0l-2.0,1.5L8.0,22.0l3.5,-1.0l3.5,1.0l0.0,-1.5L13.0,19.0l0.0,-5.5L21.0,16.0z"/>
 </vector>
diff --git a/packages/SystemUI/res/drawable/ic_qs_bluetooth.xml b/packages/SystemUI/res/drawable/ic_qs_bluetooth_connected.xml
similarity index 96%
rename from packages/SystemUI/res/drawable/ic_qs_bluetooth.xml
rename to packages/SystemUI/res/drawable/ic_qs_bluetooth_connected.xml
index 22d0dcf..61a7777 100644
--- a/packages/SystemUI/res/drawable/ic_qs_bluetooth.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_bluetooth_connected.xml
@@ -23,6 +23,6 @@
         android:viewportHeight="24.0"/>
 
     <path
-        android:fill="#FF000000"
+        android:fill="#FFFFFFFF"
         android:pathData="M17.7,7.7L12.0,2.0l-1.0,0.0l0.0,7.6L6.4,5.0L5.0,6.4l5.6,5.6L5.0,17.6L6.4,19.0l4.6,-4.6L11.0,22.0l1.0,0.0l5.7,-5.7L13.4,12.0L17.7,7.7zM13.0,5.8l1.9,1.9L13.0,9.6L13.0,5.8zM14.9,16.3L13.0,18.2l0.0,-3.8L14.9,16.3z"/>
 </vector>
diff --git a/packages/SystemUI/res/drawable/ic_qs_bluetooth.xml b/packages/SystemUI/res/drawable/ic_qs_bluetooth_off.xml
similarity index 91%
copy from packages/SystemUI/res/drawable/ic_qs_bluetooth.xml
copy to packages/SystemUI/res/drawable/ic_qs_bluetooth_off.xml
index 22d0dcf..7ac1cb9 100644
--- a/packages/SystemUI/res/drawable/ic_qs_bluetooth.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_bluetooth_off.xml
@@ -23,6 +23,8 @@
         android:viewportHeight="24.0"/>
 
     <path
-        android:fill="#FF000000"
+        android:fill="#00000000"
+        android:stroke="#CCCCCC"
+        android:strokeWidth="1.0"
         android:pathData="M17.7,7.7L12.0,2.0l-1.0,0.0l0.0,7.6L6.4,5.0L5.0,6.4l5.6,5.6L5.0,17.6L6.4,19.0l4.6,-4.6L11.0,22.0l1.0,0.0l5.7,-5.7L13.4,12.0L17.7,7.7zM13.0,5.8l1.9,1.9L13.0,9.6L13.0,5.8zM14.9,16.3L13.0,18.2l0.0,-3.8L14.9,16.3z"/>
 </vector>
diff --git a/packages/SystemUI/res/drawable/ic_qs_bluetooth.xml b/packages/SystemUI/res/drawable/ic_qs_bluetooth_on.xml
similarity index 96%
copy from packages/SystemUI/res/drawable/ic_qs_bluetooth.xml
copy to packages/SystemUI/res/drawable/ic_qs_bluetooth_on.xml
index 22d0dcf..61a7777 100644
--- a/packages/SystemUI/res/drawable/ic_qs_bluetooth.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_bluetooth_on.xml
@@ -23,6 +23,6 @@
         android:viewportHeight="24.0"/>
 
     <path
-        android:fill="#FF000000"
+        android:fill="#FFFFFFFF"
         android:pathData="M17.7,7.7L12.0,2.0l-1.0,0.0l0.0,7.6L6.4,5.0L5.0,6.4l5.6,5.6L5.0,17.6L6.4,19.0l4.6,-4.6L11.0,22.0l1.0,0.0l5.7,-5.7L13.4,12.0L17.7,7.7zM13.0,5.8l1.9,1.9L13.0,9.6L13.0,5.8zM14.9,16.3L13.0,18.2l0.0,-3.8L14.9,16.3z"/>
 </vector>
diff --git a/packages/SystemUI/res/drawable/ic_qs_bugreport.xml b/packages/SystemUI/res/drawable/ic_qs_bugreport.xml
index 2dfe183..2958848 100644
--- a/packages/SystemUI/res/drawable/ic_qs_bugreport.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_bugreport.xml
@@ -23,6 +23,6 @@
         android:viewportHeight="24.0"/>
 
     <path
-        android:fill="#FF000000"
+        android:fill="#FFFFFFFF"
         android:pathData="M20.0,8.0l-2.8,0.0c-0.5,-0.8 -1.1,-1.5 -1.8,-2.0L17.0,4.4L15.6,3.0l-2.2,2.2C13.0,5.1 12.5,5.0 12.0,5.0s-1.0,0.1 -1.4,0.2L8.4,3.0L7.0,4.4L8.6,6.0C7.9,6.5 7.3,7.2 6.8,8.0L4.0,8.0l0.0,2.0l2.1,0.0C6.0,10.3 6.0,10.7 6.0,11.0l0.0,1.0L4.0,12.0l0.0,2.0l2.0,0.0l0.0,1.0c0.0,0.3 0.0,0.7 0.1,1.0L4.0,16.0l0.0,2.0l2.8,0.0c1.0,1.8 3.0,3.0 5.2,3.0s4.2,-1.2 5.2,-3.0L20.0,18.0l0.0,-2.0l-2.1,0.0c0.1,-0.3 0.1,-0.7 0.1,-1.0l0.0,-1.0l2.0,0.0l0.0,-2.0l-2.0,0.0l0.0,-1.0c0.0,-0.3 0.0,-0.7 -0.1,-1.0L20.0,10.0L20.0,8.0zM14.0,16.0l-4.0,0.0l0.0,-2.0l4.0,0.0L14.0,16.0zM14.0,12.0l-4.0,0.0l0.0,-2.0l4.0,0.0L14.0,12.0z"/>
 </vector>
diff --git a/packages/SystemUI/res/drawable/ic_qs_cast_connecting.xml b/packages/SystemUI/res/drawable/ic_qs_cast_connecting.xml
deleted file mode 100644
index 70db2a9..0000000
--- a/packages/SystemUI/res/drawable/ic_qs_cast_connecting.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright 2013, 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.
- */
--->
-<animation-list
-        xmlns:android="http://schemas.android.com/apk/res/android"
-        android:oneshot="false">
-    <item android:drawable="@drawable/ic_qs_cast_connecting_0" android:duration="500" />
-    <item android:drawable="@drawable/ic_qs_cast_connecting_1" android:duration="500" />
-    <item android:drawable="@drawable/ic_qs_cast_connecting_2" android:duration="500" />
-    <item android:drawable="@drawable/ic_qs_cast_connecting_1" android:duration="500" />
-</animation-list>
diff --git a/packages/SystemUI/res/drawable/ic_qs_cast.xml b/packages/SystemUI/res/drawable/ic_qs_cast_off.xml
similarity index 92%
copy from packages/SystemUI/res/drawable/ic_qs_cast.xml
copy to packages/SystemUI/res/drawable/ic_qs_cast_off.xml
index 6f2840b..130c639 100644
--- a/packages/SystemUI/res/drawable/ic_qs_cast.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_cast_off.xml
@@ -23,6 +23,8 @@
         android:viewportHeight="24.0"/>
 
     <path
-        android:fill="#FF000000"
+        android:fill="#00000000"
+        android:stroke="#CCCCCC"
+        android:strokeWidth="1.0"
         android:pathData="M21.0,3.0L3.0,3.0C1.9,3.0 1.0,3.9 1.0,5.0l0.0,3.0l2.0,0.0L3.0,5.0l18.0,0.0l0.0,14.0l-7.0,0.0l0.0,2.0l7.0,0.0c1.1,0.0 2.0,-0.9 2.0,-2.0L23.0,5.0C23.0,3.9 22.1,3.0 21.0,3.0zM1.0,18.0l0.0,3.0l3.0,0.0C4.0,19.3 2.7,18.0 1.0,18.0zM1.0,14.0l0.0,2.0c2.8,0.0 5.0,2.2 5.0,5.0l2.0,0.0C8.0,17.1 4.9,14.0 1.0,14.0zM1.0,10.0l0.0,2.0c5.0,0.0 9.0,4.0 9.0,9.0l2.0,0.0C12.0,14.9 7.1,10.0 1.0,10.0z"/>
 </vector>
diff --git a/packages/SystemUI/res/drawable/ic_qs_cast.xml b/packages/SystemUI/res/drawable/ic_qs_cast_on.xml
similarity index 97%
rename from packages/SystemUI/res/drawable/ic_qs_cast.xml
rename to packages/SystemUI/res/drawable/ic_qs_cast_on.xml
index 6f2840b..6c82b1c 100644
--- a/packages/SystemUI/res/drawable/ic_qs_cast.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_cast_on.xml
@@ -23,6 +23,6 @@
         android:viewportHeight="24.0"/>
 
     <path
-        android:fill="#FF000000"
+        android:fill="#FFFFFFFF"
         android:pathData="M21.0,3.0L3.0,3.0C1.9,3.0 1.0,3.9 1.0,5.0l0.0,3.0l2.0,0.0L3.0,5.0l18.0,0.0l0.0,14.0l-7.0,0.0l0.0,2.0l7.0,0.0c1.1,0.0 2.0,-0.9 2.0,-2.0L23.0,5.0C23.0,3.9 22.1,3.0 21.0,3.0zM1.0,18.0l0.0,3.0l3.0,0.0C4.0,19.3 2.7,18.0 1.0,18.0zM1.0,14.0l0.0,2.0c2.8,0.0 5.0,2.2 5.0,5.0l2.0,0.0C8.0,17.1 4.9,14.0 1.0,14.0zM1.0,10.0l0.0,2.0c5.0,0.0 9.0,4.0 9.0,9.0l2.0,0.0C12.0,14.9 7.1,10.0 1.0,10.0z"/>
 </vector>
diff --git a/packages/SystemUI/res/drawable/ic_qs_close.xml b/packages/SystemUI/res/drawable/ic_qs_close.xml
index c2c72c8..dd43e6c 100644
--- a/packages/SystemUI/res/drawable/ic_qs_close.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_close.xml
@@ -23,6 +23,6 @@
         android:viewportHeight="24.0"/>
 
     <path
-        android:fill="#FF000000"
+        android:fill="#FFFFFFFF"
         android:pathData="M19.0,6.4l-1.3999996,-1.4000001 -5.6000004,5.6000004 -5.6,-5.6000004 -1.4000001,1.4000001 5.6000004,5.6 -5.6000004,5.6000004 1.4000001,1.3999996 5.6,-5.6000004 5.6000004,5.6000004 1.3999996,-1.3999996 -5.6000004,-5.6000004z"/>
 </vector>
diff --git a/packages/SystemUI/res/drawable/ic_qs_invert_colors.xml b/packages/SystemUI/res/drawable/ic_qs_color_inversion.xml
similarity index 97%
rename from packages/SystemUI/res/drawable/ic_qs_invert_colors.xml
rename to packages/SystemUI/res/drawable/ic_qs_color_inversion.xml
index 7c92052..dc30a53 100644
--- a/packages/SystemUI/res/drawable/ic_qs_invert_colors.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_color_inversion.xml
@@ -23,6 +23,6 @@
         android:viewportHeight="24.0"/>
 
     <path
-        android:fill="#FF000000"
+        android:fill="#FFFFFFFF"
         android:pathData="M18.939,7.244c-5.887,-5.885 -6.214,-6.214 -6.222,-6.222l-0.707,-0.737L5.088,7.207c-2.914,2.915 -3.74,6.629 -2.266,10.19c1.541,3.719 5.312,6.316 9.174,6.317l0.0,0.0c3.861,-0.001 7.636,-2.603 9.179,-6.328C22.646,13.834 21.832,10.138 18.939,7.244zM4.67,16.632c-1.149,-2.776 -0.481,-5.696 1.832,-8.011l5.494,-5.492c0.0,0.002 0.002,0.003 0.003,0.004l0.0,18.582c-0.001,0.0 -0.002,0.0 -0.003,0.0C8.922,21.714 5.91,19.624 4.67,16.632z"/>
 </vector>
diff --git a/packages/SystemUI/res/drawable/ic_qs_color_space_off.xml b/packages/SystemUI/res/drawable/ic_qs_color_space_off.xml
deleted file mode 100644
index cf34ba6..0000000
--- a/packages/SystemUI/res/drawable/ic_qs_color_space_off.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-     Copyright (C) 2014 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.
--->
-
-<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
-    android:src="@drawable/ic_qs_color_space_alpha"
-    android:tint="@color/ic_qs_off" />
diff --git a/packages/SystemUI/res/drawable/ic_qs_color_space_on.xml b/packages/SystemUI/res/drawable/ic_qs_color_space_on.xml
deleted file mode 100644
index 1806688..0000000
--- a/packages/SystemUI/res/drawable/ic_qs_color_space_on.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-     Copyright (C) 2014 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.
--->
-
-<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
-    android:src="@drawable/ic_qs_color_space_alpha"
-    android:tint="@color/ic_qs_on" />
diff --git a/packages/SystemUI/res/drawable/ic_qs_hotspot.xml b/packages/SystemUI/res/drawable/ic_qs_hotspot_off.xml
similarity index 93%
copy from packages/SystemUI/res/drawable/ic_qs_hotspot.xml
copy to packages/SystemUI/res/drawable/ic_qs_hotspot_off.xml
index 965e3c1..7a62212 100644
--- a/packages/SystemUI/res/drawable/ic_qs_hotspot.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_hotspot_off.xml
@@ -23,6 +23,8 @@
         android:viewportHeight="24.0"/>
 
     <path
-        android:fill="#FF000000"
+        android:fill="#00000000"
+        android:stroke="#CCCCCC"
+        android:strokeWidth="1.0"
         android:pathData="M12.0,11.0c-1.1,0.0 -2.0,0.9 -2.0,2.0c0.0,1.1 0.9,2.0 2.0,2.0c1.1,0.0 2.0,-0.9 2.0,-2.0C14.0,11.9 13.1,11.0 12.0,11.0zM18.0,13.0c0.0,-3.3 -2.7,-6.0 -6.0,-6.0c-3.3,0.0 -6.0,2.7 -6.0,6.0c0.0,2.2 1.2,4.1 3.0,5.2l1.0,-1.7c-1.2,-0.7 -2.0,-2.0 -2.0,-3.4c0.0,-2.2 1.8,-4.0 4.0,-4.0s4.0,1.8 4.0,4.0c0.0,1.5 -0.8,2.8 -2.0,3.4l1.0,1.7C16.8,17.1 18.0,15.2 18.0,13.0zM12.0,3.0C6.5,3.0 2.0,7.5 2.0,13.0c0.0,3.7 2.0,6.9 5.0,8.6l1.0,-1.7c-2.4,-1.4 -4.0,-4.0 -4.0,-6.9c0.0,-4.4 3.6,-8.0 8.0,-8.0s8.0,3.6 8.0,8.0c0.0,3.0 -1.6,5.5 -4.0,6.9l1.0,1.7c3.0,-1.7 5.0,-5.0 5.0,-8.6C22.0,7.5 17.5,3.0 12.0,3.0z"/>
 </vector>
diff --git a/packages/SystemUI/res/drawable/ic_qs_hotspot.xml b/packages/SystemUI/res/drawable/ic_qs_hotspot_on.xml
similarity index 97%
rename from packages/SystemUI/res/drawable/ic_qs_hotspot.xml
rename to packages/SystemUI/res/drawable/ic_qs_hotspot_on.xml
index 965e3c1..3ccdd81 100644
--- a/packages/SystemUI/res/drawable/ic_qs_hotspot.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_hotspot_on.xml
@@ -23,6 +23,6 @@
         android:viewportHeight="24.0"/>
 
     <path
-        android:fill="#FF000000"
+        android:fill="#FFFFFFFF"
         android:pathData="M12.0,11.0c-1.1,0.0 -2.0,0.9 -2.0,2.0c0.0,1.1 0.9,2.0 2.0,2.0c1.1,0.0 2.0,-0.9 2.0,-2.0C14.0,11.9 13.1,11.0 12.0,11.0zM18.0,13.0c0.0,-3.3 -2.7,-6.0 -6.0,-6.0c-3.3,0.0 -6.0,2.7 -6.0,6.0c0.0,2.2 1.2,4.1 3.0,5.2l1.0,-1.7c-1.2,-0.7 -2.0,-2.0 -2.0,-3.4c0.0,-2.2 1.8,-4.0 4.0,-4.0s4.0,1.8 4.0,4.0c0.0,1.5 -0.8,2.8 -2.0,3.4l1.0,1.7C16.8,17.1 18.0,15.2 18.0,13.0zM12.0,3.0C6.5,3.0 2.0,7.5 2.0,13.0c0.0,3.7 2.0,6.9 5.0,8.6l1.0,-1.7c-2.4,-1.4 -4.0,-4.0 -4.0,-6.9c0.0,-4.4 3.6,-8.0 8.0,-8.0s8.0,3.6 8.0,8.0c0.0,3.0 -1.6,5.5 -4.0,6.9l1.0,1.7c3.0,-1.7 5.0,-5.0 5.0,-8.6C22.0,7.5 17.5,3.0 12.0,3.0z"/>
 </vector>
diff --git a/packages/SystemUI/res/drawable/ic_qs_inversion_off.xml b/packages/SystemUI/res/drawable/ic_qs_inversion_off.xml
deleted file mode 100644
index 9018a90..0000000
--- a/packages/SystemUI/res/drawable/ic_qs_inversion_off.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-     Copyright (C) 2014 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.
--->
-
-<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
-    android:src="@drawable/ic_qs_inversion_alpha"
-    android:tint="@color/ic_qs_off" />
diff --git a/packages/SystemUI/res/drawable/ic_qs_inversion_on.xml b/packages/SystemUI/res/drawable/ic_qs_inversion_on.xml
deleted file mode 100644
index 9110201..0000000
--- a/packages/SystemUI/res/drawable/ic_qs_inversion_on.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-     Copyright (C) 2014 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.
--->
-
-<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
-    android:src="@drawable/ic_qs_inversion_alpha"
-    android:tint="@color/ic_qs_on" />
diff --git a/packages/SystemUI/res/drawable/ic_qs_location.xml b/packages/SystemUI/res/drawable/ic_qs_location.xml
deleted file mode 100644
index e6e98a0..0000000
--- a/packages/SystemUI/res/drawable/ic_qs_location.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<!--
-Copyright (C) 2014 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.
--->
-<vector xmlns:android="http://schemas.android.com/apk/res/android" >
-    <size
-        android:width="64dp"
-        android:height="64dp"/>
-
-    <viewport
-        android:viewportWidth="24.0"
-        android:viewportHeight="24.0"/>
-
-    <path
-        android:fill="#FF000000"
-        android:pathData="M12.0,2.0C8.1,2.0 5.0,5.1 5.0,9.0c0.0,5.2 7.0,13.0 7.0,13.0s7.0,-7.8 7.0,-13.0C19.0,5.1 15.9,2.0 12.0,2.0zM12.0,11.5c-1.4,0.0 -2.5,-1.1 -2.5,-2.5s1.1,-2.5 2.5,-2.5c1.4,0.0 2.5,1.1 2.5,2.5S13.4,11.5 12.0,11.5z"/>
-</vector>
diff --git a/packages/SystemUI/res/drawable/ic_location_24_01.xml b/packages/SystemUI/res/drawable/ic_qs_location_01.xml
similarity index 100%
rename from packages/SystemUI/res/drawable/ic_location_24_01.xml
rename to packages/SystemUI/res/drawable/ic_qs_location_01.xml
diff --git a/packages/SystemUI/res/drawable/ic_location_24_02.xml b/packages/SystemUI/res/drawable/ic_qs_location_02.xml
similarity index 100%
rename from packages/SystemUI/res/drawable/ic_location_24_02.xml
rename to packages/SystemUI/res/drawable/ic_qs_location_02.xml
diff --git a/packages/SystemUI/res/drawable/ic_location_24_03.xml b/packages/SystemUI/res/drawable/ic_qs_location_03.xml
similarity index 100%
rename from packages/SystemUI/res/drawable/ic_location_24_03.xml
rename to packages/SystemUI/res/drawable/ic_qs_location_03.xml
diff --git a/packages/SystemUI/res/drawable/ic_location_24_04.xml b/packages/SystemUI/res/drawable/ic_qs_location_04.xml
similarity index 100%
rename from packages/SystemUI/res/drawable/ic_location_24_04.xml
rename to packages/SystemUI/res/drawable/ic_qs_location_04.xml
diff --git a/packages/SystemUI/res/drawable/ic_location_24_05.xml b/packages/SystemUI/res/drawable/ic_qs_location_05.xml
similarity index 100%
rename from packages/SystemUI/res/drawable/ic_location_24_05.xml
rename to packages/SystemUI/res/drawable/ic_qs_location_05.xml
diff --git a/packages/SystemUI/res/drawable/ic_location_24_06.xml b/packages/SystemUI/res/drawable/ic_qs_location_06.xml
similarity index 100%
rename from packages/SystemUI/res/drawable/ic_location_24_06.xml
rename to packages/SystemUI/res/drawable/ic_qs_location_06.xml
diff --git a/packages/SystemUI/res/drawable/ic_location_24_07.xml b/packages/SystemUI/res/drawable/ic_qs_location_07.xml
similarity index 100%
rename from packages/SystemUI/res/drawable/ic_location_24_07.xml
rename to packages/SystemUI/res/drawable/ic_qs_location_07.xml
diff --git a/packages/SystemUI/res/drawable/ic_location_24_08.xml b/packages/SystemUI/res/drawable/ic_qs_location_08.xml
similarity index 100%
rename from packages/SystemUI/res/drawable/ic_location_24_08.xml
rename to packages/SystemUI/res/drawable/ic_qs_location_08.xml
diff --git a/packages/SystemUI/res/drawable/ic_location_24_09.xml b/packages/SystemUI/res/drawable/ic_qs_location_09.xml
similarity index 100%
rename from packages/SystemUI/res/drawable/ic_location_24_09.xml
rename to packages/SystemUI/res/drawable/ic_qs_location_09.xml
diff --git a/packages/SystemUI/res/drawable/ic_location_24_10.xml b/packages/SystemUI/res/drawable/ic_qs_location_10.xml
similarity index 100%
rename from packages/SystemUI/res/drawable/ic_location_24_10.xml
rename to packages/SystemUI/res/drawable/ic_qs_location_10.xml
diff --git a/packages/SystemUI/res/drawable/ic_location_24_11.xml b/packages/SystemUI/res/drawable/ic_qs_location_11.xml
similarity index 100%
rename from packages/SystemUI/res/drawable/ic_location_24_11.xml
rename to packages/SystemUI/res/drawable/ic_qs_location_11.xml
diff --git a/packages/SystemUI/res/drawable/ic_qs_location_off.xml b/packages/SystemUI/res/drawable/ic_qs_location_off.xml
new file mode 100644
index 0000000..d28d347
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_qs_location_off.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright (C) 2014 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.
+-->
+<animation-list
+        xmlns:android="http://schemas.android.com/apk/res/android"
+        android:oneshot="true">
+    <item android:drawable="@drawable/ic_qs_location_01" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_location_02" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_location_03" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_location_04" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_location_05" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_location_06" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_location_07" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_location_08" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_location_09" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_location_10" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_location_11" android:duration="16" />
+</animation-list>
diff --git a/packages/SystemUI/res/drawable/ic_qs_location_on.xml b/packages/SystemUI/res/drawable/ic_qs_location_on.xml
new file mode 100644
index 0000000..72512ac
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_qs_location_on.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright (C) 2014 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.
+-->
+<animation-list
+        xmlns:android="http://schemas.android.com/apk/res/android"
+        android:oneshot="true">
+    <item android:drawable="@drawable/ic_qs_location_11" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_location_10" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_location_09" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_location_08" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_location_07" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_location_06" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_location_05" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_location_04" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_location_03" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_location_02" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_location_01" android:duration="16" />
+</animation-list>
diff --git a/packages/SystemUI/res/drawable/ic_qs_minus.xml b/packages/SystemUI/res/drawable/ic_qs_minus.xml
index 8323e89..376cc28 100644
--- a/packages/SystemUI/res/drawable/ic_qs_minus.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_minus.xml
@@ -23,6 +23,6 @@
         android:viewportHeight="24.0"/>
 
     <path
-        android:fill="#FF000000"
+        android:fill="#FFFFFFFF"
         android:pathData="M7.0,11.0l0.0,2.0l10.0,0.0l0.0,-2.0L7.0,11.0zM12.0,2.0C6.5,2.0 2.0,6.5 2.0,12.0s4.5,10.0 10.0,10.0c5.5,0.0 10.0,-4.5 10.0,-10.0S17.5,2.0 12.0,2.0zM12.0,20.0c-4.4,0.0 -8.0,-3.6 -8.0,-8.0s3.6,-8.0 8.0,-8.0c4.4,0.0 8.0,3.6 8.0,8.0S16.4,20.0 12.0,20.0z"/>
 </vector>
diff --git a/packages/SystemUI/res/drawable/ic_qs_plus.xml b/packages/SystemUI/res/drawable/ic_qs_plus.xml
index 84cd72a..a315f7f 100644
--- a/packages/SystemUI/res/drawable/ic_qs_plus.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_plus.xml
@@ -23,6 +23,6 @@
         android:viewportHeight="24.0"/>
 
     <path
-        android:fill="#FF000000"
+        android:fill="#FFFFFFFF"
         android:pathData="M13.0,7.0l-2.0,0.0l0.0,4.0L7.0,11.0l0.0,2.0l4.0,0.0l0.0,4.0l2.0,0.0l0.0,-4.0l4.0,0.0l0.0,-2.0l-4.0,0.0L13.0,7.0zM12.0,2.0C6.5,2.0 2.0,6.5 2.0,12.0s4.5,10.0 10.0,10.0c5.5,0.0 10.0,-4.5 10.0,-10.0S17.5,2.0 12.0,2.0zM12.0,20.0c-4.4,0.0 -8.0,-3.6 -8.0,-8.0s3.6,-8.0 8.0,-8.0c4.4,0.0 8.0,3.6 8.0,8.0S16.4,20.0 12.0,20.0z"/>
 </vector>
diff --git a/packages/SystemUI/res/drawable/ic_qs_ringer_audible.xml b/packages/SystemUI/res/drawable/ic_qs_ringer_audible.xml
index fa6f20c..45b5548 100644
--- a/packages/SystemUI/res/drawable/ic_qs_ringer_audible.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_ringer_audible.xml
@@ -23,6 +23,6 @@
         android:viewportHeight="24.0"/>
 
     <path
-        android:fill="#FF000000"
+        android:fill="#FFFFFFFF"
         android:pathData="M3.0,9.0c0.0,0.0 0.0,6.0 0.0,6.0l4.0,0.0l5.0,5.0L12.0,4.0L7.0,9.0L3.0,9.0zM16.5,12.0c0.0,-1.8 -1.0,-3.3 -2.5,-4.0L14.0,16.0C15.5,15.3 16.5,13.8 16.5,12.0zM14.0,3.2l0.0,2.1c2.9,0.9 5.0,3.5 5.0,6.7s-2.1,5.8 -5.0,6.7l0.0,2.1c4.0,-0.9 7.0,-4.5 7.0,-8.8S18.0,4.1 14.0,3.2z"/>
 </vector>
diff --git a/packages/SystemUI/res/drawable/ic_qs_ringer_silent.xml b/packages/SystemUI/res/drawable/ic_qs_ringer_silent.xml
index 0665196..6d44406 100644
--- a/packages/SystemUI/res/drawable/ic_qs_ringer_silent.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_ringer_silent.xml
@@ -23,6 +23,6 @@
         android:viewportHeight="24.0"/>
 
     <path
-        android:fill="#FF000000"
+        android:fill="#FFFFFFFF"
         android:pathData="M16.5,12.0c0.0,-1.8 -1.0,-3.3 -2.5,-4.0l0.0,2.2l2.5,2.5C16.5,12.4 16.5,12.2 16.5,12.0zM19.0,12.0c0.0,0.9 -0.2,1.8 -0.5,2.6l1.5,1.5c0.7,-1.2 1.0,-2.7 1.0,-4.2c0.0,-4.3 -3.0,-7.9 -7.0,-8.8l0.0,2.1C16.9,6.2 19.0,8.8 19.0,12.0zM4.3,3.0L3.0,4.3L7.7,9.0L3.0,9.0c0.0,0.0 0.0,6.0 0.0,6.0l4.0,0.0l5.0,5.0l0.0,-6.7l4.3,4.3c-0.7,0.5 -1.4,0.9 -2.3,1.2l0.0,2.1c1.4,-0.3 2.6,-0.9 3.7,-1.8l2.0,2.0l1.3,-1.3l-9.0,-9.0L4.3,3.0zM12.0,4.0L9.9,6.1L12.0,8.2L12.0,4.0z"/>
 </vector>
diff --git a/packages/SystemUI/res/drawable/ic_qs_ringer_vibrate.xml b/packages/SystemUI/res/drawable/ic_qs_ringer_vibrate.xml
index 299a2ef..96d20e8 100644
--- a/packages/SystemUI/res/drawable/ic_qs_ringer_vibrate.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_ringer_vibrate.xml
@@ -23,6 +23,6 @@
         android:viewportHeight="24.0"/>
 
     <path
-        android:fill="#FF000000"
+        android:fill="#FFFFFFFF"
         android:pathData="M0.0,15.0l2.0,0.0L2.0,9.0L0.0,9.0L0.0,15.0zM3.0,17.0l2.0,0.0L5.0,7.0L3.0,7.0L3.0,17.0zM22.0,9.0l0.0,6.0l2.0,0.0L24.0,9.0L22.0,9.0zM19.0,17.0l2.0,0.0L21.0,7.0l-2.0,0.0L19.0,17.0zM16.5,3.0l-9.0,0.0C6.7,3.0 6.0,3.7 6.0,4.5l0.0,15.0C6.0,20.3 6.7,21.0 7.5,21.0l9.0,0.0c0.8,0.0 1.5,-0.7 1.5,-1.5l0.0,-15.0C18.0,3.7 17.3,3.0 16.5,3.0zM16.0,19.0L8.0,19.0L8.0,5.0l8.0,0.0L16.0,19.0z"/>
 </vector>
diff --git a/packages/SystemUI/res/drawable/ic_rotate_24_01.xml b/packages/SystemUI/res/drawable/ic_qs_rotation_01.xml
similarity index 100%
rename from packages/SystemUI/res/drawable/ic_rotate_24_01.xml
rename to packages/SystemUI/res/drawable/ic_qs_rotation_01.xml
diff --git a/packages/SystemUI/res/drawable/ic_rotate_24_02.xml b/packages/SystemUI/res/drawable/ic_qs_rotation_02.xml
similarity index 100%
rename from packages/SystemUI/res/drawable/ic_rotate_24_02.xml
rename to packages/SystemUI/res/drawable/ic_qs_rotation_02.xml
diff --git a/packages/SystemUI/res/drawable/ic_rotate_24_03.xml b/packages/SystemUI/res/drawable/ic_qs_rotation_03.xml
similarity index 100%
rename from packages/SystemUI/res/drawable/ic_rotate_24_03.xml
rename to packages/SystemUI/res/drawable/ic_qs_rotation_03.xml
diff --git a/packages/SystemUI/res/drawable/ic_rotate_24_04.xml b/packages/SystemUI/res/drawable/ic_qs_rotation_04.xml
similarity index 100%
rename from packages/SystemUI/res/drawable/ic_rotate_24_04.xml
rename to packages/SystemUI/res/drawable/ic_qs_rotation_04.xml
diff --git a/packages/SystemUI/res/drawable/ic_rotate_24_05.xml b/packages/SystemUI/res/drawable/ic_qs_rotation_05.xml
similarity index 100%
rename from packages/SystemUI/res/drawable/ic_rotate_24_05.xml
rename to packages/SystemUI/res/drawable/ic_qs_rotation_05.xml
diff --git a/packages/SystemUI/res/drawable/ic_rotate_24_06.xml b/packages/SystemUI/res/drawable/ic_qs_rotation_06.xml
similarity index 100%
rename from packages/SystemUI/res/drawable/ic_rotate_24_06.xml
rename to packages/SystemUI/res/drawable/ic_qs_rotation_06.xml
diff --git a/packages/SystemUI/res/drawable/ic_rotate_24_07.xml b/packages/SystemUI/res/drawable/ic_qs_rotation_07.xml
similarity index 100%
rename from packages/SystemUI/res/drawable/ic_rotate_24_07.xml
rename to packages/SystemUI/res/drawable/ic_qs_rotation_07.xml
diff --git a/packages/SystemUI/res/drawable/ic_rotate_24_08.xml b/packages/SystemUI/res/drawable/ic_qs_rotation_08.xml
similarity index 100%
rename from packages/SystemUI/res/drawable/ic_rotate_24_08.xml
rename to packages/SystemUI/res/drawable/ic_qs_rotation_08.xml
diff --git a/packages/SystemUI/res/drawable/ic_rotate_24_09.xml b/packages/SystemUI/res/drawable/ic_qs_rotation_09.xml
similarity index 100%
rename from packages/SystemUI/res/drawable/ic_rotate_24_09.xml
rename to packages/SystemUI/res/drawable/ic_qs_rotation_09.xml
diff --git a/packages/SystemUI/res/drawable/ic_rotate_24_10.xml b/packages/SystemUI/res/drawable/ic_qs_rotation_10.xml
similarity index 100%
rename from packages/SystemUI/res/drawable/ic_rotate_24_10.xml
rename to packages/SystemUI/res/drawable/ic_qs_rotation_10.xml
diff --git a/packages/SystemUI/res/drawable/ic_rotate_24_11.xml b/packages/SystemUI/res/drawable/ic_qs_rotation_11.xml
similarity index 100%
rename from packages/SystemUI/res/drawable/ic_rotate_24_11.xml
rename to packages/SystemUI/res/drawable/ic_qs_rotation_11.xml
diff --git a/packages/SystemUI/res/drawable/ic_rotate_24_12.xml b/packages/SystemUI/res/drawable/ic_qs_rotation_12.xml
similarity index 100%
rename from packages/SystemUI/res/drawable/ic_rotate_24_12.xml
rename to packages/SystemUI/res/drawable/ic_qs_rotation_12.xml
diff --git a/packages/SystemUI/res/drawable/ic_rotate_24_13.xml b/packages/SystemUI/res/drawable/ic_qs_rotation_13.xml
similarity index 100%
rename from packages/SystemUI/res/drawable/ic_rotate_24_13.xml
rename to packages/SystemUI/res/drawable/ic_qs_rotation_13.xml
diff --git a/packages/SystemUI/res/drawable/ic_rotate_24_14.xml b/packages/SystemUI/res/drawable/ic_qs_rotation_14.xml
similarity index 100%
rename from packages/SystemUI/res/drawable/ic_rotate_24_14.xml
rename to packages/SystemUI/res/drawable/ic_qs_rotation_14.xml
diff --git a/packages/SystemUI/res/drawable/ic_rotate_24_15.xml b/packages/SystemUI/res/drawable/ic_qs_rotation_15.xml
similarity index 100%
rename from packages/SystemUI/res/drawable/ic_rotate_24_15.xml
rename to packages/SystemUI/res/drawable/ic_qs_rotation_15.xml
diff --git a/packages/SystemUI/res/drawable/ic_qs_rotation_locked.xml b/packages/SystemUI/res/drawable/ic_qs_rotation_locked.xml
new file mode 100644
index 0000000..75e20f0
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_qs_rotation_locked.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright (C) 2014 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.
+-->
+<animation-list
+        xmlns:android="http://schemas.android.com/apk/res/android"
+        android:oneshot="true">
+    <item android:drawable="@drawable/ic_qs_rotation_01" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_rotation_02" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_rotation_03" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_rotation_04" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_rotation_05" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_rotation_06" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_rotation_07" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_rotation_08" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_rotation_09" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_rotation_10" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_rotation_11" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_rotation_12" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_rotation_13" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_rotation_14" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_rotation_15" android:duration="16" />
+</animation-list>
diff --git a/packages/SystemUI/res/drawable/ic_qs_rotation_unlocked.xml b/packages/SystemUI/res/drawable/ic_qs_rotation_unlocked.xml
new file mode 100644
index 0000000..a1cedb9
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_qs_rotation_unlocked.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright (C) 2014 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.
+-->
+<animation-list
+        xmlns:android="http://schemas.android.com/apk/res/android"
+        android:oneshot="true">
+    <item android:drawable="@drawable/ic_qs_rotation_15" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_rotation_14" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_rotation_13" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_rotation_12" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_rotation_11" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_rotation_10" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_rotation_09" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_rotation_08" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_rotation_07" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_rotation_06" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_rotation_05" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_rotation_04" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_rotation_03" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_rotation_02" android:duration="16" />
+    <item android:drawable="@drawable/ic_qs_rotation_01" android:duration="16" />
+</animation-list>
diff --git a/packages/SystemUI/res/drawable/ic_qs_zen.xml b/packages/SystemUI/res/drawable/ic_qs_zen_off.xml
similarity index 66%
rename from packages/SystemUI/res/drawable/ic_qs_zen.xml
rename to packages/SystemUI/res/drawable/ic_qs_zen_off.xml
index 059c068..73886ec 100644
--- a/packages/SystemUI/res/drawable/ic_qs_zen.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_zen_off.xml
@@ -23,6 +23,8 @@
         android:viewportHeight="24.0"/>
 
     <path
-        android:fill="#FF000000"
-        android:pathData="M11.5,22.0c1.1,0.0 2.0,-0.9 2.0,-2.0l-4.0,0.0C9.5,21.1 10.4,22.0 11.5,22.0zM18.0,16.0l0.0,-5.5c0.0,-3.1 -2.1,-5.6 -5.0,-6.3L13.0,3.5C13.0,2.7 12.3,2.0 11.5,2.0C10.7,2.0 10.0,2.7 10.0,3.5l0.0,0.7c-2.9,0.7 -5.0,3.2 -5.0,6.3L5.0,16.0l-2.0,2.0l0.0,1.0l17.0,0.0l0.0,-1.0L18.0,16.0zM14.0,9.8l-2.8,3.4L14.0,13.200001L14.0,15.0L9.0,15.0l0.0,-1.8l2.8,-3.4L9.0,9.799999L9.0,8.0l5.0,0.0L14.0,9.8z"/>
+        android:fill="#00000000"
+        android:stroke="#CCCCCC"
+        android:strokeWidth="1.0"
+        android:pathData="M12.0,2.0C6.5,2.0 2.0,6.5 2.0,12.0s4.5,10.0 10.0,10.0c5.5,0.0 10.0,-4.5 10.0,-10.0S17.5,2.0 12.0,2.0zM4.0,12.0c0.0,-4.4 3.6,-8.0 8.0,-8.0c1.8,0.0 3.5,0.6 4.9,1.7L5.7,16.9C4.6,15.5 4.0,13.8 4.0,12.0zM12.0,20.0c-1.8,0.0 -3.5,-0.6 -4.9,-1.7L18.3,7.1C19.4,8.5 20.0,10.2 20.0,12.0C20.0,16.4 16.4,20.0 12.0,20.0z" />
 </vector>
diff --git a/packages/SystemUI/res/drawable/ic_qs_airplane.xml b/packages/SystemUI/res/drawable/ic_qs_zen_on.xml
similarity index 70%
copy from packages/SystemUI/res/drawable/ic_qs_airplane.xml
copy to packages/SystemUI/res/drawable/ic_qs_zen_on.xml
index ffe571f..8dff318 100644
--- a/packages/SystemUI/res/drawable/ic_qs_airplane.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_zen_on.xml
@@ -23,9 +23,6 @@
         android:viewportHeight="24.0"/>
 
     <path
-        android:fill="#FF000000"
-        android:pathData="M10.2,9.0"/>
-    <path
-        android:fill="#FF000000"
-        android:pathData="M21.0,16.0l0.0,-2.0l-8.0,-5.0L13.0,3.5C13.0,2.7 12.3,2.0 11.5,2.0C10.7,2.0 10.0,2.7 10.0,3.5L10.0,9.0l-8.0,5.0l0.0,2.0l8.0,-2.5L10.0,19.0l-2.0,1.5L8.0,22.0l3.5,-1.0l3.5,1.0l0.0,-1.5L13.0,19.0l0.0,-5.5L21.0,16.0z"/>
+        android:fill="#FFFFFFFF"
+        android:pathData="M12.0,2.0C6.5,2.0 2.0,6.5 2.0,12.0s4.5,10.0 10.0,10.0c5.5,0.0 10.0,-4.5 10.0,-10.0S17.5,2.0 12.0,2.0zM4.0,12.0c0.0,-4.4 3.6,-8.0 8.0,-8.0c1.8,0.0 3.5,0.6 4.9,1.7L5.7,16.9C4.6,15.5 4.0,13.8 4.0,12.0zM12.0,20.0c-1.8,0.0 -3.5,-0.6 -4.9,-1.7L18.3,7.1C19.4,8.5 20.0,10.2 20.0,12.0C20.0,16.4 16.4,20.0 12.0,20.0z" />
 </vector>
diff --git a/packages/SystemUI/res/drawable/ic_rotate_locked_anim.xml b/packages/SystemUI/res/drawable/ic_rotate_locked_anim.xml
deleted file mode 100644
index e14a1ce..0000000
--- a/packages/SystemUI/res/drawable/ic_rotate_locked_anim.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-Copyright (C) 2014 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.
--->
-<animation-list
-        xmlns:android="http://schemas.android.com/apk/res/android"
-        android:oneshot="true">
-    <item android:drawable="@drawable/ic_rotate_24_01" android:duration="16" />
-    <item android:drawable="@drawable/ic_rotate_24_02" android:duration="16" />
-    <item android:drawable="@drawable/ic_rotate_24_03" android:duration="16" />
-    <item android:drawable="@drawable/ic_rotate_24_04" android:duration="16" />
-    <item android:drawable="@drawable/ic_rotate_24_05" android:duration="16" />
-    <item android:drawable="@drawable/ic_rotate_24_06" android:duration="16" />
-    <item android:drawable="@drawable/ic_rotate_24_07" android:duration="16" />
-    <item android:drawable="@drawable/ic_rotate_24_08" android:duration="16" />
-    <item android:drawable="@drawable/ic_rotate_24_09" android:duration="16" />
-    <item android:drawable="@drawable/ic_rotate_24_10" android:duration="16" />
-    <item android:drawable="@drawable/ic_rotate_24_11" android:duration="16" />
-    <item android:drawable="@drawable/ic_rotate_24_12" android:duration="16" />
-    <item android:drawable="@drawable/ic_rotate_24_13" android:duration="16" />
-    <item android:drawable="@drawable/ic_rotate_24_14" android:duration="16" />
-    <item android:drawable="@drawable/ic_rotate_24_15" android:duration="16" />
-</animation-list>
diff --git a/packages/SystemUI/res/drawable/ic_rotate_unlocked_anim.xml b/packages/SystemUI/res/drawable/ic_rotate_unlocked_anim.xml
deleted file mode 100644
index 63b8c5f..0000000
--- a/packages/SystemUI/res/drawable/ic_rotate_unlocked_anim.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-Copyright (C) 2014 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.
--->
-<animation-list
-        xmlns:android="http://schemas.android.com/apk/res/android"
-        android:oneshot="true">
-    <item android:drawable="@drawable/ic_rotate_24_15" android:duration="16" />
-    <item android:drawable="@drawable/ic_rotate_24_14" android:duration="16" />
-    <item android:drawable="@drawable/ic_rotate_24_13" android:duration="16" />
-    <item android:drawable="@drawable/ic_rotate_24_12" android:duration="16" />
-    <item android:drawable="@drawable/ic_rotate_24_11" android:duration="16" />
-    <item android:drawable="@drawable/ic_rotate_24_10" android:duration="16" />
-    <item android:drawable="@drawable/ic_rotate_24_09" android:duration="16" />
-    <item android:drawable="@drawable/ic_rotate_24_08" android:duration="16" />
-    <item android:drawable="@drawable/ic_rotate_24_07" android:duration="16" />
-    <item android:drawable="@drawable/ic_rotate_24_06" android:duration="16" />
-    <item android:drawable="@drawable/ic_rotate_24_05" android:duration="16" />
-    <item android:drawable="@drawable/ic_rotate_24_04" android:duration="16" />
-    <item android:drawable="@drawable/ic_rotate_24_03" android:duration="16" />
-    <item android:drawable="@drawable/ic_rotate_24_02" android:duration="16" />
-    <item android:drawable="@drawable/ic_rotate_24_01" android:duration="16" />
-</animation-list>
diff --git a/packages/SystemUI/res/layout/qs_zen_mode_detail.xml b/packages/SystemUI/res/layout/qs_zen_mode_detail.xml
index 2df6d43..b73874a 100644
--- a/packages/SystemUI/res/layout/qs_zen_mode_detail.xml
+++ b/packages/SystemUI/res/layout/qs_zen_mode_detail.xml
@@ -19,8 +19,9 @@
     android:layout_height="match_parent"
     android:background="@color/system_secondary_color" >
 
-    <com.android.systemui.qs.QSImageView
+    <ImageView
         android:id="@android:id/button1"
+        android:src="@drawable/ic_qs_close"
         android:layout_width="64dp"
         android:layout_height="64dp"
         android:layout_alignParentStart="true"
diff --git a/packages/SystemUI/res/layout/qs_zen_mode_detail_condition.xml b/packages/SystemUI/res/layout/qs_zen_mode_detail_condition.xml
index a5c8903..7e02bee 100644
--- a/packages/SystemUI/res/layout/qs_zen_mode_detail_condition.xml
+++ b/packages/SystemUI/res/layout/qs_zen_mode_detail_condition.xml
@@ -38,8 +38,9 @@
         android:maxLines="1"
         android:text="@string/accessibility_back" />
 
-    <com.android.systemui.qs.QSImageView
+    <ImageView
         android:id="@android:id/button1"
+        android:src="@drawable/ic_qs_plus"
         android:layout_width="64dp"
         android:layout_height="64dp"
         android:layout_alignParentEnd="true"
@@ -47,8 +48,9 @@
         android:padding="@dimen/quick_settings_panel_padding"
         android:paddingRight="0px" />
 
-    <com.android.systemui.qs.QSImageView
+    <ImageView
         android:id="@android:id/button2"
+        android:src="@drawable/ic_qs_minus"
         android:layout_width="64dp"
         android:layout_height="64dp"
         android:layout_alignParentEnd="true"
diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml
index cba13004..77b4843 100644
--- a/packages/SystemUI/res/values/colors.xml
+++ b/packages/SystemUI/res/values/colors.xml
@@ -41,8 +41,6 @@
     <color name="system_secondary_color">#ff384248</color>
     <color name="system_accent_color">#ff7fcac3</color>
     <color name="system_error_color">#fff0592b</color>
-    <color name="quick_settings_tile_icon_enabled">#ffffffff</color>
-    <color name="quick_settings_tile_icon_disabled">#ffcccccc</color>
     <color name="quick_settings_tile_divider">#ff888888</color>
     <color name="quick_settings_tile_text">#FFFFFFFF</color>
     <color name="status_bar_clock_color">#FFFFFFFF</color>
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index c15f25f..29955dd 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -284,7 +284,6 @@
     <dimen name="quick_settings_tmp_scrim_stroke_width">8dp</dimen>
     <dimen name="quick_settings_tmp_scrim_text_size">30dp</dimen>
     <dimen name="quick_settings_panel_padding">16dp</dimen>
-    <dimen name="quick_settings_tile_icon_outline">2dp</dimen>
     <dimen name="quick_settings_tile_text_size">12sp</dimen>
     <dimen name="quick_settings_tile_divider_height">1dp</dimen>
 
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
index 9536b12..19888a8 100644
--- a/packages/SystemUI/res/values/styles.xml
+++ b/packages/SystemUI/res/values/styles.xml
@@ -193,4 +193,9 @@
     </style>
 
     <style name="QSBorderless" parent="@android:style/Widget.Quantum.Button.Borderless" />
+
+    <style name="QSBorderless.Tiny">
+        <item name="android:minHeight">12dip</item>
+        <item name="android:minWidth">12dip</item>
+    </style>
 </resources>
diff --git a/packages/SystemUI/src/com/android/systemui/qs/FilterCanvas.java b/packages/SystemUI/src/com/android/systemui/qs/FilterCanvas.java
deleted file mode 100644
index 05c8ee3..0000000
--- a/packages/SystemUI/src/com/android/systemui/qs/FilterCanvas.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (C) 2014 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.qs;
-
-import android.graphics.Canvas;
-import android.graphics.Matrix;
-import android.graphics.Paint;
-import android.graphics.Path;
-import android.graphics.Rect;
-
-/** Canvas that forwards calls to another canvas.  Can be subclassed to transform drawing calls.
- * Temporary solution to runtime modification of a single drawable shape into two
- * enabled & disabled versions.  See QSImageView. **/
-public class FilterCanvas extends Canvas {
-    private final Canvas mCanvas;
-
-    public FilterCanvas(Canvas c) {
-        mCanvas = c;
-    }
-
-    @Override
-    public void drawPath(Path path, Paint paint) {
-        mCanvas.drawPath(path, paint);
-    }
-
-    @Override
-    public int getSaveCount() {
-        return mCanvas.getSaveCount();
-    }
-
-    @Override
-    public int save() {
-        return mCanvas.save();
-    }
-
-    @Override
-    public void translate(float dx, float dy) {
-        mCanvas.translate(dx, dy);
-    }
-
-    @Override
-    public boolean clipRect(int left, int top, int right, int bottom) {
-        return mCanvas.clipRect(left, top, right, bottom);
-    }
-
-    @Override
-    public boolean clipRect(Rect rect) {
-        return mCanvas.clipRect(rect);
-    }
-
-    @Override
-    public void concat(Matrix matrix) {
-        mCanvas.concat(matrix);
-    }
-
-    @Override
-    public void restoreToCount(int saveCount) {
-        mCanvas.restoreToCount(saveCount);
-    }
-
-    @Override
-    public void drawRect(Rect r, Paint paint) {
-        mCanvas.drawRect(r, paint);
-    }
-}
\ No newline at end of file
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSImageView.java b/packages/SystemUI/src/com/android/systemui/qs/QSImageView.java
deleted file mode 100644
index ed67560..0000000
--- a/packages/SystemUI/src/com/android/systemui/qs/QSImageView.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (C) 2014 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.qs;
-
-import android.content.Context;
-import android.content.res.Resources;
-import android.graphics.Canvas;
-import android.graphics.Paint;
-import android.graphics.Paint.Style;
-import android.graphics.Path;
-import android.graphics.drawable.Drawable;
-import android.graphics.drawable.VectorDrawable;
-import android.util.AttributeSet;
-import android.widget.ImageView;
-
-import com.android.systemui.R;
-
-/** ImageView that performs runtime modification of vector drawables (using FilterCanvas). **/
-public class QSImageView extends ImageView {
-
-    private final int mOutlineWidth;
-    private final int mColorEnabled;
-    private final int mColorDisabled;
-    private FilterCanvas mFilterCanvas;
-    private Canvas mCanvas;
-    private boolean mEnabledVersion = true;
-    private boolean mFilter;
-
-    public QSImageView(Context context) {
-        this(context, null);
-    }
-
-    public QSImageView(Context context, AttributeSet attrs) {
-        super(context, attrs);
-        final Resources res = context.getResources();
-        mOutlineWidth = res.getDimensionPixelSize(R.dimen.quick_settings_tile_icon_outline);
-        mColorEnabled = res.getColor(R.color.quick_settings_tile_icon_enabled);
-        mColorDisabled = res.getColor(R.color.quick_settings_tile_icon_disabled);
-    }
-
-    public void setEnabledVersion(boolean enabledVersion) {
-        mEnabledVersion = enabledVersion;
-        invalidate();
-    }
-
-    @Override
-    public void setImageDrawable(Drawable drawable) {
-        mFilter = drawable instanceof VectorDrawable;
-        super.setImageDrawable(drawable);
-    }
-
-    @Override
-    public void setImageResource(int resId) {
-        setImageDrawable(mContext.getDrawable(resId));
-    }
-
-    @Override
-    public void draw(Canvas canvas) {
-        if (mFilter) {
-            if (canvas != mCanvas) {
-                mCanvas = canvas;
-                mFilterCanvas = new QSFilterCanvas(canvas);
-            }
-            super.draw(mFilterCanvas);
-        } else {
-            super.draw(canvas);
-        }
-    }
-
-    private class QSFilterCanvas extends FilterCanvas {
-        public QSFilterCanvas(Canvas c) {
-            super(c);
-        }
-
-        @Override
-        public void drawPath(Path path, Paint paint) {
-            if (mEnabledVersion) {
-                paint.setColor(mColorEnabled);
-            } else {
-                paint.setStyle(Style.STROKE);
-                paint.setStrokeJoin(Paint.Join.ROUND);
-                paint.setColor(mColorDisabled);
-                paint.setStrokeWidth(mOutlineWidth);
-            }
-            super.drawPath(path, paint);
-        }
-    }
-}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSTile.java b/packages/SystemUI/src/com/android/systemui/qs/QSTile.java
index 38496b4..835a5c4 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSTile.java
@@ -19,7 +19,6 @@
 import android.content.Context;
 import android.content.Intent;
 import android.graphics.drawable.Drawable;
-import android.graphics.drawable.VectorDrawable;
 import android.os.Handler;
 import android.os.Looper;
 import android.os.Message;
@@ -50,6 +49,7 @@
 public abstract class QSTile<TState extends State> implements Listenable {
     protected final String TAG = "QSTile." + getClass().getSimpleName();
     protected static final boolean DEBUG = false;
+    public static final int FEEDBACK_START_DELAY = 400;
 
     protected final Host mHost;
     protected final Context mContext;
@@ -205,7 +205,6 @@
         void collapsePanels();
         Looper getLooper();
         Context getContext();
-        VectorDrawable getVectorDrawable(int resId);
         BluetoothController getBluetoothController();
         LocationController getLocationController();
         RotationLockController getRotationLockController();
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSTileView.java b/packages/SystemUI/src/com/android/systemui/qs/QSTileView.java
index 17a95fb..4cfb636 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSTileView.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSTileView.java
@@ -25,9 +25,11 @@
 import android.os.Looper;
 import android.os.Message;
 import android.util.TypedValue;
+import android.view.ContextThemeWrapper;
 import android.view.Gravity;
 import android.view.View;
 import android.view.ViewGroup;
+import android.widget.ImageView;
 import android.widget.ImageView.ScaleType;
 import android.widget.TextView;
 
@@ -43,9 +45,9 @@
     protected final Context mContext;
     private final View mIcon;
     private final View mDivider;
-    private final TextView mLabel;
     private final H mHandler = new H();
 
+    private TextView mLabel;
     private boolean mDual;
     private OnClickListener mClickPrimary;
     private OnClickListener mClickSecondary;
@@ -55,14 +57,7 @@
 
         mContext = context;
         final Resources res = context.getResources();
-        mLabel = new TextView(mContext);
-        mLabel.setId(android.R.id.title);
-        mLabel.setTextColor(res.getColor(R.color.quick_settings_tile_text));
-        mLabel.setGravity(Gravity.CENTER);
-        mLabel.setTypeface(CONDENSED);
-        mLabel.setTextSize(TypedValue.COMPLEX_UNIT_PX,
-                res.getDimensionPixelSize(R.dimen.quick_settings_tile_text_size));
-        addView(mLabel);
+        recreateLabel();
         setClipChildren(false);
 
         mIcon = createIcon();
@@ -78,8 +73,33 @@
         setBackground(getSelectableBackground());
     }
 
+    private void recreateLabel() {
+        CharSequence labelText = null;
+        if (mLabel != null) {
+            labelText = mLabel.getText();
+            removeView(mLabel);
+        }
+        final Resources res = mContext.getResources();
+        mLabel = new TextView(mDual ? new ContextThemeWrapper(mContext, R.style.QSBorderless_Tiny)
+                : mContext);
+        mLabel.setId(android.R.id.title);
+        mLabel.setTextColor(res.getColor(R.color.quick_settings_tile_text));
+        mLabel.setGravity(Gravity.CENTER);
+        mLabel.setTypeface(CONDENSED);
+        mLabel.setTextSize(TypedValue.COMPLEX_UNIT_PX,
+                res.getDimensionPixelSize(R.dimen.quick_settings_tile_text_size));
+        if (labelText != null) {
+            mLabel.setText(labelText);
+        }
+        addView(mLabel);
+    }
+
     public void setDual(boolean dual) {
+        final boolean changed = dual != mDual;
         mDual = dual;
+        if (changed) {
+            recreateLabel();
+        }
         if (mDual) {
             setOnClickListener(mClickPrimary);
             mLabel.setClickable(true);
@@ -98,7 +118,7 @@
     }
 
     protected View createIcon() {
-        QSImageView icon = new QSImageView(mContext);
+        final ImageView icon = new ImageView(mContext);
         icon.setId(android.R.id.icon);
         icon.setScaleType(ScaleType.CENTER_INSIDE);
         return icon;
@@ -120,9 +140,10 @@
         final int iconSpec = exactly((int)mLabel.getTextSize() * 2);
         mIcon.measure(iconSpec, iconSpec);
         mLabel.measure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(h, MeasureSpec.AT_MOST));
-        mLabel.measure(widthMeasureSpec, exactly(mLabel.getMeasuredHeight() + p * 2));
         if (mDual) {
             mDivider.measure(widthMeasureSpec, exactly(mDivider.getLayoutParams().height));
+        } else {
+            mLabel.measure(widthMeasureSpec, exactly(mLabel.getMeasuredHeight() + p * 2));
         }
         setMeasuredDimension(w, h);
     }
@@ -156,15 +177,12 @@
     }
 
     protected void handleStateChanged(QSTile.State state) {
-        if (mIcon instanceof QSImageView) {
-            QSImageView qsiv = (QSImageView) mIcon;
+        if (mIcon instanceof ImageView) {
+            ImageView iv = (ImageView) mIcon;
             if (state.icon != null) {
-                qsiv.setImageDrawable(state.icon);
+                iv.setImageDrawable(state.icon);
             } else if (state.iconId > 0) {
-                qsiv.setImageResource(state.iconId);
-            }
-            if (state.icon != null && state instanceof QSTile.BooleanState) {
-                qsiv.setEnabledVersion(((QSTile.BooleanState)state).value);
+                iv.setImageResource(state.iconId);
             }
         }
         mLabel.setText(state.label);
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/AirplaneModeTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/AirplaneModeTile.java
index 0c54040..c0f9bf2 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/AirplaneModeTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/AirplaneModeTile.java
@@ -65,7 +65,6 @@
         state.value = airplaneMode;
         state.visible = true;
         state.label = mContext.getString(R.string.quick_settings_airplane_mode_label);
-        state.icon = mHost.getVectorDrawable(R.drawable.ic_qs_airplane);
         if (airplaneMode) {
             state.iconId =  R.drawable.ic_qs_airplane_on;
             state.contentDescription =  mContext.getString(
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java
index 7a2e2d2..7335ab4 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java
@@ -72,14 +72,13 @@
         final boolean connected = mController.isBluetoothConnected();
         state.visible = supported;
         state.value = enabled;
-        state.icon = mHost.getVectorDrawable(R.drawable.ic_qs_bluetooth);
         final String stateContentDescription;
         if (enabled) {
             if (connected) {
-                state.iconId = R.drawable.ic_qs_bluetooth_on;
+                state.iconId = R.drawable.ic_qs_bluetooth_connected;
                 stateContentDescription = mContext.getString(R.string.accessibility_desc_connected);
             } else {
-                state.iconId = R.drawable.ic_qs_bluetooth_not_connected;
+                state.iconId = R.drawable.ic_qs_bluetooth_on;
                 stateContentDescription = mContext.getString(R.string.accessibility_desc_on);
             }
             state.label = mContext.getString(R.string.quick_settings_bluetooth_label);
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/BugreportTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/BugreportTile.java
index dbb112c..bfd416d 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/BugreportTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/BugreportTile.java
@@ -57,15 +57,19 @@
 
     @Override
     protected void handleClick() {
-        mHost.collapsePanels();
-        mUiHandler.post(mShowDialog);
+        mHandler.postDelayed(new Runnable() {
+            @Override
+            public void run() {
+                mHost.collapsePanels();
+                mUiHandler.post(mShowDialog);
+            }
+        }, FEEDBACK_START_DELAY);
     }
 
     @Override
     protected void handleUpdateState(State state, Object pushArg) {
         state.visible = mSetting.getValue() != 0;
-        state.iconId = com.android.internal.R.drawable.stat_sys_adb;
-        state.icon = mHost.getVectorDrawable(R.drawable.ic_qs_bugreport);
+        state.iconId = R.drawable.ic_qs_bugreport;
         state.label = mContext.getString(com.android.internal.R.string.bugreport_title);
     }
 
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/CastTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/CastTile.java
index 58575e4..907c77e 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/CastTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/CastTile.java
@@ -65,8 +65,12 @@
 
     @Override
     protected void handleClick() {
-        mHost.collapsePanels();
-        mUiHandler.post(mShowDialog);
+        mHandler.postDelayed(new Runnable() {
+            public void run() {
+                mHost.collapsePanels();
+                mUiHandler.post(mShowDialog);
+            }
+        }, FEEDBACK_START_DELAY);
     }
 
     @Override
@@ -74,13 +78,13 @@
         state.visible = true;
         state.label = mContext
                 .getString(R.string.quick_settings_remote_display_no_connection_label);
-        state.icon = mHost.getVectorDrawable(R.drawable.ic_qs_cast);
         if (arg instanceof CallbackInfo) {
             final CallbackInfo cb = (CallbackInfo) arg;
             if (cb.connectedRouteName != null) {
                 state.value = !cb.connecting;
             }
         }
+        state.iconId = state.value ? R.drawable.ic_qs_cast_on : R.drawable.ic_qs_cast_off;
     }
 
     private static class CallbackInfo {
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/ColorInversionTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/ColorInversionTile.java
index 72764e3..5301362 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/ColorInversionTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/ColorInversionTile.java
@@ -71,6 +71,6 @@
         state.visible = mVisible;
         state.value = enabled;
         state.label = mContext.getString(R.string.quick_settings_inversion_label);
-        state.icon = mHost.getVectorDrawable(R.drawable.ic_qs_invert_colors);
+        state.iconId = R.drawable.ic_qs_color_inversion;
     }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java
index 0eda922..f2ba558 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java
@@ -55,6 +55,6 @@
     protected void handleUpdateState(State state, Object arg) {
         state.visible = mController != null;
         state.label = mContext.getString(R.string.quick_settings_hotspot_label);
-        state.icon = mHost.getVectorDrawable(R.drawable.ic_qs_hotspot);
+        state.iconId = R.drawable.ic_qs_hotspot_off;
     }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/LocationTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/LocationTile.java
index f40705d..c5ad9e6 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/LocationTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/LocationTile.java
@@ -65,8 +65,8 @@
         if (state.value != locationEnabled) {
             state.value = locationEnabled;
             final AnimationDrawable d = (AnimationDrawable) mContext.getDrawable(locationEnabled
-                    ? R.drawable.ic_location_on_anim
-                    : R.drawable.ic_location_off_anim);
+                    ? R.drawable.ic_qs_location_on
+                    : R.drawable.ic_qs_location_off);
             state.icon = d;
             mUiHandler.post(new Runnable() {
                 @Override
@@ -75,15 +75,14 @@
                 }
             });
         }
-        //state.icon = mHost.getVectorDrawable(R.drawable.ic_qs_location);
         if (locationEnabled) {
-            if (state.icon == null) state.iconId = R.drawable.ic_location_24_01;
+            if (state.icon == null) state.iconId = R.drawable.ic_qs_location_01;
             state.label = mContext.getString(R.string.quick_settings_location_label);
             state.contentDescription = mContext.getString(
                     R.string.accessibility_quick_settings_location,
                     mContext.getString(R.string.accessibility_desc_on));
         } else {
-            if (state.icon == null) state.iconId = R.drawable.ic_location_24_11;
+            if (state.icon == null) state.iconId = R.drawable.ic_qs_location_11;
             state.label = mContext.getString(R.string.quick_settings_location_off_label);
             state.contentDescription = mContext.getString(
                     R.string.accessibility_quick_settings_location,
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/RingerModeTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/RingerModeTile.java
index ebb4cb2..c5e9b52 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/RingerModeTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/RingerModeTile.java
@@ -67,13 +67,13 @@
         state.visible = true;
         state.value = ringerMode;
         if (ringerMode == AudioManager.RINGER_MODE_VIBRATE) {
-            state.icon = mHost.getVectorDrawable(R.drawable.ic_qs_ringer_vibrate);
+            state.iconId = R.drawable.ic_qs_ringer_vibrate;
             state.label = "Vibrate";
         } else if (ringerMode == AudioManager.RINGER_MODE_SILENT) {
-            state.icon = mHost.getVectorDrawable(R.drawable.ic_qs_ringer_silent);
+            state.iconId = R.drawable.ic_qs_ringer_silent;
             state.label = "Silent";
         } else {
-            state.icon = mHost.getVectorDrawable(R.drawable.ic_qs_ringer_audible);
+            state.iconId = R.drawable.ic_qs_ringer_audible;
             state.label = "Audible";
         }
     }
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/RotationLockTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/RotationLockTile.java
index 5c5078c..1b0967b 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/RotationLockTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/RotationLockTile.java
@@ -63,8 +63,8 @@
         if (state.value != rotationLocked) {
             state.value = rotationLocked;
             final AnimationDrawable d = (AnimationDrawable) mContext.getDrawable(rotationLocked
-                    ? R.drawable.ic_rotate_locked_anim
-                    : R.drawable.ic_rotate_unlocked_anim);
+                    ? R.drawable.ic_qs_rotation_locked
+                    : R.drawable.ic_qs_rotation_unlocked);
             state.icon = d;
             mUiHandler.post(new Runnable() {
                 @Override
@@ -82,12 +82,12 @@
                     : R.string.quick_settings_rotation_locked_label;
             state.label = mContext.getString(label);
             if (state.icon == null) {
-                state.icon = mContext.getDrawable(R.drawable.ic_rotate_24_15);
+                state.icon = mContext.getDrawable(R.drawable.ic_qs_rotation_15);
             }
         } else {
             state.label = mContext.getString(R.string.quick_settings_rotation_unlocked_label);
             if (state.icon == null) {
-                state.icon = mContext.getDrawable(R.drawable.ic_rotate_24_01);
+                state.icon = mContext.getDrawable(R.drawable.ic_qs_rotation_01);
             }
         }
     }
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/ZenModeDetail.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/ZenModeDetail.java
index dceb856..2edefe7 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/ZenModeDetail.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/ZenModeDetail.java
@@ -32,6 +32,7 @@
 import android.widget.ArrayAdapter;
 import android.widget.CompoundButton;
 import android.widget.CompoundButton.OnCheckedChangeListener;
+import android.widget.ImageView;
 import android.widget.ListView;
 import android.widget.RadioButton;
 import android.widget.RelativeLayout;
@@ -39,7 +40,6 @@
 import android.widget.TextView;
 
 import com.android.systemui.R;
-import com.android.systemui.qs.QSImageView;
 import com.android.systemui.qs.QSTile;
 import com.android.systemui.statusbar.policy.ZenModeController;
 
@@ -72,9 +72,7 @@
         mContext = getContext();
         mController = mHost.getZenModeController();
 
-        final QSImageView close = (QSImageView) findViewById(android.R.id.button1);
-        close.setImageDrawable(mHost.getVectorDrawable(R.drawable.ic_qs_close));
-        close.setEnabledVersion(true);
+        final ImageView close = (ImageView) findViewById(android.R.id.button1);
         close.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
@@ -239,9 +237,7 @@
             title.setText(condition.summary);
             title.setEnabled(enabled);
             title.setAlpha(enabled ? 1 : .5f);
-            final QSImageView button1 = (QSImageView) row.findViewById(android.R.id.button1);
-            button1.setImageDrawable(mHost.getVectorDrawable(R.drawable.ic_qs_minus));
-            button1.setEnabledVersion(true);
+            final ImageView button1 = (ImageView) row.findViewById(android.R.id.button1);
             button1.setOnClickListener(new OnClickListener() {
                 @Override
                 public void onClick(View v) {
@@ -250,9 +246,7 @@
                 }
             });
 
-            final QSImageView button2 = (QSImageView) row.findViewById(android.R.id.button2);
-            button2.setImageDrawable(mHost.getVectorDrawable(R.drawable.ic_qs_plus));
-            button2.setEnabledVersion(true);
+            final ImageView button2 = (ImageView) row.findViewById(android.R.id.button2);
             button2.setOnClickListener(new OnClickListener() {
                 @Override
                 public void onClick(View v) {
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/ZenModeTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/ZenModeTile.java
index dbfef0c..bfa9c19 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/ZenModeTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/ZenModeTile.java
@@ -73,8 +73,7 @@
         final boolean zen = arg instanceof Boolean ? (Boolean)arg : mController.isZen();
         state.value = zen;
         state.visible = true;
-        state.iconId = R.drawable.stat_sys_zen_limited;
-        state.icon = mHost.getVectorDrawable(R.drawable.ic_qs_zen);
+        state.iconId = zen ? R.drawable.ic_qs_zen_on : R.drawable.ic_qs_zen_off;
         state.label = mContext.getString(R.string.zen_mode_title);
     }
 
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/InterceptedNotifications.java b/packages/SystemUI/src/com/android/systemui/statusbar/InterceptedNotifications.java
index 6401695..9c39002 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/InterceptedNotifications.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/InterceptedNotifications.java
@@ -89,7 +89,7 @@
             return;
         }
         final Notification n = new Notification.Builder(mContext)
-                .setSmallIcon(R.drawable.stat_sys_zen_limited)
+                .setSmallIcon(R.drawable.ic_qs_zen_on)
                 .setContentTitle(mContext.getResources().getQuantityString(
                         R.plurals.zen_mode_notification_title,
                         mIntercepted.size(), mIntercepted.size()))
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index a92061f..a685073 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -619,7 +619,7 @@
         mMoreIcon = mStatusBarView.findViewById(R.id.moreIcon);
         mNotificationIcons.setOverflowIndicator(mMoreIcon);
         mModeIcon = (ImageView)mStatusBarView.findViewById(R.id.modeIcon);
-        mModeIcon.setImageResource(R.drawable.stat_sys_zen_limited);
+        mModeIcon.setImageResource(R.drawable.ic_qs_zen_on);
         mStatusBarContents = (LinearLayout)mStatusBarView.findViewById(R.id.status_bar_contents);
         mTickerView = mStatusBarView.findViewById(R.id.ticker);
 
@@ -2565,13 +2565,13 @@
                 || (mDisabled & StatusBarManager.DISABLE_SEARCH) != 0;
     }
 
-    public void postStartSettingsActivity(final Intent intent) {
-        mHandler.post(new Runnable() {
+    public void postStartSettingsActivity(final Intent intent, int delay) {
+        mHandler.postDelayed(new Runnable() {
             @Override
             public void run() {
                 handleStartSettingsActivity(intent, true /*onlyProvisioned*/);
             }
-        });
+        }, delay);
     }
 
     private void handleStartSettingsActivity(Intent intent, boolean onlyProvisioned) {
@@ -2587,7 +2587,7 @@
     }
 
     public void startSettingsActivity(String action) {
-        postStartSettingsActivity(new Intent(action));
+        postStartSettingsActivity(new Intent(action), 0);
     }
 
     private static class FastColorDrawable extends Drawable {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java
index 1fe3be5..7029898 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java
@@ -18,7 +18,6 @@
 
 import android.content.Context;
 import android.content.Intent;
-import android.graphics.drawable.VectorDrawable;
 import android.os.HandlerThread;
 import android.os.Looper;
 
@@ -113,7 +112,7 @@
 
     @Override
     public void startSettingsActivity(final Intent intent) {
-        mStatusBar.postStartSettingsActivity(intent);
+        mStatusBar.postStartSettingsActivity(intent, QSTile.FEEDBACK_START_DELAY);
     }
 
     @Override
@@ -137,11 +136,6 @@
     }
 
     @Override
-    public VectorDrawable getVectorDrawable(int resId) {
-        return (VectorDrawable) mContext.getDrawable(resId);
-    }
-
-    @Override
     public BluetoothController getBluetoothController() {
         return mBluetooth;
     }
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
index e204cb2..2fea785 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
@@ -36,6 +36,7 @@
 import com.android.internal.widget.ActionBarContextView;
 import com.android.internal.widget.ActionBarOverlayLayout;
 import com.android.internal.widget.ActionBarView;
+import com.android.internal.widget.DecorContentParent;
 import com.android.internal.widget.SwipeDismissLayout;
 
 import android.app.ActivityManager;
@@ -147,7 +148,7 @@
 
     private TextView mTitleView;
 
-    private ActionBarView mActionBar;
+    private DecorContentParent mDecorContentParent;
     private ActionMenuPresenterCallback mActionMenuPresenterCallback;
     private PanelMenuPresenterCallback mPanelMenuPresenterCallback;
 
@@ -441,8 +442,8 @@
     public void setTitle(CharSequence title) {
         if (mTitleView != null) {
             mTitleView.setText(title);
-        } else if (mActionBar != null) {
-            mActionBar.setWindowTitle(title);
+        } else if (mDecorContentParent != null) {
+            mDecorContentParent.setWindowTitle(title);
         }
         mTitle = title;
     }
@@ -489,10 +490,10 @@
         final boolean isActionBarMenu =
                 (st.featureId == FEATURE_OPTIONS_PANEL || st.featureId == FEATURE_ACTION_BAR);
 
-        if (isActionBarMenu && mActionBar != null) {
+        if (isActionBarMenu && mDecorContentParent != null) {
             // Enforce ordering guarantees around events so that the action bar never
             // dispatches menu-related events before the panel is prepared.
-            mActionBar.setMenuPrepared();
+            mDecorContentParent.setMenuPrepared();
         }
 
         if (st.createdPanelView == null) {
@@ -504,11 +505,11 @@
                     }
                 }
 
-                if (isActionBarMenu && mActionBar != null) {
+                if (isActionBarMenu && mDecorContentParent != null) {
                     if (mActionMenuPresenterCallback == null) {
                         mActionMenuPresenterCallback = new ActionMenuPresenterCallback();
                     }
-                    mActionBar.setMenu(st.menu, mActionMenuPresenterCallback);
+                    mDecorContentParent.setMenu(st.menu, mActionMenuPresenterCallback);
                 }
 
                 // Call callback, and return if it doesn't want to display menu.
@@ -520,9 +521,9 @@
                     // Ditch the menu created above
                     st.setMenu(null);
 
-                    if (isActionBarMenu && mActionBar != null) {
+                    if (isActionBarMenu && mDecorContentParent != null) {
                         // Don't show it in the action bar either
-                        mActionBar.setMenu(null, mActionMenuPresenterCallback);
+                        mDecorContentParent.setMenu(null, mActionMenuPresenterCallback);
                     }
 
                     return false;
@@ -545,10 +546,10 @@
             }
 
             if (!cb.onPreparePanel(st.featureId, st.createdPanelView, st.menu)) {
-                if (isActionBarMenu && mActionBar != null) {
+                if (isActionBarMenu && mDecorContentParent != null) {
                     // The app didn't want to show the menu for now but it still exists.
                     // Clear it out of the action bar.
-                    mActionBar.setMenu(null, mActionMenuPresenterCallback);
+                    mDecorContentParent.setMenu(null, mActionMenuPresenterCallback);
                 }
                 st.menu.startDispatchingItemsChanged();
                 return false;
@@ -573,7 +574,7 @@
     @Override
     public void onConfigurationChanged(Configuration newConfig) {
         // Action bars handle their own menu state
-        if (mActionBar == null) {
+        if (mDecorContentParent == null) {
             PanelFeatureState st = getPanelState(FEATURE_OPTIONS_PANEL, false);
             if ((st != null) && (st.menu != null)) {
                 if (st.isOpen) {
@@ -625,12 +626,10 @@
 
     @Override
     public final void openPanel(int featureId, KeyEvent event) {
-        if (featureId == FEATURE_OPTIONS_PANEL && mActionBar != null &&
-                mActionBar.isOverflowReserved() &&
+        if (featureId == FEATURE_OPTIONS_PANEL && mDecorContentParent != null &&
+                mDecorContentParent.canShowOverflowMenu() &&
                 !ViewConfiguration.get(getContext()).hasPermanentMenuKey()) {
-            if (mActionBar.getVisibility() == View.VISIBLE) {
-                mActionBar.showOverflowMenu();
-            }
+            mDecorContentParent.showOverflowMenu();
         } else {
             openPanel(getPanelState(featureId, true), event);
         }
@@ -759,10 +758,10 @@
 
     @Override
     public final void closePanel(int featureId) {
-        if (featureId == FEATURE_OPTIONS_PANEL && mActionBar != null &&
-                mActionBar.isOverflowReserved() &&
+        if (featureId == FEATURE_OPTIONS_PANEL && mDecorContentParent != null &&
+                mDecorContentParent.canShowOverflowMenu() &&
                 !ViewConfiguration.get(getContext()).hasPermanentMenuKey()) {
-            mActionBar.hideOverflowMenu();
+            mDecorContentParent.hideOverflowMenu();
         } else if (featureId == FEATURE_CONTEXT_MENU) {
             closeContextMenu();
         } else {
@@ -784,7 +783,7 @@
     public final void closePanel(PanelFeatureState st, boolean doCallback) {
         // System.out.println("Close panel: isOpen=" + st.isOpen);
         if (doCallback && st.featureId == FEATURE_OPTIONS_PANEL &&
-                mActionBar != null && mActionBar.isOverflowMenuShowing()) {
+                mDecorContentParent != null && mDecorContentParent.isOverflowMenuShowing()) {
             checkCloseActionMenu(st.menu);
             return;
         }
@@ -830,7 +829,7 @@
         }
 
         mClosingActionMenu = true;
-        mActionBar.dismissPopupMenus();
+        mDecorContentParent.dismissPopups();
         Callback cb = getCallback();
         if (cb != null && !isDestroyed()) {
             cb.onPanelClosed(FEATURE_ACTION_BAR, menu);
@@ -876,7 +875,7 @@
         
         // Prepare the options panel if we have an action bar
         if ((featureId == FEATURE_ACTION_BAR || featureId == FEATURE_OPTIONS_PANEL)
-                && mActionBar != null) {
+                && mDecorContentParent != null) {
             st = getPanelState(Window.FEATURE_OPTIONS_PANEL, false);
             if (st != null) {
                 st.isPrepared = false;
@@ -923,17 +922,15 @@
             
             boolean playSoundEffect = false;
             final PanelFeatureState st = getPanelState(featureId, true);
-            if (featureId == FEATURE_OPTIONS_PANEL && mActionBar != null &&
-                    mActionBar.isOverflowReserved() &&
+            if (featureId == FEATURE_OPTIONS_PANEL && mDecorContentParent != null &&
+                    mDecorContentParent.canShowOverflowMenu() &&
                     !ViewConfiguration.get(getContext()).hasPermanentMenuKey()) {
-                if (mActionBar.getVisibility() == View.VISIBLE) {
-                    if (!mActionBar.isOverflowMenuShowing()) {
-                        if (!isDestroyed() && preparePanel(st, event)) {
-                            playSoundEffect = mActionBar.showOverflowMenu();
-                        }
-                    } else {
-                        playSoundEffect = mActionBar.hideOverflowMenu();
+                if (!mDecorContentParent.isOverflowMenuShowing()) {
+                    if (!isDestroyed() && preparePanel(st, event)) {
+                        playSoundEffect = mDecorContentParent.showOverflowMenu();
                     }
+                } else {
+                    playSoundEffect = mDecorContentParent.hideOverflowMenu();
                 }
             } else {
                 if (st.isOpen || st.isHandled) {
@@ -1046,7 +1043,7 @@
             st.isHandled = true;
 
             // Only close down the menu if we don't have an action bar keeping it open.
-            if ((flags & Menu.FLAG_PERFORM_NO_CLOSE) == 0 && mActionBar == null) {
+            if ((flags & Menu.FLAG_PERFORM_NO_CLOSE) == 0 && mDecorContentParent == null) {
                 closePanel(st, true);
             }
         }
@@ -1068,7 +1065,7 @@
         boolean res = st.menu.performIdentifierAction(id, flags);
 
         // Only close down the menu if we don't have an action bar keeping it open.
-        if (mActionBar == null) {
+        if (mDecorContentParent == null) {
             closePanel(st, true);
         }
 
@@ -1103,12 +1100,12 @@
     }
 
     private void reopenMenu(boolean toggleMenuMode) {
-        if (mActionBar != null && mActionBar.isOverflowReserved() &&
+        if (mDecorContentParent != null && mDecorContentParent.canShowOverflowMenu() &&
                 (!ViewConfiguration.get(getContext()).hasPermanentMenuKey() ||
-                        mActionBar.isOverflowMenuShowPending())) {
+                        mDecorContentParent.isOverflowMenuShowPending())) {
             final Callback cb = getCallback();
-            if (!mActionBar.isOverflowMenuShowing() || !toggleMenuMode) {
-                if (cb != null && !isDestroyed() && mActionBar.getVisibility() == View.VISIBLE) {
+            if (!mDecorContentParent.isOverflowMenuShowing() || !toggleMenuMode) {
+                if (cb != null && !isDestroyed()) {
                     // If we have a menu invalidation pending, do it now.
                     if (mInvalidatePanelMenuPosted &&
                             (mInvalidatePanelMenuFeatures & (1 << FEATURE_OPTIONS_PANEL)) != 0) {
@@ -1123,11 +1120,11 @@
                     if (st.menu != null && !st.refreshMenuContent &&
                             cb.onPreparePanel(FEATURE_OPTIONS_PANEL, st.createdPanelView, st.menu)) {
                         cb.onMenuOpened(FEATURE_ACTION_BAR, st.menu);
-                        mActionBar.showOverflowMenu();
+                        mDecorContentParent.showOverflowMenu();
                     }
                 }
             } else {
-                mActionBar.hideOverflowMenu();
+                mDecorContentParent.hideOverflowMenu();
                 if (cb != null && !isDestroyed()) {
                     final PanelFeatureState st = getPanelState(FEATURE_OPTIONS_PANEL, true);
                     cb.onPanelClosed(FEATURE_ACTION_BAR, st.menu);
@@ -1164,7 +1161,7 @@
 
         // If we have an action bar, initialize the menu with a context themed for it.
         if ((st.featureId == FEATURE_OPTIONS_PANEL || st.featureId == FEATURE_ACTION_BAR) &&
-                mActionBar != null) {
+                mDecorContentParent != null) {
             TypedValue outValue = new TypedValue();
             Resources.Theme currentTheme = context.getTheme();
             currentTheme.resolveAttribute(com.android.internal.R.attr.actionBarWidgetTheme,
@@ -1509,8 +1506,8 @@
         mIconRes = resId;
         mResourcesSetFlags |= FLAG_RESOURCE_SET_ICON;
         mResourcesSetFlags &= ~FLAG_RESOURCE_SET_ICON_FALLBACK;
-        if (mActionBar != null) {
-            mActionBar.setIcon(resId);
+        if (mDecorContentParent != null) {
+            mDecorContentParent.setIcon(resId);
         }
     }
 
@@ -1520,13 +1517,14 @@
             return;
         }
         mIconRes = resId;
-        if (mActionBar != null && (!mActionBar.hasIcon() ||
+        if (mDecorContentParent != null && (!mDecorContentParent.hasIcon() ||
                 (mResourcesSetFlags & FLAG_RESOURCE_SET_ICON_FALLBACK) != 0)) {
             if (resId != 0) {
-                mActionBar.setIcon(resId);
+                mDecorContentParent.setIcon(resId);
                 mResourcesSetFlags &= ~FLAG_RESOURCE_SET_ICON_FALLBACK;
             } else {
-                mActionBar.setIcon(getContext().getPackageManager().getDefaultActivityIcon());
+                mDecorContentParent.setIcon(
+                        getContext().getPackageManager().getDefaultActivityIcon());
                 mResourcesSetFlags |= FLAG_RESOURCE_SET_ICON_FALLBACK;
             }
         }
@@ -1536,8 +1534,8 @@
     public void setLogo(int resId) {
         mLogoRes = resId;
         mResourcesSetFlags |= FLAG_RESOURCE_SET_LOGO;
-        if (mActionBar != null) {
-            mActionBar.setLogo(resId);
+        if (mDecorContentParent != null) {
+            mDecorContentParent.setLogo(resId);
         }
     }
 
@@ -1547,8 +1545,8 @@
             return;
         }
         mLogoRes = resId;
-        if (mActionBar != null && !mActionBar.hasLogo()) {
-            mActionBar.setLogo(resId);
+        if (mDecorContentParent != null && !mDecorContentParent.hasLogo()) {
+            mDecorContentParent.setLogo(resId);
         }
     }
 
@@ -1805,9 +1803,9 @@
             outState.putSparseParcelableArray(PANELS_TAG, panelStates);
         }
 
-        if (mActionBar != null) {
+        if (mDecorContentParent != null) {
             SparseArray<Parcelable> actionBarStates = new SparseArray<Parcelable>();
-            mActionBar.saveHierarchyState(actionBarStates);
+            mDecorContentParent.saveToolbarHierarchyState(actionBarStates);
             outState.putSparseParcelableArray(ACTION_BAR_TAG, actionBarStates);
         }
 
@@ -1846,11 +1844,11 @@
             restorePanelState(panelStates);
         }
 
-        if (mActionBar != null) {
+        if (mDecorContentParent != null) {
             SparseArray<Parcelable> actionBarStates =
                     savedInstanceState.getSparseParcelableArray(ACTION_BAR_TAG);
             if (actionBarStates != null) {
-                mActionBar.restoreHierarchyState(actionBarStates);
+                mDecorContentParent.restoreToolbarHierarchyState(actionBarStates);
             } else {
                 Log.w(TAG, "Missing saved instance states for action bar views! " +
                         "State will not be restored.");
@@ -2124,12 +2122,7 @@
         }
 
         public boolean superDispatchKeyEvent(KeyEvent event) {
-            if (super.dispatchKeyEvent(event)) {
-                return true;
-            }
-
-            // Not handled by the view hierarchy, does the action bar want it
-            // to cancel out of something special?
+            // Give priority to closing action modes if applicable.
             if (event.getKeyCode() == KeyEvent.KEYCODE_BACK) {
                 final int action = event.getAction();
                 // Back cancels action modes first.
@@ -2139,17 +2132,9 @@
                     }
                     return true;
                 }
-
-                // Next collapse any expanded action views.
-                if (mActionBar != null && mActionBar.hasExpandedActionView()) {
-                    if (action == KeyEvent.ACTION_UP) {
-                        mActionBar.collapseActionView();
-                    }
-                    return true;
-                }
             }
 
-            return false;
+            return super.dispatchKeyEvent(event);
         }
 
         public boolean superDispatchKeyShortcutEvent(KeyEvent event) {
@@ -2844,8 +2829,8 @@
                 cb.onDetachedFromWindow();
             }
 
-            if (mActionBar != null) {
-                mActionBar.dismissPopupMenus();
+            if (mDecorContentParent != null) {
+                mDecorContentParent.dismissPopups();
             }
 
             if (mActionModePopup != null) {
@@ -3281,96 +3266,68 @@
             // Set up decor part of UI to ignore fitsSystemWindows if appropriate.
             mDecor.makeOptionalFitsSystemWindows();
 
-            mTitleView = (TextView)findViewById(com.android.internal.R.id.title);
-            if (mTitleView != null) {
-                mTitleView.setLayoutDirection(mDecor.getLayoutDirection());
-                if ((getLocalFeatures() & (1 << FEATURE_NO_TITLE)) != 0) {
-                    View titleContainer = findViewById(com.android.internal.R.id.title_container);
-                    if (titleContainer != null) {
-                        titleContainer.setVisibility(View.GONE);
-                    } else {
-                        mTitleView.setVisibility(View.GONE);
-                    }
-                    if (mContentParent instanceof FrameLayout) {
-                        ((FrameLayout)mContentParent).setForeground(null);
-                    }
-                } else {
-                    mTitleView.setText(mTitle);
+            final DecorContentParent decorContentParent = (DecorContentParent) mDecor.findViewById(
+                    com.android.internal.R.id.decor_content_parent);
+
+            if (decorContentParent != null) {
+                mDecorContentParent = decorContentParent;
+                mDecorContentParent.setWindowCallback(getCallback());
+                if (mDecorContentParent.getTitle() == null) {
+                    mDecorContentParent.setWindowTitle(mTitle);
                 }
-            } else {
-                mActionBar = (ActionBarView) findViewById(com.android.internal.R.id.action_bar);
-                if (mActionBar != null) {
-                    mActionBar.setWindowCallback(getCallback());
-                    if (mActionBar.getTitle() == null) {
-                        mActionBar.setWindowTitle(mTitle);
-                    }
-                    final int localFeatures = getLocalFeatures();
-                    if ((localFeatures & (1 << FEATURE_PROGRESS)) != 0) {
-                        mActionBar.initProgress();
-                    }
-                    if ((localFeatures & (1 << FEATURE_INDETERMINATE_PROGRESS)) != 0) {
-                        mActionBar.initIndeterminateProgress();
-                    }
 
-                    final ActionBarOverlayLayout abol = (ActionBarOverlayLayout) findViewById(
-                            com.android.internal.R.id.action_bar_overlay_layout);
-                    if (abol != null) {
-                        abol.setOverlayMode(
-                                (localFeatures & (1 << FEATURE_ACTION_BAR_OVERLAY)) != 0);
+                final int localFeatures = getLocalFeatures();
+                for (int i = 0; i < FEATURE_MAX; i++) {
+                    if ((localFeatures & (1 << i)) != 0) {
+                        mDecorContentParent.initFeature(i);
                     }
+                }
 
-                    boolean splitActionBar = false;
-                    final boolean splitWhenNarrow =
-                            (mUiOptions & ActivityInfo.UIOPTION_SPLIT_ACTION_BAR_WHEN_NARROW) != 0;
-                    if (splitWhenNarrow) {
-                        splitActionBar = getContext().getResources().getBoolean(
-                                com.android.internal.R.bool.split_action_bar_is_narrow);
-                    } else {
-                        splitActionBar = getWindowStyle().getBoolean(
-                                com.android.internal.R.styleable.Window_windowSplitActionBar, false);
-                    }
-                    final ActionBarContainer splitView = (ActionBarContainer) findViewById(
-                            com.android.internal.R.id.split_action_bar);
-                    if (splitView != null) {
-                        mActionBar.setSplitView(splitView);
-                        mActionBar.setSplitActionBar(splitActionBar);
-                        mActionBar.setSplitWhenNarrow(splitWhenNarrow);
+                mDecorContentParent.setUiOptions(mUiOptions);
 
-                        final ActionBarContextView cab = (ActionBarContextView) findViewById(
-                                com.android.internal.R.id.action_context_bar);
-                        cab.setSplitView(splitView);
-                        cab.setSplitActionBar(splitActionBar);
-                        cab.setSplitWhenNarrow(splitWhenNarrow);
-                    } else if (splitActionBar) {
-                        Log.e(TAG, "Requested split action bar with " +
-                                "incompatible window decor! Ignoring request.");
-                    }
+                if ((mResourcesSetFlags & FLAG_RESOURCE_SET_ICON) != 0 ||
+                        (mIconRes != 0 && !mDecorContentParent.hasIcon())) {
+                    mDecorContentParent.setIcon(mIconRes);
+                } else if ((mResourcesSetFlags & FLAG_RESOURCE_SET_ICON) == 0 &&
+                        mIconRes == 0 && !mDecorContentParent.hasIcon()) {
+                    mDecorContentParent.setIcon(
+                            getContext().getPackageManager().getDefaultActivityIcon());
+                    mResourcesSetFlags |= FLAG_RESOURCE_SET_ICON_FALLBACK;
+                }
+                if ((mResourcesSetFlags & FLAG_RESOURCE_SET_LOGO) != 0 ||
+                        (mLogoRes != 0 && !mDecorContentParent.hasLogo())) {
+                    mDecorContentParent.setLogo(mLogoRes);
+                }
 
-                    if ((mResourcesSetFlags & FLAG_RESOURCE_SET_ICON) != 0 ||
-                            (mIconRes != 0 && !mActionBar.hasIcon())) {
-                        mActionBar.setIcon(mIconRes);
-                    } else if ((mResourcesSetFlags & FLAG_RESOURCE_SET_ICON) == 0 &&
-                            mIconRes == 0 && !mActionBar.hasIcon()) {
-                        mActionBar.setIcon(
-                                getContext().getPackageManager().getDefaultActivityIcon());
-                        mResourcesSetFlags |= FLAG_RESOURCE_SET_ICON_FALLBACK;
-                    }
-                    if ((mResourcesSetFlags & FLAG_RESOURCE_SET_LOGO) != 0 ||
-                            (mLogoRes != 0 && !mActionBar.hasLogo())) {
-                        mActionBar.setLogo(mLogoRes);
-                    }
-
-                    // Post the panel invalidate for later; avoid application onCreateOptionsMenu
-                    // being called in the middle of onCreate or similar.
-                    mDecor.post(new Runnable() {
-                        public void run() {
-                            // Invalidate if the panel menu hasn't been created before this.
-                            PanelFeatureState st = getPanelState(FEATURE_OPTIONS_PANEL, false);
-                            if (!isDestroyed() && (st == null || st.menu == null)) {
-                                invalidatePanelMenu(FEATURE_ACTION_BAR);
-                            }
+                // Post the panel invalidate for later; avoid application onCreateOptionsMenu
+                // being called in the middle of onCreate or similar.
+                mDecor.post(new Runnable() {
+                    public void run() {
+                        // Invalidate if the panel menu hasn't been created before this.
+                        PanelFeatureState st = getPanelState(FEATURE_OPTIONS_PANEL, false);
+                        if (!isDestroyed() && (st == null || st.menu == null)) {
+                            invalidatePanelMenu(FEATURE_ACTION_BAR);
                         }
-                    });
+                    }
+                });
+            } else {
+                mTitleView = (TextView)findViewById(com.android.internal.R.id.title);
+                if (mTitleView != null) {
+                    mTitleView.setLayoutDirection(mDecor.getLayoutDirection());
+                    if ((getLocalFeatures() & (1 << FEATURE_NO_TITLE)) != 0) {
+                        View titleContainer = findViewById(
+                                com.android.internal.R.id.title_container);
+                        if (titleContainer != null) {
+                            titleContainer.setVisibility(View.GONE);
+                        } else {
+                            mTitleView.setVisibility(View.GONE);
+                        }
+                        if (mContentParent instanceof FrameLayout) {
+                            ((FrameLayout)mContentParent).setForeground(null);
+                        }
+                    } else {
+                        mTitleView.setText(mTitle);
+                    }
                 }
             }
 
diff --git a/services/core/java/com/android/server/hdmi/HdmiCecController.java b/services/core/java/com/android/server/hdmi/HdmiCecController.java
index 5327ef4..986cb9b 100644
--- a/services/core/java/com/android/server/hdmi/HdmiCecController.java
+++ b/services/core/java/com/android/server/hdmi/HdmiCecController.java
@@ -24,6 +24,7 @@
 import android.os.Message;
 import android.util.Slog;
 import android.util.SparseArray;
+import android.util.SparseIntArray;
 
 import libcore.util.EmptyArray;
 
@@ -79,11 +80,12 @@
             new SparseArray<HdmiCecDeviceInfo>();
     // Set-like container for all local devices' logical address.
     // Key and value are same.
-    private final SparseArray<Integer> mLocalLogicalAddresses =
-            new SparseArray<Integer>();
+    private final SparseIntArray mLocalAddresses = new SparseIntArray();
 
     // Private constructor.  Use HdmiCecController.create().
     private HdmiCecController() {
+        // TODO: Consider restoring the local device addresses from persistent storage
+        //       to allocate the same addresses again if possible.
     }
 
     /**
@@ -109,6 +111,44 @@
     }
 
     /**
+     * Initialize {@link #mLocalAddresses} by allocating logical addresses for each hosted type.
+     *
+     * @param deviceTypes local device types
+     */
+    void initializeLocalDevices(int[] deviceTypes) {
+        for (int deviceType : deviceTypes) {
+            int preferred = getPreferredAddress(deviceType);
+            allocateLogicalAddress(deviceType, preferred, new AllocateLogicalAddressCallback() {
+                @Override
+                public void onAllocated(int deviceType, int logicalAddress) {
+                    addLogicalAddress(logicalAddress);
+                }
+            });
+        }
+    }
+
+    /**
+     * Get the preferred address for a given type.
+     *
+     * @param deviceType logical device type to get the address for
+     * @return preferred address; {@link HdmiCec#ADDR_UNREGISTERED} if not available.
+     */
+    private int getPreferredAddress(int deviceType) {
+        // Uses the data restored from persistent memory at boot up if they are available.
+        // Otherwise we return UNREGISTERED indicating there is no preferred address.
+        // Note that for address SPECIFIC_USE(14), HdmiCec.getTypeFromAddress() returns DEVICE_TV,
+        // meaning that we do not support device type video processor yet.
+        for (int i = 0; i < mLocalAddresses.size(); ++i) {
+            int address = mLocalAddresses.keyAt(i);
+            int type = HdmiCec.getTypeFromAddress(address);
+            if (type == deviceType) {
+                return address;
+            }
+        }
+        return HdmiCec.ADDR_UNREGISTERED;
+    }
+
+    /**
      * Interface to report allocated logical address.
      */
     interface AllocateLogicalAddressCallback {
@@ -322,7 +362,7 @@
      */
     int addLogicalAddress(int newLogicalAddress) {
         if (HdmiCec.isValidAddress(newLogicalAddress)) {
-            mLocalLogicalAddresses.append(newLogicalAddress, newLogicalAddress);
+            mLocalAddresses.put(newLogicalAddress, newLogicalAddress);
             return nativeAddLogicalAddress(mNativePtr, newLogicalAddress);
         } else {
             return -1;
@@ -337,7 +377,7 @@
     void clearLogicalAddress() {
         // TODO: consider to backup logical address so that new logical address
         // allocation can use it as preferred address.
-        mLocalLogicalAddresses.clear();
+        mLocalAddresses.clear();
         nativeClearLogicalAddress(mNativePtr);
     }
 
@@ -382,7 +422,7 @@
         // Can access command targeting devices available in local device or
         // broadcast command.
         return address == HdmiCec.ADDR_BROADCAST
-                || mLocalLogicalAddresses.get(address) != null;
+                || mLocalAddresses.indexOfKey(address) < 0;
     }
 
     private void onReceiveCommand(HdmiCecMessage message) {
diff --git a/services/core/java/com/android/server/hdmi/HdmiControlService.java b/services/core/java/com/android/server/hdmi/HdmiControlService.java
index ed48c12..7c136db 100644
--- a/services/core/java/com/android/server/hdmi/HdmiControlService.java
+++ b/services/core/java/com/android/server/hdmi/HdmiControlService.java
@@ -54,7 +54,10 @@
     @Override
     public void onStart() {
         mCecController = HdmiCecController.create(this);
-        if (mCecController == null) {
+        if (mCecController != null) {
+            mCecController.initializeLocalDevices(getContext().getResources()
+                    .getIntArray(com.android.internal.R.array.config_hdmiCecLogicalDeviceType));
+        } else {
             Slog.i(TAG, "Device does not support HDMI-CEC.");
         }