diff --git a/Android.mk b/Android.mk index dfcfa2b688e8..07bef1074533 100644 --- a/Android.mk +++ b/Android.mk @@ -794,6 +794,7 @@ aidl_files := \ frameworks/base/core/java/android/app/usage/UsageEvents.aidl \ frameworks/base/core/java/android/app/Notification.aidl \ frameworks/base/core/java/android/app/NotificationManager.aidl \ + frameworks/base/core/java/android/app/NotificationGroup.aidl \ frameworks/base/core/java/android/app/WallpaperInfo.aidl \ frameworks/base/core/java/android/app/AppOpsManager.aidl \ frameworks/base/core/java/android/app/ActivityManager.aidl \ diff --git a/api/system-current.txt b/api/system-current.txt index 2bc8a929cf4f..1027e835b109 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -224,6 +224,7 @@ package android { field public static final java.lang.String REQUEST_DELETE_PACKAGES = "android.permission.REQUEST_DELETE_PACKAGES"; field public static final java.lang.String REQUEST_IGNORE_BATTERY_OPTIMIZATIONS = "android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"; field public static final java.lang.String REQUEST_INSTALL_PACKAGES = "android.permission.REQUEST_INSTALL_PACKAGES"; + field public static final java.lang.String RESET_BATTERY_STATS = "android.permission.RESET_BATTERY_STATS"; field public static final deprecated java.lang.String RESTART_PACKAGES = "android.permission.RESTART_PACKAGES"; field public static final java.lang.String RESTRICTED_VR_ACCESS = "android.permission.RESTRICTED_VR_ACCESS"; field public static final java.lang.String RETRIEVE_WINDOW_CONTENT = "android.permission.RETRIEVE_WINDOW_CONTENT"; diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java index 2c04f8ff9548..e1940efda25b 100644 --- a/core/java/android/app/Activity.java +++ b/core/java/android/app/Activity.java @@ -133,6 +133,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; +import android.util.BoostFramework; /** * An activity is a single, focused thing that the user can do. Almost all @@ -696,6 +697,10 @@ public class Activity extends ContextThemeWrapper Window.OnWindowDismissedCallback, WindowControllerCallback, AutofillManager.AutofillClient { private static final String TAG = "Activity"; + private static BoostFramework mPerf = null; + private static int mDragBoostPossible = -1; + private static int mPerfLockDuration = -1; + private static int mAsParamVal[]; private static final boolean DEBUG_LIFECYCLE = false; /** Standard activity result: operation canceled. */ @@ -3301,6 +3306,46 @@ public boolean dispatchKeyShortcutEvent(KeyEvent event) { * @return boolean Return true if this event was consumed. */ public boolean dispatchTouchEvent(MotionEvent ev) { + if(mDragBoostPossible == -1) { + mDragBoostPossible = 0; + String currentActivity = getPackageName(); + String[] activityList = getResources().getStringArray( + com.android.internal.R.array.boost_activityList); + if(activityList != null){ + for (String match : activityList) { + if (currentActivity.indexOf(match) != -1){ + mDragBoostPossible = 1; + break; + } + } + } + } + + Context context = getApplicationContext(); + + if (mDragBoostPossible == 1) { + final boolean override = context.getResources().getBoolean( + com.android.internal.R.bool.config_debugBoost); + if (mPerf == null) { + mPerf = new BoostFramework(); + } + if (!override) { + if (mPerfLockDuration == -1) { + mPerfLockDuration = getResources().getInteger( + com.android.internal.R.integer.ascrollboost_timeout); + mAsParamVal = getResources().getIntArray( + com.android.internal.R.array.ascrollboost_param_value); + } + if (mPerfLockDuration != 0 && mAsParamVal.length != 0) { + mPerf.perfLockAcquireTouch(ev, + getResources().getDisplayMetrics(), + mPerfLockDuration, mAsParamVal); + } + } else { + mPerf.enableDebugBoost(context, ev, getResources().getDisplayMetrics()); + } + } + if (ev.getAction() == MotionEvent.ACTION_DOWN) { onUserInteraction(); } diff --git a/core/java/android/app/AlarmManager.java b/core/java/android/app/AlarmManager.java index 2813e8b9707e..41acb2d86bea 100644 --- a/core/java/android/app/AlarmManager.java +++ b/core/java/android/app/AlarmManager.java @@ -1000,6 +1000,17 @@ public long getNextWakeFromIdleTime() { } } + /** @hide */ + public String getSeenAlarms() { + try { + if (mService != null) { + return mService.getSeenAlarms(); + } + } catch (RemoteException e) { + } + return null; + } + /** * Gets information about the next alarm clock currently scheduled. * diff --git a/core/java/android/app/AppOpsManager.java b/core/java/android/app/AppOpsManager.java index b331d84010d0..2f535a1936cc 100644 --- a/core/java/android/app/AppOpsManager.java +++ b/core/java/android/app/AppOpsManager.java @@ -252,8 +252,10 @@ public class AppOpsManager { public static final int OP_INSTANT_APP_START_FOREGROUND = 68; /** @hide Answer incoming phone calls */ public static final int OP_ANSWER_PHONE_CALLS = 69; + /** @hide */ + public static final int OP_BOOT_COMPLETED = 70; /** @hide */ - public static final int _NUM_OP = 70; + public static final int _NUM_OP = 71; /** Access to coarse location information. */ public static final String OPSTR_COARSE_LOCATION = "android:coarse_location"; @@ -365,6 +367,9 @@ public class AppOpsManager { /** Answer incoming phone calls */ public static final String OPSTR_ANSWER_PHONE_CALLS = "android:answer_phone_calls"; + /** Required for start at boot **/ + private static final String OPSTR_BOOT_COMPLETED = + "android:boot_completed"; // Warning: If an permission is added here it also has to be added to // com.android.packageinstaller.permission.utils.EventLogger @@ -424,8 +429,8 @@ public class AppOpsManager { */ private static int[] sOpToSwitch = new int[] { OP_COARSE_LOCATION, - OP_COARSE_LOCATION, - OP_COARSE_LOCATION, + OP_FINE_LOCATION, + OP_GPS, OP_VIBRATE, OP_READ_CONTACTS, OP_WRITE_CONTACTS, @@ -464,8 +469,8 @@ public class AppOpsManager { OP_AUDIO_NOTIFICATION_VOLUME, OP_AUDIO_BLUETOOTH_VOLUME, OP_WAKE_LOCK, - OP_COARSE_LOCATION, - OP_COARSE_LOCATION, + OP_FINE_LOCATION, + OP_FINE_LOCATION, OP_GET_USAGE_STATS, OP_MUTE_MICROPHONE, OP_TOAST_WINDOW, @@ -492,7 +497,8 @@ public class AppOpsManager { OP_REQUEST_INSTALL_PACKAGES, OP_PICTURE_IN_PICTURE, OP_INSTANT_APP_START_FOREGROUND, - OP_ANSWER_PHONE_CALLS + OP_ANSWER_PHONE_CALLS, + OP_BOOT_COMPLETED }; /** @@ -570,6 +576,7 @@ public class AppOpsManager { OPSTR_PICTURE_IN_PICTURE, OPSTR_INSTANT_APP_START_FOREGROUND, OPSTR_ANSWER_PHONE_CALLS, + OPSTR_BOOT_COMPLETED, }; /** @@ -647,6 +654,7 @@ public class AppOpsManager { "PICTURE_IN_PICTURE", "INSTANT_APP_START_FOREGROUND", "ANSWER_PHONE_CALLS", + "BOOT_COMPLETED", }; /** @@ -724,6 +732,7 @@ public class AppOpsManager { null, // no permission for entering picture-in-picture on hide Manifest.permission.INSTANT_APP_FOREGROUND_SERVICE, Manifest.permission.ANSWER_PHONE_CALLS, + Manifest.permission.RECEIVE_BOOT_COMPLETED, }; /** @@ -802,6 +811,7 @@ public class AppOpsManager { null, // ENTER_PICTURE_IN_PICTURE_ON_HIDE null, // INSTANT_APP_START_FOREGROUND null, // ANSWER_PHONE_CALLS + null, //BOOT_COMPLETED }; /** @@ -879,6 +889,7 @@ public class AppOpsManager { false, // ENTER_PICTURE_IN_PICTURE_ON_HIDE false, // INSTANT_APP_START_FOREGROUND false, // ANSWER_PHONE_CALLS + false, // BOOT_COMPLETED }; /** @@ -955,6 +966,7 @@ public class AppOpsManager { AppOpsManager.MODE_ALLOWED, // OP_PICTURE_IN_PICTURE AppOpsManager.MODE_DEFAULT, // OP_INSTANT_APP_START_FOREGROUND AppOpsManager.MODE_ALLOWED, // ANSWER_PHONE_CALLS + AppOpsManager.MODE_ALLOWED, // OP_BOOT_COMPLETED }; /** @@ -1035,6 +1047,7 @@ public class AppOpsManager { false, // OP_PICTURE_IN_PICTURE false, false, // ANSWER_PHONE_CALLS + false, // OP_BOOT_COMPLETED }; /** diff --git a/core/java/android/app/DownloadManager.java b/core/java/android/app/DownloadManager.java index b444f17c0b69..50a4d177ee31 100644 --- a/core/java/android/app/DownloadManager.java +++ b/core/java/android/app/DownloadManager.java @@ -279,6 +279,13 @@ public class DownloadManager { */ public final static int PAUSED_UNKNOWN = 4; + /** + * Value of {@link #COLUMN_REASON} when the download is paused manually. + * + * @hide + */ + public final static int PAUSED_MANUAL = 5; + /** * Broadcast intent action sent by the download manager when a download completes. */ @@ -930,6 +937,7 @@ Cursor runQuery(ContentResolver resolver, String[] projection, Uri baseUri) { parts.add(statusClause("=", Downloads.Impl.STATUS_WAITING_TO_RETRY)); parts.add(statusClause("=", Downloads.Impl.STATUS_WAITING_FOR_NETWORK)); parts.add(statusClause("=", Downloads.Impl.STATUS_QUEUED_FOR_WIFI)); + parts.add(statusClause("=", Downloads.Impl.STATUS_PAUSED_MANUAL)); } if ((mStatusFlags & STATUS_SUCCESSFUL) != 0) { parts.add(statusClause("=", Downloads.Impl.STATUS_SUCCESS)); @@ -1180,6 +1188,34 @@ public void forceDownload(long... ids) { mResolver.update(mBaseUri, values, getWhereClauseForIds(ids), getWhereArgsForIds(ids)); } + /** + * Pause the given running download manually. + * + * @param id the ID of the download to be paused + * @return the number of downloads actually updated + * @hide + */ + public int pauseDownload(long id) { + ContentValues values = new ContentValues(); + values.put(Downloads.Impl.COLUMN_STATUS, Downloads.Impl.STATUS_PAUSED_MANUAL); + + return mResolver.update(ContentUris.withAppendedId(mBaseUri, id), values, null, null); + } + + /** + * Resume the given paused download manually. + * + * @param id the ID of the download to be resumed + * @return the number of downloads actually updated + * @hide + */ + public int resumeDownload(long id) { + ContentValues values = new ContentValues(); + values.put(Downloads.Impl.COLUMN_STATUS, Downloads.Impl.STATUS_RUNNING); + + return mResolver.update(ContentUris.withAppendedId(mBaseUri, id), values, null, null); + } + /** * Returns maximum size, in bytes, of downloads that may go over a mobile connection; or null if * there's no limit @@ -1564,6 +1600,9 @@ private long getPausedReason(int status) { case Downloads.Impl.STATUS_QUEUED_FOR_WIFI: return PAUSED_QUEUED_FOR_WIFI; + case Downloads.Impl.STATUS_PAUSED_MANUAL: + return PAUSED_MANUAL; + default: return PAUSED_UNKNOWN; } @@ -1619,6 +1658,7 @@ private int translateStatus(int status) { case Downloads.Impl.STATUS_WAITING_TO_RETRY: case Downloads.Impl.STATUS_WAITING_FOR_NETWORK: case Downloads.Impl.STATUS_QUEUED_FOR_WIFI: + case Downloads.Impl.STATUS_PAUSED_MANUAL: return STATUS_PAUSED; case Downloads.Impl.STATUS_SUCCESS: diff --git a/core/java/android/app/IAlarmManager.aidl b/core/java/android/app/IAlarmManager.aidl index 7b05b4918103..10a58863f825 100644 --- a/core/java/android/app/IAlarmManager.aidl +++ b/core/java/android/app/IAlarmManager.aidl @@ -37,4 +37,8 @@ interface IAlarmManager { void remove(in PendingIntent operation, in IAlarmListener listener); long getNextWakeFromIdleTime(); AlarmManager.AlarmClockInfo getNextAlarmClock(int userId); + // blocked alarms support + String getSeenAlarms(); + // update the uids being synchronized by network socket request manager + void updateBlockedUids(int uid, boolean isBlocked); } diff --git a/core/java/android/app/LoadedApk.java b/core/java/android/app/LoadedApk.java index f6d9710dae69..e5711f6307d0 100644 --- a/core/java/android/app/LoadedApk.java +++ b/core/java/android/app/LoadedApk.java @@ -1012,7 +1012,7 @@ public Application makeApplication(boolean forceDefaultAppClass, final int N = packageIdentifiers.size(); for (int i = 0; i < N; i++) { final int id = packageIdentifiers.keyAt(i); - if (id == 0x01 || id == 0x7f) { + if (id == 0x01 || id == 0x7f || id == 0x3f) { continue; } diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java index 7caeca3da6f8..67d918f75cdc 100644 --- a/core/java/android/app/Notification.java +++ b/core/java/android/app/Notification.java @@ -1204,6 +1204,13 @@ public String getSortKey() { public static final int BADGE_ICON_LARGE = 2; private int mBadgeIcon = BADGE_ICON_NONE; + /** + * Used by light picker in Settings to force + * notification lights on when screen is on + * @hide + */ + public static final String EXTRA_FORCE_SHOW_LIGHTS = "android.forceShowLights"; + /** * Structure to encapsulate a named action that can be shown as part of this notification. * It must include an icon, a label, and a {@link PendingIntent} to be fired when the action is diff --git a/core/java/android/app/NotificationChannel.java b/core/java/android/app/NotificationChannel.java index 556acdcfff81..f7b5c4c8f825 100644 --- a/core/java/android/app/NotificationChannel.java +++ b/core/java/android/app/NotificationChannel.java @@ -67,6 +67,8 @@ public final class NotificationChannel implements Parcelable { private static final String ATT_IMPORTANCE = "importance"; private static final String ATT_LIGHTS = "lights"; private static final String ATT_LIGHT_COLOR = "light_color"; + private static final String ATT_ON_TIME = "light_on_time"; + private static final String ATT_OFF_TIME = "light_off_time"; private static final String ATT_VIBRATION = "vibration"; private static final String ATT_VIBRATION_ENABLED = "vibration_enabled"; private static final String ATT_SOUND = "sound"; @@ -123,6 +125,8 @@ public final class NotificationChannel implements Parcelable { }; private static final int DEFAULT_LIGHT_COLOR = 0; + private static final int DEFAULT_ON_TIME = 0; + private static final int DEFAULT_OFF_TIME = 0; private static final int DEFAULT_VISIBILITY = NotificationManager.VISIBILITY_NO_OVERRIDE; private static final int DEFAULT_IMPORTANCE = @@ -139,6 +143,8 @@ public final class NotificationChannel implements Parcelable { private Uri mSound = Settings.System.DEFAULT_NOTIFICATION_URI; private boolean mLights; private int mLightColor = DEFAULT_LIGHT_COLOR; + private int mLightOnTime = DEFAULT_ON_TIME; + private int mLightOffTime = DEFAULT_OFF_TIME; private long[] mVibration; private int mUserLockedFields; private boolean mVibrationEnabled; @@ -206,6 +212,8 @@ protected NotificationChannel(Parcel in) { } mAudioAttributes = in.readInt() > 0 ? AudioAttributes.CREATOR.createFromParcel(in) : null; mLightColor = in.readInt(); + mLightOnTime = in.readInt(); + mLightOffTime = in.readInt(); mBlockableSystem = in.readBoolean(); } @@ -257,6 +265,8 @@ public void writeToParcel(Parcel dest, int flags) { dest.writeInt(0); } dest.writeInt(mLightColor); + dest.writeInt(mLightOnTime); + dest.writeInt(mLightOffTime); dest.writeBoolean(mBlockableSystem); } @@ -378,6 +388,28 @@ public void setLightColor(int argb) { this.mLightColor = argb; } + /** + * Sets the notification light ON time for notifications posted to this channel, if lights are + * {@link #enableLights(boolean) enabled} on this channel and the device supports that feature. + * + * Only modifiable before the channel is submitted to + * {@link NotificationManager#notify(String, int, Notification)}. + */ + public void setLightOnTime(int time) { + this.mLightOnTime = time; + } + + /** + * Sets the notification light OFF time for notifications posted to this channel, if lights are + * {@link #enableLights(boolean) enabled} on this channel and the device supports that feature. + * + * Only modifiable before the channel is submitted to + * {@link NotificationManager#notify(String, int, Notification)}. + */ + public void setLightOffTime(int time) { + this.mLightOffTime = time; + } + /** * Sets whether notification posted to this channel should vibrate. The vibration pattern can * be set with {@link #setVibrationPattern(long[])}. @@ -502,6 +534,22 @@ public int getLightColor() { return mLightColor; } + /** + * Returns the notification light ON time for notifications posted to this channel. Irrelevant + * unless {@link #shouldShowLights()}. + */ + public int getLightOnTime() { + return mLightOnTime; + } + + /** + * Returns the notification light OFF time for notifications posted to this channel. Irrelevant + * unless {@link #shouldShowLights()}. + */ + public int getLightOffTime() { + return mLightOffTime; + } + /** * Returns whether notifications posted to this channel always vibrate. */ @@ -601,6 +649,8 @@ private void populateFromXml(XmlPullParser parser, boolean forRestore, enableLights(safeBool(parser, ATT_LIGHTS, false)); setLightColor(safeInt(parser, ATT_LIGHT_COLOR, DEFAULT_LIGHT_COLOR)); + setLightOnTime(safeInt(parser, ATT_ON_TIME, DEFAULT_ON_TIME)); + setLightOffTime(safeInt(parser, ATT_OFF_TIME, DEFAULT_OFF_TIME)); setVibrationPattern(safeLongArray(parser, ATT_VIBRATION, null)); enableVibration(safeBool(parser, ATT_VIBRATION_ENABLED, false)); setShowBadge(safeBool(parser, ATT_SHOW_BADGE, false)); @@ -702,6 +752,12 @@ private void writeXml(XmlSerializer out, boolean forBackup, @Nullable Context co if (getLightColor() != DEFAULT_LIGHT_COLOR) { out.attribute(null, ATT_LIGHT_COLOR, Integer.toString(getLightColor())); } + if (getLightOnTime() != DEFAULT_ON_TIME) { + out.attribute(null, ATT_ON_TIME, Integer.toString(getLightOnTime())); + } + if (getLightOffTime() != DEFAULT_OFF_TIME) { + out.attribute(null, ATT_OFF_TIME, Integer.toString(getLightOffTime())); + } if (shouldVibrate()) { out.attribute(null, ATT_VIBRATION_ENABLED, Boolean.toString(shouldVibrate())); } @@ -757,6 +813,8 @@ public JSONObject toJson() throws JSONException { } record.put(ATT_LIGHTS, Boolean.toString(shouldShowLights())); record.put(ATT_LIGHT_COLOR, Integer.toString(getLightColor())); + record.put(ATT_ON_TIME, Integer.toString(getLightOnTime())); + record.put(ATT_OFF_TIME, Integer.toString(getLightOffTime())); record.put(ATT_VIBRATION_ENABLED, Boolean.toString(shouldVibrate())); record.put(ATT_USER_LOCKED, Integer.toString(getUserLockedFields())); record.put(ATT_VIBRATION, longArrayToString(getVibrationPattern())); @@ -859,6 +917,8 @@ public boolean equals(Object o) { if (getLockscreenVisibility() != that.getLockscreenVisibility()) return false; if (mLights != that.mLights) return false; if (getLightColor() != that.getLightColor()) return false; + if (getLightOnTime() != that.getLightOnTime()) return false; + if (getLightOffTime() != that.getLightOffTime()) return false; if (getUserLockedFields() != that.getUserLockedFields()) return false; if (mVibrationEnabled != that.mVibrationEnabled) return false; if (mShowBadge != that.mShowBadge) return false; @@ -895,6 +955,8 @@ public int hashCode() { result = 31 * result + (getSound() != null ? getSound().hashCode() : 0); result = 31 * result + (mLights ? 1 : 0); result = 31 * result + getLightColor(); + result = 31 * result + getLightOnTime(); + result = 31 * result + getLightOffTime(); result = 31 * result + Arrays.hashCode(mVibration); result = 31 * result + getUserLockedFields(); result = 31 * result + (mVibrationEnabled ? 1 : 0); @@ -918,6 +980,8 @@ public String toString() { ", mSound=" + mSound + ", mLights=" + mLights + ", mLightColor=" + mLightColor + + ", mLightOnTime=" + mLightOnTime + + ", mLightOffTime=" + mLightOffTime + ", mVibration=" + Arrays.toString(mVibration) + ", mUserLockedFields=" + mUserLockedFields + ", mVibrationEnabled=" + mVibrationEnabled + diff --git a/core/java/android/app/NotificationGroup.aidl b/core/java/android/app/NotificationGroup.aidl new file mode 100644 index 000000000000..44b62907fb42 --- /dev/null +++ b/core/java/android/app/NotificationGroup.aidl @@ -0,0 +1,19 @@ +/** + * Copyright (c) 2012, The CyanogenMod 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.app; + +parcelable NotificationGroup; diff --git a/core/java/android/app/NotificationGroup.java b/core/java/android/app/NotificationGroup.java new file mode 100644 index 000000000000..bcb70d31749e --- /dev/null +++ b/core/java/android/app/NotificationGroup.java @@ -0,0 +1,201 @@ +/* + * Copyright (C) 2011 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.app; + +import org.xmlpull.v1.XmlPullParser; +import org.xmlpull.v1.XmlPullParserException; + +import android.content.Context; +import android.os.Parcel; +import android.os.Parcelable; +import android.os.ParcelUuid; +import android.os.RemoteException; +import android.text.TextUtils; +import android.util.Log; + +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; +import java.util.UUID; + +/** @hide */ +public class NotificationGroup implements Parcelable { + private static final String TAG = "NotificationGroup"; + + private String mName; + private int mNameResId; + + private UUID mUuid; + + private Set mPackages = new HashSet(); + + private boolean mDirty; + + public static final Parcelable.Creator CREATOR = new Parcelable.Creator() { + public NotificationGroup createFromParcel(Parcel in) { + return new NotificationGroup(in); + } + + @Override + public NotificationGroup[] newArray(int size) { + return new NotificationGroup[size]; + } + }; + + public NotificationGroup(String name) { + this(name, -1, null); + } + + public NotificationGroup(String name, int nameResId, UUID uuid) { + mName = name; + mNameResId = nameResId; + mUuid = (uuid != null) ? uuid : UUID.randomUUID(); + mDirty = uuid == null; + } + + private NotificationGroup(Parcel in) { + readFromParcel(in); + } + + @Override + public String toString() { + return getName(); + } + + public String getName() { + return mName; + } + + public void setName(String name) { + mName = name; + mNameResId = -1; + mDirty = true; + } + + public UUID getUuid() { + return mUuid; + } + + public void addPackage(String pkg) { + mPackages.add(pkg); + mDirty = true; + } + + public String[] getPackages() { + return mPackages.toArray(new String[mPackages.size()]); + } + + public void removePackage(String pkg) { + mPackages.remove(pkg); + mDirty = true; + } + + public boolean hasPackage(String pkg) { + return mPackages.contains(pkg); + } + + public boolean isDirty() { + return mDirty; + } + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel dest, int flags) { + dest.writeString(mName); + dest.writeInt(mNameResId); + dest.writeInt(mDirty ? 1 : 0); + new ParcelUuid(mUuid).writeToParcel(dest, 0); + dest.writeStringArray(getPackages()); + } + + public void readFromParcel(Parcel in) { + mName = in.readString(); + mNameResId = in.readInt(); + mDirty = in.readInt() != 0; + mUuid = ParcelUuid.CREATOR.createFromParcel(in).getUuid(); + mPackages.addAll(Arrays.asList(in.readStringArray())); + } + + public void getXmlString(StringBuilder builder, Context context) { + builder.append(" 0) { + builder.append("nameres=\""); + builder.append(context.getResources().getResourceEntryName(mNameResId)); + } else { + builder.append("name=\""); + builder.append(TextUtils.htmlEncode(getName())); + } + builder.append("\" uuid=\""); + builder.append(TextUtils.htmlEncode(getUuid().toString())); + builder.append("\">\n"); + for (String pkg : mPackages) { + builder.append("" + TextUtils.htmlEncode(pkg) + "\n"); + } + builder.append("\n"); + mDirty = false; + } + + public static NotificationGroup fromXml(XmlPullParser xpp, Context context) + throws XmlPullParserException, IOException { + String value = xpp.getAttributeValue(null, "nameres"); + int nameResId = -1; + String name = null; + UUID uuid = null; + + if (value != null) { + nameResId = context.getResources().getIdentifier(value, "string", "android"); + if (nameResId > 0) { + name = context.getResources().getString(nameResId); + } + } + + if (name == null) { + name = xpp.getAttributeValue(null, "name"); + } + + value = xpp.getAttributeValue(null, "uuid"); + if (value != null) { + try { + uuid = UUID.fromString(value); + } catch (IllegalArgumentException e) { + Log.w(TAG, "UUID not recognized for " + name + ", using new one."); + } + } + + NotificationGroup notificationGroup = new NotificationGroup(name, nameResId, uuid); + int event = xpp.next(); + while (event != XmlPullParser.END_TAG || !xpp.getName().equals("notificationGroup")) { + if (event == XmlPullParser.START_TAG) { + if (xpp.getName().equals("package")) { + String pkg = xpp.nextText(); + notificationGroup.addPackage(pkg); + } + } + event = xpp.next(); + } + + /* we just loaded from XML, no need to save */ + notificationGroup.mDirty = false; + + return notificationGroup; + } +} diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java index 121b58a2b104..0c43e23b13c5 100644 --- a/core/java/android/app/admin/DevicePolicyManager.java +++ b/core/java/android/app/admin/DevicePolicyManager.java @@ -8109,4 +8109,24 @@ public List getOwnerInstalledCaCerts(@NonNull UserHandle user) { throw re.rethrowFromSystemServer(); } } + + /** + * Lineage: check if secure keyguard is required + * @hide + */ + public boolean requireSecureKeyguard() { + return requireSecureKeyguard(UserHandle.myUserId()); + } + + /** @hide */ + public boolean requireSecureKeyguard(int userHandle) { + if (mService != null) { + try { + return mService.requireSecureKeyguard(userHandle); + } catch (RemoteException e) { + Log.w(TAG, "Failed to get secure keyguard requirement"); + } + } + return true; + } } diff --git a/core/java/android/app/admin/IDevicePolicyManager.aidl b/core/java/android/app/admin/IDevicePolicyManager.aidl index e361d819ac2d..b2f0f00cc7e6 100644 --- a/core/java/android/app/admin/IDevicePolicyManager.aidl +++ b/core/java/android/app/admin/IDevicePolicyManager.aidl @@ -355,4 +355,6 @@ interface IDevicePolicyManager { boolean isCurrentInputMethodSetByOwner(); StringParceledListSlice getOwnerInstalledCaCerts(in UserHandle user); + + boolean requireSecureKeyguard(int userHandle); } diff --git a/core/java/android/bluetooth/BluetoothAdapter.java b/core/java/android/bluetooth/BluetoothAdapter.java index fc3a72482a79..a11aa415928b 100644 --- a/core/java/android/bluetooth/BluetoothAdapter.java +++ b/core/java/android/bluetooth/BluetoothAdapter.java @@ -103,7 +103,7 @@ */ public final class BluetoothAdapter { private static final String TAG = "BluetoothAdapter"; - private static final boolean DBG = true; + private static final boolean DBG = false; private static final boolean VDBG = false; /** diff --git a/core/java/android/content/res/AssetManager.java b/core/java/android/content/res/AssetManager.java index f0adcd6cfb3e..277de9a91d52 100644 --- a/core/java/android/content/res/AssetManager.java +++ b/core/java/android/content/res/AssetManager.java @@ -102,6 +102,7 @@ public AssetManager() { init(false); if (localLOGV) Log.v(TAG, "New asset manager: " + this); ensureSystemAssets(); + ensureExtraAssets(this); } } @@ -111,10 +112,23 @@ private static void ensureSystemAssets() { AssetManager system = new AssetManager(true); system.makeStringBlocks(null); sSystem = system; + ensureExtraAssets(sSystem); } } } - + + private static void ensureExtraAssets(AssetManager m) { + // load extra assets after system assets, so + // the ordering of asset paths is preserved for + // RRO framework assets + if (m == null) { + Log.w(TAG, "ensureExtraAssets called on null AssetManager!"); + return; + } + m.initExtraAssets(); + m.makeStringBlocks(m.mStringBlocks); + } + private AssetManager(boolean isSystem) { if (DEBUG_REFS) { synchronized (this) { @@ -886,6 +900,7 @@ private native final int loadResourceBagValue(int ident, int bagEntryId, TypedVa /*package*/ native final int[] getStyleAttributes(int themeRes); private native final void init(boolean isSystem); + private native final void initExtraAssets(); private native final void destroy(); private final void incRefsLocked(long id) { diff --git a/core/java/android/hardware/Camera.java b/core/java/android/hardware/Camera.java index 931b5c913851..69a4eaa794ba 100644 --- a/core/java/android/hardware/Camera.java +++ b/core/java/android/hardware/Camera.java @@ -155,6 +155,10 @@ public class Camera { private static final int CAMERA_MSG_RAW_IMAGE_NOTIFY = 0x200; private static final int CAMERA_MSG_PREVIEW_METADATA = 0x400; private static final int CAMERA_MSG_FOCUS_MOVE = 0x800; + /* ### QC ADD-ONS: START */ + private static final int CAMERA_MSG_STATS_DATA = 0x1000; + private static final int CAMERA_MSG_META_DATA = 0x2000; + /* ### QC ADD-ONS: END */ private long mNativeContext; // accessed by native methods private EventHandler mEventHandler; @@ -175,6 +179,17 @@ public class Camera { private final Object mAutoFocusCallbackLock = new Object(); private static final int NO_ERROR = 0; + private static final int EACCESS = -13; + private static final int ENODEV = -19; + private static final int EBUSY = -16; + private static final int EINVAL = -22; + private static final int ENOSYS = -38; + private static final int EUSERS = -87; + private static final int EOPNOTSUPP = -95; + /* ### QC ADD-ONS: START */ + private CameraDataCallback mCameraDataCallback; + private CameraMetaDataCallback mCameraMetaDataCallback; + /* ### QC ADD-ONS: END */ /** * Broadcast Action: A new picture is taken by the camera, and the entry of @@ -257,7 +272,11 @@ public class Camera { * low-level failure). */ public static void getCameraInfo(int cameraId, CameraInfo cameraInfo) { - _getCameraInfo(cameraId, cameraInfo); + try { + _getCameraInfo(cameraId, cameraInfo); + } catch (RuntimeException e) { + Log.e(TAG, "Lock screen is disabled, facelock can't get camera info"); + } IBinder b = ServiceManager.getService(Context.AUDIO_SERVICE); IAudioService audioService = IAudioService.Stub.asInterface(b); try { @@ -290,6 +309,17 @@ public static class CameraInfo { */ public static final int CAMERA_FACING_FRONT = 1; + /* ### QC ADD-ONS: START TBD*/ + /** @hide + * camera is in ZSL mode. + */ + public static final int CAMERA_SUPPORT_MODE_ZSL = 2; + + /** @hide + * camera is in non-ZSL mode. + */ + public static final int CAMERA_SUPPORT_MODE_NONZSL = 3; + /* ### QC ADD-ONS: END */ /** * The direction that the camera faces. It should be * CAMERA_FACING_BACK or CAMERA_FACING_FRONT. @@ -475,6 +505,10 @@ private int cameraInitVersion(int cameraId, int halVersion) { mPostviewCallback = null; mUsingPreviewAllocation = false; mZoomListener = null; + /* ### QC ADD-ONS: START */ + mCameraDataCallback = null; + mCameraMetaDataCallback = null; + /* ### QC ADD-ONS: END */ Looper looper; if ((looper = Looper.myLooper()) != null) { @@ -1195,7 +1229,23 @@ public void handleMessage(Message msg) { mAutoFocusMoveCallback.onAutoFocusMoving(msg.arg1 == 0 ? false : true, mCamera); } return; + /* ### QC ADD-ONS: START */ + case CAMERA_MSG_STATS_DATA: + int statsdata[] = new int[257]; + for(int i =0; i<257; i++ ) { + statsdata[i] = byteToInt( (byte[])msg.obj, i*4); + } + if (mCameraDataCallback != null) { + mCameraDataCallback.onCameraData(statsdata, mCamera); + } + return; + case CAMERA_MSG_META_DATA: + if (mCameraMetaDataCallback != null) { + mCameraMetaDataCallback.onCameraMetaData((byte[])msg.obj, mCamera); + } + return; + /* ### QC ADD-ONS: END */ default: Log.e(TAG, "Unknown message type " + msg.what); return; @@ -1645,6 +1695,20 @@ public final boolean disableShutterSound() { private native final boolean _enableShutterSound(boolean enabled); + /** + * Send a vendor-specific camera command + * + * @hide + */ + public final void sendVendorCommand(int cmd, int arg1, int arg2) { + if (cmd < 1000) { + throw new IllegalArgumentException("Command numbers must be at least 1000"); + } + _sendVendorCommand(cmd, arg1, arg2); + } + + private native final void _sendVendorCommand(int cmd, int arg1, int arg2); + /** * Callback interface for zoom changes during a smooth zoom operation. * @@ -1962,6 +2026,27 @@ public Parameters getParameters() { return p; } + /** @hide + * Returns the current cct value of white balance. + * + * If it's in AWB mode, cct is determined by stats/awb module. + * + * If it's in Manual WB mode, it actually returns cct value + * set by user via {@link #setParameters(Camera.Parameters)}. + */ + public int getWBCurrentCCT() { + Parameters p = new Parameters(); + String s = native_getParameters(); + p.unflatten(s); + + int cct = 0; + if (p.getWBCurrentCCT() != null) { + cct = Integer.parseInt(p.getWBCurrentCCT()); + } + + return cct; + } + /** * Returns an empty {@link Parameters} for testing purpose. * @@ -1974,6 +2059,157 @@ public static Parameters getEmptyParameters() { return camera.new Parameters(); } + /* ### QC ADD-ONS: START */ + private static int byteToInt(byte[] b, int offset) { + int value = 0; + for (int i = 0; i < 4; i++) { + int shift = (4 - 1 - i) * 8; + value += (b[(3-i) + offset] & 0x000000FF) << shift; + } + return value; + } + /** @hide + * Handles the callback for when Camera Data is available. + * data is read from the camera. + */ + public interface CameraDataCallback { + /** + * Callback for when camera data is available. + * + * @param data a int array of the camera data + * @param camera the Camera service object + */ + void onCameraData(int[] data, Camera camera); + }; + + /** @hide + * Set camera histogram mode and registers a callback function to run. + * Only valid after startPreview() has been called. + * + * @param cb the callback to run + */ + public final void setHistogramMode(CameraDataCallback cb) + { + mCameraDataCallback = cb; + native_setHistogramMode(cb!=null); + } + private native final void native_setHistogramMode(boolean mode); + + /** @hide + * Set camera histogram command to send data. + * + */ + public final void sendHistogramData() + { + native_sendHistogramData(); + } + private native final void native_sendHistogramData(); + + /** @hide + * Handles the callback for when Camera Meta Data is available. + * Meta data is read from the camera. + */ + public interface CameraMetaDataCallback { + /** + * Callback for when camera meta data is available. + * + * @param data a byte array of the camera meta data + * @param camera the Camera service object + */ + void onCameraMetaData(byte[] data, Camera camera); + }; + + /** @hide + * Set camera meta data and registers a callback function to run. + * Only valid after startPreview() has been called. + * + * @param cb the callback to run + */ + public final void setMetadataCb(CameraMetaDataCallback cb) + { + mCameraMetaDataCallback = cb; + native_setMetadataCb(cb!=null); + } + private native final void native_setMetadataCb(boolean mode); + + /** @hide + * Set camera face detection command to send meta data. + */ + public final void sendMetaData() + { + native_sendMetaData(); + } + private native final void native_sendMetaData(); + + /** @hide + * Configure longshot mode. Available only in ZSL. + * + * @param enable enable/disable this mode + */ + public final void setLongshot(boolean enable) + { + native_setLongshot(enable); + } + private native final void native_setLongshot(boolean enable); + + /** @hide + * Handles the Touch Co-ordinate. + */ + public class Coordinate { + /** + * Sets the x,y co-ordinates for a touch event + * + * @param x the x co-ordinate (pixels) + * @param y the y co-ordinate (pixels) + */ + public Coordinate(int x, int y) { + xCoordinate = x; + yCoordinate = y; + } + /** + * Compares {@code obj} to this co-ordinate. + * + * @param obj the object to compare this co-ordinate with. + * @return {@code true} if the xCoordinate and yCoordinate of {@code obj} is the + * same as those of this coordinate. {@code false} otherwise. + */ + @Override + public boolean equals(Object obj) { + if (!(obj instanceof Coordinate)) { + return false; + } + Coordinate c = (Coordinate) obj; + return xCoordinate == c.xCoordinate && yCoordinate == c.yCoordinate; + } + + /** x co-ordinate for the touch event*/ + public int xCoordinate; + + /** y co-ordinate for the touch event */ + public int yCoordinate; + }; + + /** @hide + * Returns the current focus position. + * + * If it's in AF mode, it's the lens position after af is done. + * + * If it's in Manual Focus mode, it actually returns the value + * set by user via {@link #setParameters(Camera.Parameters)}. + */ + public int getCurrentFocusPosition() { + Parameters p = new Parameters(); + String s = native_getParameters(); + p.unflatten(s); + + int focus_pos = -1; + if (p.getCurrentFocusPosition() != null) { + focus_pos = Integer.parseInt(p.getCurrentFocusPosition()); + } + return focus_pos; + } + + /* ### QC ADD-ONS: END */ /** * Returns a copied {@link Parameters}; for shim use only. * @@ -2221,6 +2457,10 @@ public class Parameters { public static final String WHITE_BALANCE_CLOUDY_DAYLIGHT = "cloudy-daylight"; public static final String WHITE_BALANCE_TWILIGHT = "twilight"; public static final String WHITE_BALANCE_SHADE = "shade"; + /** @hide + * wb manual cct mode. + */ + public static final String WHITE_BALANCE_MANUAL_CCT = "manual-cct"; // Values for color effect settings. public static final String EFFECT_NONE = "none"; @@ -2268,6 +2508,11 @@ public class Parameters { */ public static final String FLASH_MODE_TORCH = "torch"; + /** @hide + * Scene mode is off. + */ + public static final String SCENE_MODE_ASD = "asd"; + /** * Scene mode is off. */ @@ -2344,6 +2589,14 @@ public class Parameters { * Capture the naturally warm color of scenes lit by candles. */ public static final String SCENE_MODE_CANDLELIGHT = "candlelight"; + /** @hide + * SCENE_MODE_BACKLIGHT + **/ + public static final String SCENE_MODE_BACKLIGHT = "backlight"; + /** @hide + * SCENE_MODE_FLOWERS + **/ + public static final String SCENE_MODE_FLOWERS = "flowers"; /** * Applications are looking for a barcode. Camera driver will be @@ -2386,6 +2639,13 @@ public class Parameters { */ public static final String FOCUS_MODE_FIXED = "fixed"; + /** @hide + * Normal focus mode. Applications should call + * {@link #autoFocus(AutoFocusCallback)} to start the focus in this + * mode. + */ + public static final String FOCUS_MODE_NORMAL = "normal"; + /** * Extended depth of field (EDOF). Focusing is done digitally and * continuously. Applications should not call {@link @@ -2438,6 +2698,11 @@ public class Parameters { */ public static final String FOCUS_MODE_CONTINUOUS_PICTURE = "continuous-picture"; + /** @hide + * manual focus mode + */ + public static final String FOCUS_MODE_MANUAL_POSITION = "manual"; + // Indices for focus distance array. /** * The array index of near focus distance for use with @@ -2474,11 +2739,15 @@ public class Parameters { // Formats for setPreviewFormat and setPictureFormat. private static final String PIXEL_FORMAT_YUV422SP = "yuv422sp"; private static final String PIXEL_FORMAT_YUV420SP = "yuv420sp"; + private static final String PIXEL_FORMAT_YUV420SP_ADRENO = "yuv420sp-adreno"; private static final String PIXEL_FORMAT_YUV422I = "yuv422i-yuyv"; private static final String PIXEL_FORMAT_YUV420P = "yuv420p"; private static final String PIXEL_FORMAT_RGB565 = "rgb565"; private static final String PIXEL_FORMAT_JPEG = "jpeg"; private static final String PIXEL_FORMAT_BAYER_RGGB = "bayer-rggb"; + private static final String PIXEL_FORMAT_RAW = "raw"; + private static final String PIXEL_FORMAT_YV12 = "yv12"; + private static final String PIXEL_FORMAT_NV12 = "nv12"; /** * Order matters: Keys that are {@link #set(String, String) set} later @@ -3266,8 +3535,11 @@ public void setGpsProcessingMethod(String processing_method) { * parameters. */ public void removeGpsData() { + remove(KEY_QC_GPS_LATITUDE_REF); remove(KEY_GPS_LATITUDE); + remove(KEY_QC_GPS_LONGITUDE_REF); remove(KEY_GPS_LONGITUDE); + remove(KEY_QC_GPS_ALTITUDE_REF); remove(KEY_GPS_ALTITUDE); remove(KEY_GPS_TIMESTAMP); remove(KEY_GPS_PROCESSING_METHOD); @@ -3437,6 +3709,7 @@ public String getSceneMode() { * @see #getSceneMode() */ public void setSceneMode(String value) { + if(getSupportedSceneModes() == null) return; set(KEY_SCENE_MODE, value); } @@ -3474,6 +3747,7 @@ public String getFlashMode() { * @see #getFlashMode() */ public void setFlashMode(String value) { + if(getSupportedFlashModes() == null) return; set(KEY_FLASH_MODE, value); } @@ -4158,6 +4432,7 @@ private void splitInt(String str, int[] output) { splitter.setString(str); int index = 0; for (String s : splitter) { + s = s.replaceAll("\\s",""); output[index++] = Integer.parseInt(s); } } @@ -4228,7 +4503,7 @@ private Size strToSize(String str) { // Example string: "(10000,26623),(10000,30000)". Return null if the // passing string is null or the size is 0. private ArrayList splitRange(String str) { - if (str == null || str.charAt(0) != '(' + if (TextUtils.isEmpty(str) || str.charAt(0) != '(' || str.charAt(str.length() - 1) != ')') { Log.e(TAG, "Invalid range list string=" + str); return null; @@ -4253,7 +4528,7 @@ private ArrayList splitRange(String str) { // Example string: "(-10,-10,0,0,300),(0,0,10,10,700)". Return null if // the passing string is null or the size is 0 or (0,0,0,0,0). private ArrayList splitArea(String str) { - if (str == null || str.charAt(0) != '(' + if (TextUtils.isEmpty(str) || str.charAt(0) != '(' || str.charAt(str.length() - 1) != ')') { Log.e(TAG, "Invalid area string=" + str); return null; @@ -4290,5 +4565,1231 @@ private boolean same(String s1, String s2) { if (s1 != null && s1.equals(s2)) return true; return false; } + /* ### QC ADD-ONS: START */ + + /* ### QC ADDED PARAMETER KEYS*/ + private static final String KEY_QC_HFR_SIZE = "hfr-size"; + private static final String KEY_QC_PREVIEW_FRAME_RATE_MODE = "preview-frame-rate-mode"; + private static final String KEY_QC_PREVIEW_FRAME_RATE_AUTO_MODE = "frame-rate-auto"; + private static final String KEY_QC_PREVIEW_FRAME_RATE_FIXED_MODE = "frame-rate-fixed"; + private static final String KEY_QC_GPS_LATITUDE_REF = "gps-latitude-ref"; + private static final String KEY_QC_GPS_LONGITUDE_REF = "gps-longitude-ref"; + private static final String KEY_QC_GPS_ALTITUDE_REF = "gps-altitude-ref"; + private static final String KEY_QC_GPS_STATUS = "gps-status"; + private static final String KEY_QC_EXIF_DATETIME = "exif-datetime"; + private static final String KEY_QC_TOUCH_AF_AEC = "touch-af-aec"; + private static final String KEY_QC_TOUCH_INDEX_AEC = "touch-index-aec"; + private static final String KEY_QC_TOUCH_INDEX_AF = "touch-index-af"; + private static final String KEY_QC_MANUAL_FOCUS_POSITION = "manual-focus-position"; + private static final String KEY_QC_MANUAL_FOCUS_POS_TYPE = "manual-focus-pos-type"; + private static final String KEY_QC_SCENE_DETECT = "scene-detect"; + private static final String KEY_QC_ISO_MODE = "iso"; + private static final String KEY_QC_EXPOSURE_TIME = "exposure-time"; + private static final String KEY_QC_MIN_EXPOSURE_TIME = "min-exposure-time"; + private static final String KEY_QC_MAX_EXPOSURE_TIME = "max-exposure-time"; + private static final String KEY_QC_LENSSHADE = "lensshade"; + private static final String KEY_QC_HISTOGRAM = "histogram"; + private static final String KEY_QC_SKIN_TONE_ENHANCEMENT = "skinToneEnhancement"; + private static final String KEY_QC_AUTO_EXPOSURE = "auto-exposure"; + private static final String KEY_QC_SHARPNESS = "sharpness"; + private static final String KEY_QC_MAX_SHARPNESS = "max-sharpness"; + private static final String KEY_QC_CONTRAST = "contrast"; + private static final String KEY_QC_MAX_CONTRAST = "max-contrast"; + private static final String KEY_QC_SATURATION = "saturation"; + private static final String KEY_QC_MAX_SATURATION = "max-saturation"; + private static final String KEY_QC_DENOISE = "denoise"; + private static final String KEY_QC_CONTINUOUS_AF = "continuous-af"; + private static final String KEY_QC_SELECTABLE_ZONE_AF = "selectable-zone-af"; + private static final String KEY_QC_FACE_DETECTION = "face-detection"; + private static final String KEY_QC_MEMORY_COLOR_ENHANCEMENT = "mce"; + private static final String KEY_QC_REDEYE_REDUCTION = "redeye-reduction"; + private static final String KEY_QC_ZSL = "zsl"; + private static final String KEY_QC_CAMERA_MODE = "camera-mode"; + private static final String KEY_QC_VIDEO_HIGH_FRAME_RATE = "video-hfr"; + private static final String KEY_QC_VIDEO_HDR = "video-hdr"; + private static final String KEY_QC_POWER_MODE = "power-mode"; + private static final String KEY_QC_POWER_MODE_SUPPORTED = "power-mode-supported"; + private static final String KEY_QC_WB_MANUAL_CCT = "wb-manual-cct"; + private static final String KEY_QC_MIN_WB_CCT = "min-wb-cct"; + private static final String KEY_QC_MAX_WB_CCT = "max-wb-cct"; + private static final String KEY_QC_AUTO_HDR_ENABLE = "auto-hdr-enable"; + private static final String KEY_QC_VIDEO_ROTATION = "video-rotation"; + + /** @hide + * KEY_QC_AE_BRACKET_HDR + **/ + public static final String KEY_QC_AE_BRACKET_HDR = "ae-bracket-hdr"; + + /* ### QC ADDED PARAMETER VALUES*/ + + // Values for touch af/aec settings. + /** @hide + * TOUCH_AF_AEC_OFF + **/ + public static final String TOUCH_AF_AEC_OFF = "touch-off"; + /** @hide + * TOUCH_AF_AEC_ON + **/ + public static final String TOUCH_AF_AEC_ON = "touch-on"; + + // Values for auto exposure settings. + /** @hide + * Auto exposure frame-avg + **/ + public static final String AUTO_EXPOSURE_FRAME_AVG = "frame-average"; + /** @hide + * Auto exposure center weighted + **/ + public static final String AUTO_EXPOSURE_CENTER_WEIGHTED = "center-weighted"; + /** @hide + * Auto exposure spot metering + **/ + public static final String AUTO_EXPOSURE_SPOT_METERING = "spot-metering"; + + //Values for ISO settings + /** @hide + * ISO_AUTO + **/ + public static final String ISO_AUTO = "auto"; + /** @hide + * ISO_HJR + **/ + public static final String ISO_HJR = "ISO_HJR"; + /** @hide + * ISO_100 + **/ + public static final String ISO_100 = "ISO100"; + /** @hide + * ISO_200 + **/ + public static final String ISO_200 = "ISO200"; + /** @hide + * ISO_400 + **/ + public static final String ISO_400 = "ISO400"; + /** @hide + * ISO_800 + **/ + public static final String ISO_800 = "ISO800"; + /** @hide + * ISO_1600 + **/ + public static final String ISO_1600 = "ISO1600"; + + /** @hide + * ISO_3200 + **/ + public static final String ISO_3200 = "ISO3200"; + + //Values for Lens Shading + /** @hide + * LENSSHADE_ENABLE + **/ + public static final String LENSSHADE_ENABLE = "enable"; + /** @hide + * LENSSHADE_DISABLE + **/ + public static final String LENSSHADE_DISABLE= "disable"; + + //Values for Histogram + /** @hide + * Histogram enable + **/ + public static final String HISTOGRAM_ENABLE = "enable"; + /** @hide + * Histogram disable + **/ + public static final String HISTOGRAM_DISABLE= "disable"; + + //Values for Skin Tone Enhancement + /** @hide + * SKIN_TONE_ENHANCEMENT_ENABLE + **/ + public static final String SKIN_TONE_ENHANCEMENT_ENABLE = "enable"; + /** @hide + * SKIN_TONE_ENHANCEMENT_DISABLE + **/ + public static final String SKIN_TONE_ENHANCEMENT_DISABLE= "disable"; + + // Values for MCE settings. + /** @hide + * MCE_ENaBLE + **/ + public static final String MCE_ENABLE = "enable"; + /** @hide + * MCE_DISABLE + **/ + public static final String MCE_DISABLE = "disable"; + + // Values for ZSL settings. + /** @hide + * ZSL_ON + **/ + public static final String ZSL_ON = "on"; + /** @hide + * ZSL_OFF + **/ + public static final String ZSL_OFF = "off"; + + // Values for HDR Bracketing settings. + + /** @hide + * AEC bracketing off + **/ + public static final String AE_BRACKET_HDR_OFF = "Off"; + /** @hide + * AEC bracketing hdr + **/ + public static final String AE_BRACKET_HDR = "HDR"; + /** @hide + * AEC bracketing aec-bracket + **/ + public static final String AE_BRACKET = "AE-Bracket"; + + // Values for Power mode. + /** @hide + * LOW_POWER + **/ + public static final String LOW_POWER = "Low_Power"; + /** @hide + * NORMAL_POWER + **/ + public static final String NORMAL_POWER = "Normal_Power"; + + // Values for HFR settings. + /** @hide + * VIDEO_HFR_OFF + **/ + public static final String VIDEO_HFR_OFF = "off"; + /** @hide + * VIDEO_HFR_2X + **/ + public static final String VIDEO_HFR_2X = "60"; + /** @hide + * VIDEO_HFR_3X + **/ + public static final String VIDEO_HFR_3X = "90"; + /** @hide + * VIDEO_HFR_4X + **/ + public static final String VIDEO_HFR_4X = "120"; + + // Values for auto scene detection settings. + /** @hide + * SCENE_DETECT_OFF + **/ + public static final String SCENE_DETECT_OFF = "off"; + /** @hide + * SCENE_DETECT_ON + **/ + public static final String SCENE_DETECT_ON = "on"; + + //Values for Continuous AF + + /** @hide + * CAF off + **/ + public static final String CONTINUOUS_AF_OFF = "caf-off"; + /** @hide + * CAF on + **/ + public static final String CONTINUOUS_AF_ON = "caf-on"; + /** @hide + * Denoise off + **/ + public static final String DENOISE_OFF = "denoise-off"; + /** @hide + * Denoise on + **/ + public static final String DENOISE_ON = "denoise-on"; + + // Values for Redeye Reduction settings. + /** @hide + * REDEYE_REDUCTION_ENABLE + **/ + public static final String REDEYE_REDUCTION_ENABLE = "enable"; + /** @hide + * REDEYE_REDUCTION_DISABLE + **/ + public static final String REDEYE_REDUCTION_DISABLE = "disable"; + + // Values for selectable zone af settings. + /** @hide + * SELECTABLE_ZONE_AF_AUTO + **/ + public static final String SELECTABLE_ZONE_AF_AUTO = "auto"; + /** @hide + * SELECTABLE_ZONE_AF_SPOTMETERING + **/ + public static final String SELECTABLE_ZONE_AF_SPOTMETERING = "spot-metering"; + /** @hide + * SELECTABLE_ZONE_AF_CENTER_WEIGHTED + **/ + public static final String SELECTABLE_ZONE_AF_CENTER_WEIGHTED = "center-weighted"; + /** @hide + * SELECTABLE_ZONE_AF_FRAME_AVERAGE + **/ + public static final String SELECTABLE_ZONE_AF_FRAME_AVERAGE = "frame-average"; + + // Values for Face Detection settings. + /** @hide + * Face Detection off + **/ + public static final String FACE_DETECTION_OFF = "off"; + /** @hide + * Face Detction on + **/ + public static final String FACE_DETECTION_ON = "on"; + + // Values for video rotation settings. + + /** @hide + * VIDEO_ROTATION_0 + **/ + public static final String VIDEO_ROTATION_0 = "0"; + /** @hide + * VIDEO_ROTATION_90 + **/ + public static final String VIDEO_ROTATION_90 = "90"; + /** @hide + * VIDEO_ROTATION_180 + **/ + public static final String VIDEO_ROTATION_180 = "180"; + /** @hide + * VIDEO_ROTATION_270 + **/ + public static final String VIDEO_ROTATION_270 = "270"; + + /* ### QC ADDED PARAMETER APIS*/ + /** @hide + * Gets the supported preview sizes in high frame rate recording mode. + * + * @return a list of Size object. This method will always return a list + * with at least one element. + */ + public List getSupportedHfrSizes() { + String str = get(KEY_QC_HFR_SIZE + SUPPORTED_VALUES_SUFFIX); + return splitSize(str); + } + + /** @hide + * Gets the supported Touch AF/AEC setting. + * + * @return a List of TOUCH_AF_AEC_XXX string constants. null if TOUCH AF/AEC + * setting is not supported. + * + */ + public List getSupportedTouchAfAec() { + String str = get(KEY_QC_TOUCH_AF_AEC + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** + * Gets the supported Touch AF/AEC setting. + * + * @return a List of TOUCH_AF_AEC_XXX string constants. null if TOUCH AF/AEC + * setting is not supported. + * + */ + + /** @hide + * Gets the supported frame rate modes. + * + * @return a List of FRAME_RATE_XXX_MODE string constant. null if this + * setting is not supported. + */ + public List getSupportedPreviewFrameRateModes() { + String str = get(KEY_QC_PREVIEW_FRAME_RATE_MODE + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Gets the supported auto scene detection modes. + * + * @return a List of SCENE_DETECT_XXX string constant. null if scene detection + * setting is not supported. + * + */ + public List getSupportedSceneDetectModes() { + String str = get(KEY_QC_SCENE_DETECT + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Gets the supported ISO values. + * + * @return a List of FLASH_MODE_XXX string constants. null if flash mode + * setting is not supported. + */ + public List getSupportedIsoValues() { + String str = get(KEY_QC_ISO_MODE + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Gets the supported Lensshade modes. + * + * @return a List of LENS_MODE_XXX string constants. null if lens mode + * setting is not supported. + */ + public List getSupportedLensShadeModes() { + String str = get(KEY_QC_LENSSHADE + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Gets the supported Histogram modes. + * + * @return a List of HISTOGRAM_XXX string constants. null if histogram mode + * setting is not supported. + */ + public List getSupportedHistogramModes() { + String str = get(KEY_QC_HISTOGRAM + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Gets the supported Skin Tone Enhancement modes. + * + * @return a List of SKIN_TONE_ENHANCEMENT_XXX string constants. null if skin tone enhancement + * setting is not supported. + */ + public List getSupportedSkinToneEnhancementModes() { + String str = get(KEY_QC_SKIN_TONE_ENHANCEMENT + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Gets the supported auto exposure setting. + * + * @return a List of AUTO_EXPOSURE_XXX string constants. null if auto exposure + * setting is not supported. + */ + public List getSupportedAutoexposure() { + String str = get(KEY_QC_AUTO_EXPOSURE + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Gets the supported MCE modes. + * + * @return a List of MCE_ENABLE/DISABLE string constants. null if MCE mode + * setting is not supported. + */ + public List getSupportedMemColorEnhanceModes() { + String str = get(KEY_QC_MEMORY_COLOR_ENHANCEMENT + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Gets the supported ZSL modes. + * + * @return a List of ZSL_OFF/OFF string constants. null if ZSL mode + * setting is not supported. + */ + public List getSupportedZSLModes() { + String str = get(KEY_QC_ZSL + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Gets the supported Video HDR modes. + * + * @return a List of Video HDR_OFF/OFF string constants. null if + * Video HDR mode setting is not supported. + */ + public List getSupportedVideoHDRModes() { + String str = get(KEY_QC_VIDEO_HDR + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Gets the supported HFR modes. + * + * @return a List of VIDEO_HFR_XXX string constants. null if hfr mode + * setting is not supported. + */ + public List getSupportedVideoHighFrameRateModes() { + String str = get(KEY_QC_VIDEO_HIGH_FRAME_RATE + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Gets the supported Continuous AF modes. + * + * @return a List of CONTINUOUS_AF_XXX string constant. null if continuous AF + * setting is not supported. + * + */ + public List getSupportedContinuousAfModes() { + String str = get(KEY_QC_CONTINUOUS_AF + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Gets the supported DENOISE modes. + * + * @return a List of DENOISE_XXX string constant. null if DENOISE + * setting is not supported. + * + */ + public List getSupportedDenoiseModes() { + String str = get(KEY_QC_DENOISE + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Gets the supported selectable zone af setting. + * + * @return a List of SELECTABLE_ZONE_AF_XXX string constants. null if selectable zone af + * setting is not supported. + */ + public List getSupportedSelectableZoneAf() { + String str = get(KEY_QC_SELECTABLE_ZONE_AF + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Gets the supported face detection modes. + * + * @return a List of FACE_DETECTION_XXX string constant. null if face detection + * setting is not supported. + * + */ + public List getSupportedFaceDetectionModes() { + String str = get(KEY_QC_FACE_DETECTION + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Gets the supported redeye reduction modes. + * + * @return a List of REDEYE_REDUCTION_XXX string constant. null if redeye reduction + * setting is not supported. + * + */ + public List getSupportedRedeyeReductionModes() { + String str = get(KEY_QC_REDEYE_REDUCTION + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Sets GPS altitude reference. This will be stored in JPEG EXIF header. + * @param altRef reference GPS altitude in meters. + */ + public void setGpsAltitudeRef(double altRef) { + set(KEY_QC_GPS_ALTITUDE_REF, Double.toString(altRef)); + } + + /** @hide + * Sets GPS Status. This will be stored in JPEG EXIF header. + * + * @param status GPS status (UTC in seconds since January 1, + * 1970). + */ + public void setGpsStatus(double status) { + set(KEY_QC_GPS_STATUS, Double.toString(status)); + } + + /** @hide + * Sets the touch co-ordinate for Touch AEC. + * + * @param x the x co-ordinate of the touch event + * @param y the y co-ordinate of the touch event + * + */ + public void setTouchIndexAec(int x, int y) { + String v = Integer.toString(x) + "x" + Integer.toString(y); + set(KEY_QC_TOUCH_INDEX_AEC, v); + } + + /** @hide + * Returns the touch co-ordinates of the touch event. + * + * @return a Index object with the x and y co-ordinated + * for the touch event + * + */ + public Coordinate getTouchIndexAec() { + String pair = get(KEY_QC_TOUCH_INDEX_AEC); + return strToCoordinate(pair); + } + + /** @hide + * Sets the touch co-ordinate for Touch AF. + * + * @param x the x co-ordinate of the touch event + * @param y the y co-ordinate of the touch event + * + */ + public void setTouchIndexAf(int x, int y) { + String v = Integer.toString(x) + "x" + Integer.toString(y); + set(KEY_QC_TOUCH_INDEX_AF, v); + } + + /** @hide + * Returns the touch co-ordinates of the touch event. + * + * @return a Index object with the x and y co-ordinated + * for the touch event + * + */ + public Coordinate getTouchIndexAf() { + String pair = get(KEY_QC_TOUCH_INDEX_AF); + return strToCoordinate(pair); + } + /** @hide + * Set Sharpness Level + * + * @param sharpness level + */ + public void setSharpness(int sharpness){ + if((sharpness < 0) || (sharpness > getMaxSharpness()) ) + throw new IllegalArgumentException( + "Invalid Sharpness " + sharpness); + + set(KEY_QC_SHARPNESS, String.valueOf(sharpness)); + } + + /** @hide + * Set Contrast Level + * + * @param contrast level + */ + public void setContrast(int contrast){ + if((contrast < 0 ) || (contrast > getMaxContrast())) + throw new IllegalArgumentException( + "Invalid Contrast " + contrast); + + set(KEY_QC_CONTRAST, String.valueOf(contrast)); + } + + /** @hide + * Set Saturation Level + * + * @param saturation level + */ + public void setSaturation(int saturation){ + if((saturation < 0 ) || (saturation > getMaxSaturation())) + throw new IllegalArgumentException( + "Invalid Saturation " + saturation); + + set(KEY_QC_SATURATION, String.valueOf(saturation)); + } + + /** @hide + * @return true if full size video snapshot is supported. + */ + public boolean isPowerModeSupported() { + String str = get(KEY_QC_POWER_MODE_SUPPORTED); + return TRUE.equals(str); + } + + /** @hide + * Get Sharpness level + * + * @return sharpness level + */ + public int getSharpness(){ + return getInt(KEY_QC_SHARPNESS); + } + + /** @hide + * Get Max Sharpness Level + * + * @return max sharpness level + */ + public int getMaxSharpness(){ + return getInt(KEY_QC_MAX_SHARPNESS); + } + + /** @hide + * Get Contrast level + * + * @return contrast level + */ + public int getContrast(){ + return getInt(KEY_QC_CONTRAST); + } + + /** @hide + * Get Max Contrast Level + * + * @return max contrast level + */ + public int getMaxContrast(){ + return getInt(KEY_QC_MAX_CONTRAST); + } + + /** @hide + * Get Saturation level + * + * @return saturation level + */ + public int getSaturation(){ + return getInt(KEY_QC_SATURATION); + } + + /** @hide + * Get Max Saturation Level + * + * @return max contrast level + */ + public int getMaxSaturation(){ + return getInt(KEY_QC_MAX_SATURATION); + } + + /** @hide + * Sets GPS latitude reference coordinate. This will be stored in JPEG EXIF + * header. + * @param latRef GPS latitude reference coordinate. + */ + public void setGpsLatitudeRef(String latRef) { + set(KEY_QC_GPS_LATITUDE_REF, latRef); + } + + /** @hide + * Sets GPS longitude reference coordinate. This will be stored in JPEG EXIF + * header. + * @param lonRef GPS longitude reference coordinate. + */ + public void setGpsLongitudeRef(String lonRef) { + set(KEY_QC_GPS_LONGITUDE_REF, lonRef); + } + + /** @hide + * Sets system timestamp. This will be stored in JPEG EXIF header. + * + * @param dateTime current timestamp (UTC in seconds since January 1, + * 1970). + */ + public void setExifDateTime(String dateTime) { + set(KEY_QC_EXIF_DATETIME, dateTime); + } + + /** @hide + * Gets the current Touch AF/AEC setting. + * + * @return one of TOUCH_AF_AEC_XXX string constant. null if Touch AF/AEC + * setting is not supported. + * + */ + public String getTouchAfAec() { + return get(KEY_QC_TOUCH_AF_AEC); + } + + /** @hide + * Sets the current TOUCH AF/AEC setting. + * + * @param value TOUCH_AF_AEC_XXX string constants. + * + */ + public void setTouchAfAec(String value) { + set(KEY_QC_TOUCH_AF_AEC, value); + } + + /** @hide + * Gets the current redeye reduction setting. + * + * @return one of REDEYE_REDUCTION_XXX string constant. null if redeye reduction + * setting is not supported. + * + */ + public String getRedeyeReductionMode() { + return get(KEY_QC_REDEYE_REDUCTION); + } + + /** @hide + * Sets the redeye reduction. Other parameters may be changed after changing + * redeye reduction. After setting redeye reduction, + * applications should call getParameters to know if some parameters are + * changed. + * + * @param value REDEYE_REDUCTION_XXX string constants. + * + */ + public void setRedeyeReductionMode(String value) { + set(KEY_QC_REDEYE_REDUCTION, value); + } + + /** @hide + * Gets the frame rate mode setting. + * + * @return one of FRAME_RATE_XXX_MODE string constant. null if this + * setting is not supported. + */ + public String getPreviewFrameRateMode() { + return get(KEY_QC_PREVIEW_FRAME_RATE_MODE); + } + + /** @hide + * Sets the frame rate mode. + * + * @param value FRAME_RATE_XXX_MODE string constants. + */ + public void setPreviewFrameRateMode(String value) { + set(KEY_QC_PREVIEW_FRAME_RATE_MODE, value); + } + + /** @hide + * Gets the current auto scene detection setting. + * + * @return one of SCENE_DETECT_XXX string constant. null if auto scene detection + * setting is not supported. + * + */ + public String getSceneDetectMode() { + return get(KEY_QC_SCENE_DETECT); + } + + /** @hide + * Sets the auto scene detect. Other parameters may be changed after changing + * scene detect. After setting auto scene detection, + * applications should call getParameters to know if some parameters are + * changed. + * + * @param value SCENE_DETECT_XXX string constants. + * + */ + public void setSceneDetectMode(String value) { + set(KEY_QC_SCENE_DETECT, value); + } + + /** @hide + * Gets the current hdr bracketing mode setting. + * + * @return current hdr bracketing mode. + * @see #KEY_AE_BRACKET_OFF + * @see #KEY_AE_BRACKET_HDR + * @see #KEY_AE_BRACKET_BRACKATING + */ + public String getAEBracket() { + return get(KEY_QC_AE_BRACKET_HDR); + } + + /** @hide + * Sets the Power mode. + * + * @param value Power mode. + * @see #getPowerMode() + */ + public void setPowerMode(String value) { + set(KEY_QC_POWER_MODE, value); + } + + /** @hide + * Gets the current power mode setting. + * + * @return current power mode. null if power mode setting is not + * supported. + * @see #POWER_MODE_LOW + * @see #POWER_MODE_NORMAL + */ + public String getPowerMode() { + return get(KEY_QC_POWER_MODE); + } + + /** @hide + * Set HDR-Bracketing Level + * + * @param value HDR-Bracketing + */ + public void setAEBracket(String value){ + set(KEY_QC_AE_BRACKET_HDR, value); + } + + /** @hide + * Gets the current ISO setting. + * + * @return one of ISO_XXX string constant. null if ISO + * setting is not supported. + */ + public String getISOValue() { + return get(KEY_QC_ISO_MODE); + } + + /** @hide + * Sets the ISO. + * + * @param iso ISO_XXX string constant. + */ + public void setISOValue(String iso) { + set(KEY_QC_ISO_MODE, iso); + } + + /** @hide + * Sets the exposure time. + * + * @param value exposure time. + */ + public void setExposureTime(int value) { + set(KEY_QC_EXPOSURE_TIME, Integer.toString(value)); + } + + /** @hide + * Gets the current exposure time. + * + * @return exposure time. + */ + public String getExposureTime() { + return get(KEY_QC_EXPOSURE_TIME); + } + + /** @hide + * Gets the min supported exposure time. + * + * @return min supported exposure time. + */ + public String getMinExposureTime() { + return get(KEY_QC_MIN_EXPOSURE_TIME); + } + + /** @hide + * Gets the max supported exposure time. + * + * @return max supported exposure time. + */ + public String getMaxExposureTime() { + return get(KEY_QC_MAX_EXPOSURE_TIME); + } + + /** @hide + * Gets the current LensShade Mode. + * + * @return LensShade Mode + */ + public String getLensShade() { + return get(KEY_QC_LENSSHADE); + } + + /** @hide + * Sets the current LensShade Mode. + * + * @return LensShade Mode + */ + public void setLensShade(String lensshade) { + set(KEY_QC_LENSSHADE, lensshade); + } + + /** @hide + * Gets the current auto exposure setting. + * + * @return one of AUTO_EXPOSURE_XXX string constant. null if auto exposure + * setting is not supported. + */ + public String getAutoExposure() { + return get(KEY_QC_AUTO_EXPOSURE); + } + + /** @hide + * Sets the current auto exposure setting. + * + * @param value AUTO_EXPOSURE_XXX string constants. + */ + public void setAutoExposure(String value) { + set(KEY_QC_AUTO_EXPOSURE, value); + } + + /** @hide + * Gets the current MCE Mode. + * + * @return MCE value + */ + public String getMemColorEnhance() { + return get(KEY_QC_MEMORY_COLOR_ENHANCEMENT); + } + + /** @hide + * Sets the current MCE Mode. + * + * @return MCE Mode + */ + public void setMemColorEnhance(String mce) { + set(KEY_QC_MEMORY_COLOR_ENHANCEMENT, mce); + } + + /** @hide + * Set white balance manual cct value. + * + * @param cct user CCT setting. + */ + public void setWBManualCCT(int cct) { + set(KEY_QC_WB_MANUAL_CCT, Integer.toString(cct)); + } + + /** @hide + * Gets the WB min supported CCT. + * + * @return min cct value. + */ + public String getWBMinCCT() { + return get(KEY_QC_MIN_WB_CCT); + } + + /** @hide + * Gets the WB max supported CCT. + * + * @return max cct value. + */ + public String getMaxWBCCT() { + return get(KEY_QC_MAX_WB_CCT); + } + + /** @hide + * Gets the current WB CCT. + * + * @return CCT value + */ + public String getWBCurrentCCT() { + return get(KEY_QC_WB_MANUAL_CCT); + } + + /** @hide + * Gets the current ZSL Mode. + * + * @return ZSL mode value + */ + public String getZSLMode() { + return get(KEY_QC_ZSL); + } + + /** @hide + * Sets the current ZSL Mode. ZSL mode is set as a 0th bit in KEY_CAMERA_MODE. + * + * @return null + */ + public void setZSLMode(String zsl) { + set(KEY_QC_ZSL, zsl); + } + + /** @hide + * Sets the current Auto HDR Mode. + * @ auto_hdr auto hdr string for enable/disable + * @return null + */ + public void setAutoHDRMode(String auto_hdr){ + set(KEY_QC_AUTO_HDR_ENABLE,auto_hdr); + } + + /** @hide + * Gets the current Camera Mode Flag. Camera mode includes a + * flag(byte) which indicates different camera modes. + * For now support for ZSL added at bit0 + * + * @return Camera Mode. + */ + public String getCameraMode() { + return get(KEY_QC_CAMERA_MODE); + } + + /** @hide + * Sets the current Camera Mode. + * + * @return null + */ + public void setCameraMode(int cameraMode) { + set(KEY_QC_CAMERA_MODE, cameraMode); + } + + private static final int MANUAL_FOCUS_POS_TYPE_INDEX = 0; + private static final int MANUAL_FOCUS_POS_TYPE_DAC = 1; + /** @hide + * Set focus position. + * + * @param pos user setting of focus position. + */ + public void setFocusPosition(int type, int pos) { + set(KEY_QC_MANUAL_FOCUS_POS_TYPE, Integer.toString(type)); + set(KEY_QC_MANUAL_FOCUS_POSITION, Integer.toString(pos)); + } + + /** @hide + * Gets the current focus position. + * + * @return current focus position + */ + public String getCurrentFocusPosition() { + return get(KEY_QC_MANUAL_FOCUS_POSITION); + } + + + /** @hide + * Gets the current HFR Mode. + * + * @return VIDEO_HFR_XXX string constants + */ + public String getVideoHighFrameRate() { + return get(KEY_QC_VIDEO_HIGH_FRAME_RATE); + } + + /** @hide + * Sets the current HFR Mode. + * + * @param hfr VIDEO_HFR_XXX string constants + */ + public void setVideoHighFrameRate(String hfr) { + set(KEY_QC_VIDEO_HIGH_FRAME_RATE, hfr); + } + + /** @hide + * Gets the current Video HDR Mode. + * + * @return Video HDR mode value + */ + public String getVideoHDRMode() { + return get(KEY_QC_VIDEO_HDR); + } + + /** @hide + * Sets the current Video HDR Mode. + * + * @return null + */ + public void setVideoHDRMode(String videohdr) { + set(KEY_QC_VIDEO_HDR, videohdr); + } + + /** @hide + * Gets the current DENOISE setting. + * + * @return one of DENOISE_XXX string constant. null if Denoise + * setting is not supported. + * + */ + public String getDenoise() { + return get(KEY_QC_DENOISE); + } + + /** @hide + * Gets the current Continuous AF setting. + * + * @return one of CONTINUOUS_AF_XXX string constant. null if continuous AF + * setting is not supported. + * + */ + public String getContinuousAf() { + return get(KEY_QC_CONTINUOUS_AF); + } + + /** @hide + * Sets the current Denoise mode. + * @param value DENOISE_XXX string constants. + * + */ + + public void setDenoise(String value) { + set(KEY_QC_DENOISE, value); + } + + /** @hide + * Sets the current Continuous AF mode. + * @param value CONTINUOUS_AF_XXX string constants. + * + */ + public void setContinuousAf(String value) { + set(KEY_QC_CONTINUOUS_AF, value); + } + + /** @hide + * Gets the current selectable zone af setting. + * + * @return one of SELECTABLE_ZONE_AF_XXX string constant. null if selectable zone af + * setting is not supported. + */ + public String getSelectableZoneAf() { + return get(KEY_QC_SELECTABLE_ZONE_AF); + } + + /** @hide + * Sets the current selectable zone af setting. + * + * @param value SELECTABLE_ZONE_AF_XXX string constants. + */ + public void setSelectableZoneAf(String value) { + set(KEY_QC_SELECTABLE_ZONE_AF, value); + } + + /** @hide + * Gets the current face detection setting. + * + * @return one of FACE_DETECTION_XXX string constant. null if face detection + * setting is not supported. + * + */ + public String getFaceDetectionMode() { + return get(KEY_QC_FACE_DETECTION); + } + + /** @hide + * Sets the auto scene detect. Other settings like Touch AF/AEC might be + * changed after setting face detection. + * + * @param value FACE_DETECTION_XXX string constants. + * + */ + public void setFaceDetectionMode(String value) { + set(KEY_QC_FACE_DETECTION, value); + } + + /** @hide + * Gets the current video rotation setting. + * + * @return one of VIDEO_QC_ROTATION_XXX string constant. null if video rotation + * setting is not supported. + */ + public String getVideoRotation() { + return get(KEY_QC_VIDEO_ROTATION); + } + + /** @hide + * Sets the current video rotation setting. + * + * @param value VIDEO_QC_ROTATION_XXX string constants. + */ + public void setVideoRotation(String value) { + set(KEY_QC_VIDEO_ROTATION, value); + } + /** @hide + * Gets the supported video rotation modes. + * + * @return a List of VIDEO_QC_ROTATION_XXX string constant. null if this + * setting is not supported. + */ + public List getSupportedVideoRotationValues() { + String str = get(KEY_QC_VIDEO_ROTATION + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + // Splits a comma delimited string to an ArrayList of Coordinate. + // Return null if the passing string is null or the Coordinate is 0. + private ArrayList splitCoordinate(String str) { + if (str == null) return null; + TextUtils.StringSplitter splitter = new TextUtils.SimpleStringSplitter(','); + splitter.setString(str); + ArrayList coordinateList = new ArrayList(); + for (String s : splitter) { + Coordinate coordinate = strToCoordinate(s); + if (coordinate != null) coordinateList.add(coordinate); + } + if (coordinateList.size() == 0) return null; + return coordinateList; + } + + // Parses a string (ex: "500x500") to Coordinate object. + // Return null if the passing string is null. + private Coordinate strToCoordinate(String str) { + if (str == null) return null; + + int pos = str.indexOf('x'); + if (pos != -1) { + String x = str.substring(0, pos); + String y = str.substring(pos + 1); + return new Coordinate(Integer.parseInt(x), + Integer.parseInt(y)); + } + Log.e(TAG, "Invalid Coordinate parameter string=" + str); + return null; + } + /* ### QC ADD-ONS: END */ }; } diff --git a/core/java/android/hardware/SystemSensorManager.java b/core/java/android/hardware/SystemSensorManager.java index 607788d3effc..6551acbb78bf 100644 --- a/core/java/android/hardware/SystemSensorManager.java +++ b/core/java/android/hardware/SystemSensorManager.java @@ -161,6 +161,17 @@ protected boolean registerListenerImpl(SensorEventListener listener, Sensor sens "the sensor listeners size has exceeded the maximum limit " + MAX_LISTENER_COUNT); } + if (sensor.getType() == Sensor.TYPE_SIGNIFICANT_MOTION) { + String pkgName = mContext.getPackageName(); + for (String blockedPkgName : mContext.getResources().getStringArray( + com.android.internal.R.array.config_blockPackagesSensorDrain)) { + if (pkgName.equals(blockedPkgName)) { + Log.w(TAG, "Preventing " + pkgName + "from draining battery using " + + "significant motion sensor"); + return false; + } + } + } // Invariants to preserve: // - one Looper per SensorEventListener diff --git a/core/java/android/hardware/camera2/dispatch/InvokeDispatcher.java b/core/java/android/hardware/camera2/dispatch/InvokeDispatcher.java index ac5f52676df4..76ca8977a723 100644 --- a/core/java/android/hardware/camera2/dispatch/InvokeDispatcher.java +++ b/core/java/android/hardware/camera2/dispatch/InvokeDispatcher.java @@ -47,6 +47,9 @@ public Object dispatch(Method method, Object[] args) { } catch (IllegalArgumentException e) { // Impossible Log.wtf(TAG, "IllegalArgumentException while invoking " + method, e); + } catch (NullPointerException e) { + // Happens on hammerhead using Google Camera 4.2.x + Log.wtf(TAG, "NullPointerException while invoking " + method, e); } // unreachable diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java index 7a20943e2a4b..56365d966569 100644 --- a/core/java/android/inputmethodservice/InputMethodService.java +++ b/core/java/android/inputmethodservice/InputMethodService.java @@ -339,6 +339,11 @@ public class InputMethodService extends AbstractInputMethodService { final Insets mTmpInsets = new Insets(); final int[] mTmpLocation = new int[2]; + int mVolumeKeyCursorControl; + private static final int VOLUME_CURSOR_OFF = 0; + private static final int VOLUME_CURSOR_ON = 1; + private static final int VOLUME_CURSOR_ON_REVERSE = 2; + final ViewTreeObserver.OnComputeInternalInsetsListener mInsetsComputer = new ViewTreeObserver.OnComputeInternalInsetsListener() { public void onComputeInternalInsets(ViewTreeObserver.InternalInsetsInfo info) { @@ -2032,6 +2037,26 @@ public boolean onKeyDown(int keyCode, KeyEvent event) { } return false; } + if (event.getKeyCode() == KeyEvent.KEYCODE_VOLUME_UP) { + mVolumeKeyCursorControl = Settings.System.getInt(getContentResolver(), + Settings.System.VOLUME_KEY_CURSOR_CONTROL, 0); + if (isInputViewShown() && (mVolumeKeyCursorControl != VOLUME_CURSOR_OFF)) { + sendDownUpKeyEvents((mVolumeKeyCursorControl == VOLUME_CURSOR_ON_REVERSE) + ? KeyEvent.KEYCODE_DPAD_RIGHT : KeyEvent.KEYCODE_DPAD_LEFT); + return true; + } + return false; + } + if (event.getKeyCode() == KeyEvent.KEYCODE_VOLUME_DOWN) { + mVolumeKeyCursorControl = Settings.System.getInt(getContentResolver(), + Settings.System.VOLUME_KEY_CURSOR_CONTROL, 0); + if (isInputViewShown() && (mVolumeKeyCursorControl != VOLUME_CURSOR_OFF)) { + sendDownUpKeyEvents((mVolumeKeyCursorControl == VOLUME_CURSOR_ON_REVERSE) + ? KeyEvent.KEYCODE_DPAD_LEFT : KeyEvent.KEYCODE_DPAD_RIGHT); + return true; + } + return false; + } return doMovementKey(keyCode, event, MOVEMENT_DOWN); } @@ -2082,6 +2107,15 @@ public boolean onKeyUp(int keyCode, KeyEvent event) { return handleBack(true); } } + if (event.getKeyCode() == KeyEvent.KEYCODE_VOLUME_UP + || keyCode == KeyEvent.KEYCODE_VOLUME_DOWN) { + mVolumeKeyCursorControl = Settings.System.getInt(getContentResolver(), + Settings.System.VOLUME_KEY_CURSOR_CONTROL, 0); + if (isInputViewShown() && (mVolumeKeyCursorControl != VOLUME_CURSOR_OFF)) { + return true; + } + return false; + } return doMovementKey(keyCode, event, MOVEMENT_UP); } diff --git a/core/java/android/net/LinkProperties.java b/core/java/android/net/LinkProperties.java index f527f77ddd7c..c5e114dd03bc 100644 --- a/core/java/android/net/LinkProperties.java +++ b/core/java/android/net/LinkProperties.java @@ -56,6 +56,8 @@ public final class LinkProperties implements Parcelable { private int mMtu; // in the format "rmem_min,rmem_def,rmem_max,wmem_min,wmem_def,wmem_max" private String mTcpBufferSizes; + private int mTcpDelayedAckSegments = 1; + private int mTcpUserCfg = 0; private static final int MIN_MTU = 68; private static final int MIN_MTU_V6 = 1280; @@ -159,6 +161,8 @@ public LinkProperties(LinkProperties source) { } setMtu(source.getMtu()); mTcpBufferSizes = source.mTcpBufferSizes; + mTcpDelayedAckSegments = source.mTcpDelayedAckSegments; + mTcpUserCfg = source.mTcpUserCfg; } } @@ -442,6 +446,45 @@ public String getTcpBufferSizes() { return mTcpBufferSizes; } + /** + * Number of full MSS to receive before Acking RFC2581 + * @param segments The number of segments to receive + * + * @hide + */ + public void setTcpDelayedAckSegments(int segments) { + mTcpDelayedAckSegments = segments; + } + + /** + * Gets the number of segments before acking + * + * @hide + */ + public int getTcpDelayedAckSegments() { + return mTcpDelayedAckSegments; + } + + /** + * Sets the value for TCP usercfg + * + * @param value 0/1 currently to disable/enable + * + * @hide + */ + public void setTcpUserCfg(int value) { + mTcpUserCfg = value; + } + + /** + * Gets the value of TCP usercfg + * + * @hide + */ + public int getTcpUserCfg() { + return mTcpUserCfg; + } + private RouteInfo routeWithInterface(RouteInfo route) { return new RouteInfo( route.getDestination(), @@ -613,6 +656,8 @@ public void clear() { mStackedLinks.clear(); mMtu = 0; mTcpBufferSizes = null; + mTcpDelayedAckSegments = 1; + mTcpUserCfg = 0; } /** diff --git a/core/java/android/net/Uri.java b/core/java/android/net/Uri.java index d5377c717366..9edcc0e9b8d4 100644 --- a/core/java/android/net/Uri.java +++ b/core/java/android/net/Uri.java @@ -1066,7 +1066,7 @@ private String parseUserInfo() { return null; } - int end = authority.indexOf('@'); + int end = authority.lastIndexOf('@'); return end == NOT_FOUND ? null : authority.substring(0, end); } @@ -1090,7 +1090,7 @@ private String parseHost() { } // Parse out user info and then port. - int userInfoSeparator = authority.indexOf('@'); + int userInfoSeparator = authority.lastIndexOf('@'); int portSeparator = authority.indexOf(':', userInfoSeparator); String encodedHost = portSeparator == NOT_FOUND @@ -1116,7 +1116,7 @@ private int parsePort() { // Make sure we look for the port separtor *after* the user info // separator. We have URLs with a ':' in the user info. - int userInfoSeparator = authority.indexOf('@'); + int userInfoSeparator = authority.lastIndexOf('@'); int portSeparator = authority.indexOf(':', userInfoSeparator); if (portSeparator == NOT_FOUND) { diff --git a/core/java/android/os/BatteryManager.java b/core/java/android/os/BatteryManager.java index f715f507f6c9..73784fc08e92 100644 --- a/core/java/android/os/BatteryManager.java +++ b/core/java/android/os/BatteryManager.java @@ -128,6 +128,13 @@ public class BatteryManager { */ public static final String EXTRA_SEQUENCE = "seq"; + /** + * Extra for {@link android.content.Intent#ACTION_BATTERY_CHANGED}: + * boolean value to detect fast charging + * {@hide} + */ + public static final String EXTRA_DASH_CHARGER = "dash_charger"; + // values for "status" field in the ACTION_BATTERY_CHANGED Intent public static final int BATTERY_STATUS_UNKNOWN = Constants.BATTERY_STATUS_UNKNOWN; public static final int BATTERY_STATUS_CHARGING = Constants.BATTERY_STATUS_CHARGING; diff --git a/core/java/android/os/Build.java b/core/java/android/os/Build.java index 062799891ffd..0e905b98aecd 100644 --- a/core/java/android/os/Build.java +++ b/core/java/android/os/Build.java @@ -27,7 +27,11 @@ import dalvik.system.VMRuntime; +import java.lang.reflect.Field; +import java.lang.reflect.Modifier; import java.util.Objects; +import java.util.regex.Matcher; +import java.util.regex.Pattern; /** * Information about the current build, extracted from system properties. @@ -53,6 +57,11 @@ public class Build { /** The name of the underlying board, like "goldfish". */ public static final String BOARD = getString("ro.product.board"); + /** The build date + * @hide + */ + public static final String DATE = getString("ro.build.date"); + /** * The name of the instruction set (CPU type + ABI convention) of native code. * @@ -778,6 +787,7 @@ public static class VERSION_CODES { /** The type of build, like "user" or "eng". */ public static final String TYPE = getString("ro.build.type"); + private static String TYPE_FOR_APPS = parseBuildTypeFromFingerprint(); /** Comma-separated tags describing the build, like "unsigned,debug". */ public static final String TAGS = getString("ro.build.tags"); @@ -804,6 +814,44 @@ private static String deriveFingerprint() { return finger; } + /* + * Some apps like to compare the build type embedded in fingerprint + * to the actual build type. As the fingerprint in our case is almost + * always hardcoded to the stock ROM fingerprint, provide that instead + * of the actual one if possible. + */ + private static String parseBuildTypeFromFingerprint() { + final String fingerprint = SystemProperties.get("ro.build.fingerprint"); + if (TextUtils.isEmpty(fingerprint)) { + return null; + } + Pattern fingerprintPattern = + Pattern.compile("(.*)\\/(.*)\\/(.*):(.*)\\/(.*)\\/(.*):(.*)\\/(.*)"); + Matcher matcher = fingerprintPattern.matcher(fingerprint); + return matcher.matches() ? matcher.group(7) : null; + } + + /** @hide */ + public static void adjustBuildTypeIfNeeded() { + if (Process.isApplicationUid(Process.myUid()) && !TextUtils.isEmpty(TYPE_FOR_APPS)) { + try { + // This is sick. TYPE is final (which can't be changed because it's an API + // guarantee), but we have to reassign it. Resort to reflection to unset the + // final modifier, change the value and restore the final modifier afterwards. + Field typeField = Build.class.getField("TYPE"); + Field accessFlagsField = Field.class.getDeclaredField("accessFlags"); + accessFlagsField.setAccessible(true); + int currentFlags = accessFlagsField.getInt(typeField); + accessFlagsField.setInt(typeField, currentFlags & ~Modifier.FINAL); + typeField.set(null, TYPE_FOR_APPS); + accessFlagsField.setInt(typeField, currentFlags); + accessFlagsField.setAccessible(false); + } catch (Exception e) { + // shouldn't happen, but we don't want to crash the app even if it does happen + } + } + } + /** * Ensure that raw fingerprint system property is defined. If it was derived * dynamically by {@link #deriveFingerprint()} this is where we push the diff --git a/core/java/android/os/IDeviceIdleController.aidl b/core/java/android/os/IDeviceIdleController.aidl index cc2af215c2c6..0ed52bb47aa3 100644 --- a/core/java/android/os/IDeviceIdleController.aidl +++ b/core/java/android/os/IDeviceIdleController.aidl @@ -40,4 +40,9 @@ interface IDeviceIdleController { void exitIdle(String reason); boolean registerMaintenanceActivityListener(IMaintenanceActivityListener listener); void unregisterMaintenanceActivityListener(IMaintenanceActivityListener listener); + int getIdleStateDetailed(); + int getLightIdleStateDetailed(); + String[] getSystemPowerWhitelistOriginal(); + void addSystemPowerSaveWhitelistApp(String name); + void removeSystemPowerSaveWhitelistApp(String name); } diff --git a/core/java/android/os/IPowerManager.aidl b/core/java/android/os/IPowerManager.aidl index 75f7c1f58ab9..931718615ac4 100644 --- a/core/java/android/os/IPowerManager.aidl +++ b/core/java/android/os/IPowerManager.aidl @@ -42,6 +42,7 @@ interface IPowerManager void userActivity(long time, int event, int flags); void wakeUp(long time, String reason, String opPackageName); + void wakeUpWithProximityCheck(long time, String reason, String opPackageName); void goToSleep(long time, int reason, int flags); void nap(long time); boolean isInteractive(); @@ -53,6 +54,7 @@ interface IPowerManager void reboot(boolean confirm, String reason, boolean wait); void rebootSafeMode(boolean confirm, boolean wait); + void rebootCustom(boolean confirm, String reason, boolean wait); void shutdown(boolean confirm, String reason, boolean wait); void crash(String message); int getLastShutdownReason(); @@ -70,4 +72,10 @@ interface IPowerManager // sets the attention light (used by phone app only) void setAttentionLight(boolean on, int color); + + // blocked wakelock support + String getSeenWakeLocks(); + + // update the uids being synchronized by network socket request manager + void updateBlockedUids(int uid, boolean isBlocked); } diff --git a/core/java/android/os/ParcelFileDescriptor.java b/core/java/android/os/ParcelFileDescriptor.java index c091420a31d4..b3c7ced0c61b 100644 --- a/core/java/android/os/ParcelFileDescriptor.java +++ b/core/java/android/os/ParcelFileDescriptor.java @@ -189,7 +189,11 @@ public ParcelFileDescriptor(FileDescriptor fd, FileDescriptor commChannel) { mWrapped = null; mFd = fd; mCommFd = commChannel; - mGuard.open("close"); + try { + mGuard.open("close"); + } catch(Throwable e) { + Log.w("ParcelFileDescriptor", "Explicit termination method 'close' not called"); + } } /** diff --git a/core/java/android/os/PowerManager.java b/core/java/android/os/PowerManager.java index 960c9f5cf22c..89622d1bfc4a 100644 --- a/core/java/android/os/PowerManager.java +++ b/core/java/android/os/PowerManager.java @@ -417,6 +417,20 @@ public final class PowerManager { */ public static final String REBOOT_RECOVERY_UPDATE = "recovery-update"; + /** + * The value to pass as the 'reason' argument to reboot() to + * reboot into bootloader mode + * @hide + */ + public static final String REBOOT_BOOTLOADER = "bootloader"; + + /** + * The value to pass as the 'reason' argument to reboot() to + * reboot into download mode + * @hide + */ + public static final String REBOOT_DOWNLOAD = "download"; + /** * The value to pass as the 'reason' argument to reboot() when device owner requests a reboot on * the device. @@ -798,6 +812,22 @@ public void wakeUp(long time, String reason) { } } + /** + * Forces the device to wake up from sleep only if + * nothing is blocking the proximity sensor + * + * @see #wakeUp + * + * @hide + */ + public void wakeUpWithProximityCheck(long time, String reason) { + try { + mService.wakeUpWithProximityCheck(time, reason, mContext.getOpPackageName()); + } catch (RemoteException e) { + throw e.rethrowFromSystemServer(); + } + } + /** * Forces the device to start napping. *

@@ -992,6 +1022,24 @@ public void rebootSafeMode() { } } + /** + * Reboot the device. Will not return if the reboot is successful. + *

+ * Requires the {@link android.Manifest.permission#REBOOT} permission. + *

+ * + * @param reason code to pass to the kernel (e.g., "recovery", "bootloader", "download") to + * request special boot modes, or null. + * @hide + */ + public void rebootCustom(String reason) { + try { + mService.rebootCustom(false, reason, true); + } catch (RemoteException e) { + throw e.rethrowFromSystemServer(); + } + } + /** * Returns true if the device is currently in power save mode. When in this mode, * applications should reduce their functionality in order to conserve battery as @@ -1517,4 +1565,26 @@ public Runnable wrap(Runnable r) { }; } } + + /** + * @hide + */ + public String getSeenWakeLocks() { + try { + if (mService != null) { + return mService.getSeenWakeLocks(); + } + } catch (RemoteException e) { + } + return null; + } + + /** + * Gets the default button brightness value. + * @hide + */ + public int getDefaultButtonBrightness() { + return mContext.getResources().getInteger( + com.android.internal.R.integer.config_buttonBrightnessSettingDefault); + } } diff --git a/core/java/android/os/PowerManagerInternal.java b/core/java/android/os/PowerManagerInternal.java index a01b8ed2c905..44addfc9bb1d 100644 --- a/core/java/android/os/PowerManagerInternal.java +++ b/core/java/android/os/PowerManagerInternal.java @@ -86,6 +86,16 @@ public static boolean isInteractive(int wakefulness) { */ public abstract void setScreenBrightnessOverrideFromWindowManager(int brightness); + /** + * Used by the window manager to override the button brightness based on the + * current foreground activity. + * + * This method must only be called by the window manager. + * + * @param brightness The overridden brightness, or -1 to disable the override. + */ + public abstract void setButtonBrightnessOverrideFromWindowManager(int brightness); + /** * Used by the window manager to override the user activity timeout based on the * current foreground activity. It can only be used to make the timeout shorter diff --git a/core/java/android/os/storage/DiskInfo.java b/core/java/android/os/storage/DiskInfo.java index 911410744bd6..db0b0fd37ce8 100644 --- a/core/java/android/os/storage/DiskInfo.java +++ b/core/java/android/os/storage/DiskInfo.java @@ -47,6 +47,8 @@ public class DiskInfo implements Parcelable { public static final int FLAG_DEFAULT_PRIMARY = 1 << 1; public static final int FLAG_SD = 1 << 2; public static final int FLAG_USB = 1 << 3; + public static final int FLAG_EMMC = 1 << 4; + public static final int FLAG_NON_REMOVABLE = 1 << 5; public final String id; public final int flags; @@ -128,6 +130,10 @@ public boolean isUsb() { return (flags & FLAG_USB) != 0; } + public boolean isNonRemovable() { + return (flags & FLAG_NON_REMOVABLE) != 0; + } + @Override public String toString() { final CharArrayWriter writer = new CharArrayWriter(); diff --git a/core/java/android/os/storage/StorageVolume.java b/core/java/android/os/storage/StorageVolume.java index 1fc0b820cf06..34ef4f6f42e3 100644 --- a/core/java/android/os/storage/StorageVolume.java +++ b/core/java/android/os/storage/StorageVolume.java @@ -271,16 +271,21 @@ public UserHandle getOwner() { } /** - * Parse and return volume UUID as FAT volume ID, or return -1 if unable to + * Parse and return volume UUID as volume ID, or return -1 if unable to * parse or UUID is unknown. * @hide */ - public int getFatVolumeId() { - if (mFsUuid == null || mFsUuid.length() != 9) { + public int getVolumeId() { + String id = mFsUuid; + if (id == null) { return -1; } + id = id.replace("-", ""); + if (id.length() > 8) { + id = id.substring(0, 8); + } try { - return (int) Long.parseLong(mFsUuid.replace("-", ""), 16); + return (int) Long.parseLong(id, 16); } catch (NumberFormatException e) { return -1; } diff --git a/core/java/android/preference/SeekBarVolumizer.java b/core/java/android/preference/SeekBarVolumizer.java index 3d2e1d1f1d24..5056a86dfa7d 100644 --- a/core/java/android/preference/SeekBarVolumizer.java +++ b/core/java/android/preference/SeekBarVolumizer.java @@ -63,6 +63,8 @@ public interface Callback { private final int mMaxStreamVolume; private boolean mAffectedByRingerMode; private boolean mNotificationOrRing; + private boolean mIsRing; + private boolean mIsNotification; private final Receiver mReceiver = new Receiver(); private Handler mHandler; @@ -93,7 +95,9 @@ public SeekBarVolumizer(Context context, int streamType, Uri defaultUri, Callbac mNotificationManager = context.getSystemService(NotificationManager.class); mStreamType = streamType; mAffectedByRingerMode = mAudioManager.isStreamAffectedByRingerMode(mStreamType); - mNotificationOrRing = isNotificationOrRing(mStreamType); + mIsRing = isRing(mStreamType); + mIsNotification = isNotification(mStreamType); + mNotificationOrRing = mIsRing || mIsNotification; if (mNotificationOrRing) { mRingerMode = mAudioManager.getRingerModeInternal(); } @@ -102,7 +106,7 @@ public SeekBarVolumizer(Context context, int streamType, Uri defaultUri, Callbac mCallback = callback; mOriginalStreamVolume = mAudioManager.getStreamVolume(mStreamType); mLastAudibleStreamVolume = mAudioManager.getLastAudibleStreamVolume(mStreamType); - mMuted = mAudioManager.isStreamMute(mStreamType); + mMuted = mAudioManager.isStreamMute(mStreamType) || mOriginalStreamVolume == 0; if (mCallback != null) { mCallback.onMuted(mMuted, isZenMuted()); } @@ -118,8 +122,12 @@ public SeekBarVolumizer(Context context, int streamType, Uri defaultUri, Callbac mDefaultUri = defaultUri; } - private static boolean isNotificationOrRing(int stream) { - return stream == AudioManager.STREAM_RING || stream == AudioManager.STREAM_NOTIFICATION; + private static boolean isNotification(int stream) { + return stream == AudioManager.STREAM_NOTIFICATION; + } + + private static boolean isRing(int stream) { + return stream == AudioManager.STREAM_RING; } public void setSeekBar(SeekBar seekBar) { @@ -143,7 +151,8 @@ protected void updateSeekBar() { mSeekBar.setEnabled(!zenMuted); if (zenMuted) { mSeekBar.setProgress(mLastAudibleStreamVolume, true); - } else if (mNotificationOrRing && mRingerMode == AudioManager.RINGER_MODE_VIBRATE) { + } else if (mNotificationOrRing && (mRingerMode == AudioManager.RINGER_MODE_VIBRATE + || mRingerMode == AudioManager.RINGER_MODE_SILENT)) { mSeekBar.setProgress(0, true); } else if (mMuted) { mSeekBar.setProgress(0, true); @@ -369,7 +378,7 @@ private void updateSlider() { if (mSeekBar != null && mAudioManager != null) { final int volume = mAudioManager.getStreamVolume(mStreamType); final int lastAudibleVolume = mAudioManager.getLastAudibleStreamVolume(mStreamType); - final boolean mute = mAudioManager.isStreamMute(mStreamType); + final boolean mute = mAudioManager.isStreamMute(mStreamType) || volume == 0; mUiHandler.postUpdateSlider(volume, lastAudibleVolume, mute); } } @@ -428,8 +437,7 @@ public void onReceive(Context context, Intent intent) { } private void updateVolumeSlider(int streamType, int streamValue) { - final boolean streamMatch = mNotificationOrRing ? isNotificationOrRing(streamType) - : (streamType == mStreamType); + boolean streamMatch = streamType == mStreamType; if (mSeekBar != null && streamMatch && streamValue != -1) { final boolean muted = mAudioManager.isStreamMute(mStreamType) || streamValue == 0; diff --git a/core/java/android/provider/Downloads.java b/core/java/android/provider/Downloads.java index a2c5a92e52a2..062983a0cbfc 100644 --- a/core/java/android/provider/Downloads.java +++ b/core/java/android/provider/Downloads.java @@ -600,6 +600,11 @@ public static boolean isStatusCompleted(int status) { */ public static final int STATUS_QUEUED_FOR_WIFI = 196; + /** + * This download is paused manually. + */ + public static final int STATUS_PAUSED_MANUAL = 197; + /** * This download couldn't be completed due to insufficient storage * space. Typically, this is because the SD card is full. diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index ba62b4734a7c..92f08cddbfcd 100755 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -2757,6 +2757,12 @@ public boolean validate(String value) { */ public static final int END_BUTTON_BEHAVIOR_DEFAULT = END_BUTTON_BEHAVIOR_SLEEP; + /** + * List of Apps hidden from recents + * @hide + */ + public static final String HIDE_FROM_RECENTS_LIST = "hide_from_recents_list"; + /** * Is advanced settings mode turned on. 0 == no, 1 == yes * @hide @@ -3107,6 +3113,26 @@ public boolean validate(String value) { */ public static final int SCREEN_BRIGHTNESS_MODE_AUTOMATIC = 1; + /** + * The button brightness to be used while the screen is on or after a button press, + * depending on the value of {@link BUTTON_BACKLIGHT_TIMEOUT}. + * Valid value range is between 0 and {@link PowerManager#getMaximumButtonBrightness()} + * @hide + */ + public static final String BUTTON_BRIGHTNESS = "button_brightness"; + + /** + * The time in ms to keep the button backlight on after pressing a button. + * A value of 0 will keep the buttons on for as long as the screen is on. + * @hide + */ + public static final String BUTTON_BACKLIGHT_TIMEOUT = "button_backlight_timeout"; + + /** + * @hide + */ + public static final String BUTTON_BACKLIGHT_ON_TOUCH_ONLY = "button_backlight_on_touch_only"; + /** * Control whether the process CPU usage meter should be shown. * @@ -3896,6 +3922,12 @@ public boolean validate(String value) { /** @hide */ public static final Validator LOCK_TO_APP_ENABLED_VALIDATOR = sBooleanValidator; + /** + * Enable/Disable screenshot sound + * @hide + */ + public static final String SCREENSHOT_SOUND = "screenshot_sound"; + /** * I am the lolrus. *

@@ -3918,22 +3950,497 @@ public boolean validate(String value) { }; /** - * Setting to determine whether or not to show the battery percentage in the status bar. - * 0 - Don't show percentage - * 1 - Show percentage + * Setting to determine whether or not to show the battery percentage in the status bar. + * 0 - Don't show percentage + * 1 - Show percentage + * @hide + */ + public static final String SHOW_BATTERY_PERCENT = "status_bar_show_battery_percent"; + + /** @hide */ + private static final Validator SHOW_BATTERY_PERCENT_VALIDATOR = sBooleanValidator; + + /** + * IMPORTANT: If you add a new public settings you also have to add it to + * PUBLIC_SETTINGS below. If the new setting is hidden you have to add + * it to PRIVATE_SETTINGS below. Also add a validator that can validate + * the setting value. See an example above. + */ + + /** + * Whether to use the MTP by default after connecting to PC + * @hide + */ + public static final String MTP_DIRTY_HACK = "mtp_dirty_hack"; + /** @hide */ + public static final String MTP_DIRTY_HACK_SAVE = "mtp_dirty_hack_save"; + + /** + * Enable blocking wakelock + * @hide + */ + public static final String WAKELOCK_BLOCKING_ENABLED = "wakelock_blocking_enabled"; + + /** + * List of wakelock blocks selected + * @hide + */ + public static final String WAKELOCK_BLOCKING_LIST = "wakelock_blocking_list"; + + /** + * List of alarms blocks selected + * @hide + */ + public static final String ALARM_BLOCKING_LIST = "alarm_blocking_list"; + + /** + * Enable blocking alarm + * @hide + */ + public static final String ALARM_BLOCKING_ENABLED = "alarm_blocking_enabled"; + + /** + * show clear all recents button + * @hide + */ + public static final String SHOW_CLEAR_ALL_RECENTS = "show_clear_all_recents"; + + /** + * location of the clear all rectents button + * @hide + */ + public static final String RECENTS_CLEAR_ALL_LOCATION = "recents_clear_all_location"; + + /** + * Whether the phone vibrates on call connect + * @hide + */ + public static final String VIBRATE_ON_CONNECT = "vibrate_on_connect"; + + /** + * Whether the phone vibrates on call waiting + * @hide + */ + public static final String VIBRATE_ON_CALLWAITING = "vibrate_on_callwaiting"; + + /** + * Whether the phone vibrates on disconnect + * @hide + */ + public static final String VIBRATE_ON_DISCONNECT = "vibrate_on_disconnect"; + + /** + * Disable dashboard conditions in settings + * @hide + */ + public static final String ENABLE_CONDITIONS = "enable_conditions"; + + /** + * Disable dashboard suggestions in settings + * @hide + */ + public static final String ENABLE_SUGGESTIONS = "enable_suggestions"; + + /** + * Whether to show the weather info on the lock screen + * @hide + */ + public static final String LOCK_SCREEN_SHOW_WEATHER = "lock_screen_show_weather"; + + /** + * Whether to show the weather location lock screen + * @hide + */ + public static final String LOCK_SCREEN_SHOW_WEATHER_LOCATION = "lock_screen_show_weather_location"; + + /** + * Whether to display qs tile titles in the qs panel + * @hide + */ + public static final String QS_TILE_TITLE_VISIBILITY = "qs_tile_title_visibility"; + + /** + * @hide + */ + public static final String OMNIJAWS_WEATHER_ICON_PACK = "omnijaws_weather_icon_pack"; + + /** + * Change volume up and down handlign based on rotation + * @hide + */ + public static final String SWAP_VOLUME_BUTTONS = "swap_volume_buttons"; + + /** + * Volume key controls ringtone or media sound stream + * @hide + */ + public static final String VOLUME_KEYS_CONTROL_MEDIA_STREAM = + "volume_keys_control_media_stream"; + + /** + * Quick Settings Smart Pulldown + * @hide + */ + public static final String QS_SMART_PULLDOWN = "qs_smart_pulldown"; + + /** Whether to skip music track with volume rocker + /** + * @hide + */ + public static final String VOLUME_BUTTON_MUSIC_CONTROL = "volume_button_music_control"; + + /** + * Whether to show media art on lockscreen + * @hide + */ + public static final String LOCKSCREEN_MEDIA_METADATA = "lockscreen_media_metadata"; + + /** + * How many rows to show in the qs panel when in portrait + * @hide + */ + public static final String QS_ROWS_PORTRAIT = "qs_rows_portrait"; + + /** + * How many rows to show in the qs panel when in landscape + * @hide + */ + public static final String QS_ROWS_LANDSCAPE = "qs_rows_landscape"; + + /** + * How many columns to show in the qs panel when in portrait + * @hide + */ + public static final String QS_COLUMNS_PORTRAIT = "qs_columns_portrait"; + + /** + * How many columns to show in the qs panel when in landscape + * @hide + */ + public static final String QS_COLUMNS_LANDSCAPE = "qs_columns_landscape"; + + /** + * Whether to show the battery info on the lockscreen while charging + * @hide + */ + public static final String LOCKSCREEN_BATTERY_INFO = "lockscreen_battery_info"; + + /** + * Volume keys control cursor in text fields (default is 0) + * 0 - Disabled + * 1 - Volume up/down moves cursor left/right + * 2 - Volume up/down moves cursor right/left + * @hide + */ + public static final String VOLUME_KEY_CURSOR_CONTROL = "volume_key_cursor_control"; + + /** + * Whether to use the custom quick unlock screen control + * @hide + */ + public static final String LOCKSCREEN_QUICK_UNLOCK_CONTROL = + "lockscreen_quick_unlock_control"; + + /** + * Whether to wake the screen with the volume keys, the value is boolean. + * @hide + */ + public static final String VOLUME_WAKE_SCREEN = "volume_wake_screen"; + + /** + * Immersive recents options + * + * 0 = Default AOSP look + * 1 = Statusbar only + * 2 = Navbar only + * 3 = Fullscreen + */ + public static final String IMMERSIVE_RECENTS = "immersive_recents"; + + /** + * Whether to show the IME switcher in the status bar + * @hide + */ + public static final String STATUS_BAR_IME_SWITCHER = "status_bar_ime_switcher"; + + /** + * Whether to enable status and navigation bar color in battery saver mode. + * + * @hide + */ + public static final String BATTERY_SAVER_MODE_COLOR = "battery_save_mode_color"; + + /** + * volume answer + * @hide + */ + public static final String ANSWER_VOLUME_BUTTON_BEHAVIOR_ANSWER = "call_volume_answer"; + + /** + * Wheter to show network traffic indicator in statusbar + * @hide + */ + public static final String NETWORK_TRAFFIC_STATE = "network_traffic_state"; + + /** + * Network traffic inactivity threshold (default is 1 kBs) + * @hide + */ + public static final String NETWORK_TRAFFIC_AUTOHIDE_THRESHOLD = "network_traffic_autohide_threshold"; + + /** + * Whether to display the torch option in the power menu + * + * @hide + */ + public static final String POWERMENU_TORCH = "powermenu_torch"; + + /** + * Whether to display the screenrecord option in the power menu + * + * @hide + */ + public static final String POWERMENU_SCREENRECORD = "powermenu_screenrecord"; + + /** + * Boolean value whether to link ringtone and notification volume + * + * @hide + */ + public static final String VOLUME_LINK_NOTIFICATION = "volume_link_notification"; + + /** + * Applications list where heasdup should't show + * + * @hide + */ + public static final String HEADS_UP_STOPLIST_VALUES = "heads_up_stoplist_values"; + + /** + * Which applications to disable heads up notifications for + * + * @hide + */ + public static final String HEADS_UP_BLACKLIST_VALUES = "heads_up_blacklist_values"; + + /** + * Whether to enable status and navigation bar color in battery saver mode. + * Heads up timeout configuration + * @hide + */ + public static final String HEADS_UP_TIMEOUT = "heads_up_timeout"; + + /** + * Defines the global heads up notification snooze + * @hide + */ + public static final String HEADS_UP_NOTIFICATION_SNOOZE = "heads_up_notification_snooze"; + + /** + * Indicates whether ANBI (Accidental navigation button interaction) is enabled. + * + * @hide + */ + public static final String ANBI_ENABLED = "anbi_enabled"; + + /** + * whether to enable or disable vibration on succesful fingerprint auth + * + * @hide + */ + public static final String FINGERPRINT_SUCCESS_VIB = "fingerprint_success_vib"; + + /** + * Force expanded notifications on all apps that support it. + * @hide + */ + public static final String FORCE_EXPANDED_NOTIFICATIONS = "force_expanded_notifications"; + + /** + * Three Finger Gesture from Oppo + * @hide + */ + public static final String THREE_FINGER_GESTURE = "three_finger_gesture"; + + /** + * Whether to show the battery bar + * @hide + */ + public static final String STATUSBAR_BATTERY_BAR = "statusbar_battery_bar"; + + /** + * @hide + */ + public static final String STATUSBAR_BATTERY_BAR_COLOR = "statusbar_battery_bar_color"; + + /** + * @hide + */ + public static final String STATUSBAR_BATTERY_BAR_THICKNESS = + "statusbar_battery_bar_thickness"; + + /** + * @hide + */ + public static final String STATUSBAR_BATTERY_BAR_STYLE = "statusbar_battery_bar_style"; + + /** + * @hide + */ + public static final String STATUSBAR_BATTERY_BAR_ANIMATE = "statusbar_battery_bar_animate"; + + /** + * @hide + */ + public static final String STATUSBAR_BATTERY_BAR_CHARGING_COLOR = + "statusbar_battery_bar_charging_color"; + + /** + * @hide + */ + public static final String STATUSBAR_BATTERY_BAR_BATTERY_LOW_COLOR = + "statusbar_battery_bar_battery_low_color"; + + /** + * @hide + */ + public static final String STATUSBAR_BATTERY_BAR_ENABLE_CHARGING_COLOR = + "statusbar_battery_bar_enable_charging_color"; + + /** + * @hide + */ + public static final String STATUSBAR_BATTERY_BAR_BLEND_COLORS = "statusbar_battery_bar_blend_color"; + + /** + * @hide + */ + public static final String STATUSBAR_BATTERY_BAR_BLEND_COLORS_REVERSE = + "statusbar_battery_bar_blend_color_reverse"; + + /** + * Show/Hide Emergency Button on Lockscreen + * @hide + */ + public static final String SHOW_EMERGENCY_BUTTON = "show_emergency_button"; + + /** + * Whether to vibrate on power connection or disconnection + * @hide + */ + public static final String VIBRATION_ON_CHARGE_STATE_CHANGED = "vibration_on_charge_state_changed"; + + /** + * show the membar in recents + * @hide + */ + public static final String SYSTEMUI_RECENTS_MEM_DISPLAY = "systemui_recents_mem_display"; + + /** + * Dynamic Navbar Switch + * @hide + */ + public static final String NAVBAR_DYNAMIC = "navbar_dynamic"; + + /** + * Whether to show the notification ticker on the status bar + * @hide + */ + public static final String STATUS_BAR_SHOW_TICKER = "status_bar_show_ticker"; + + /** + * Whether to display 4G icon instead LTE + * @hide + */ + public static final String SHOW_FOURG_ICON = "show_fourg_icon"; + + /** + * Toast icon switch + * @hide + */ + public static final String TOAST_ICON = "toast_icon"; + + /** + * Force Volume panel in expanded mode + * @hide + */ + public static final String VOLUME_DIALOG_FORCE_EXPANDED = "volume_dialog_force_expanded"; + + /** + * MediaScanner behavior on boot. + * 0 = enabled + * 1 = ask (notification) + * 2 = disabled + * @hide + */ + public static final String MEDIA_SCANNER_ON_BOOT = "media_scanner_on_boot"; + + /** Whether to allow one finger quick settings expansion on the right side of the statusbar. + * + * @hide + */ + public static final String STATUS_BAR_QUICK_QS_PULLDOWN = "status_bar_quick_qs_pulldown"; + + /** + * 0 - wallpaper based + * 1 - force light + * 2 - force dark + * @hide + */ + public static final String SYSTEM_THEME_STYLE = "system_theme_style"; + + /** + * 0 - fullscreen + * 1 - partial + * @hide + */ + public static final String SCREENSHOT_DEFAULT_MODE = "screenshot_default_mode"; + + /** + * Whether to hide the clock, show it in the right or left + * position or show it in the center + * 0: don't show the clock + * 1: show the clock in the right position (LTR) + * 2: show the clock in the center + * 3: show the clock in the left position (LTR) + * default: 1 + * @hide + */ + public static final String STATUS_BAR_CLOCK = "status_bar_clock"; + + /** + * Display style of AM/PM next to clock in status bar + * 0: Normal display (Eclair stock) + * 1: Small display (Froyo stock) + * 2: No display (Gingerbread/ICS stock) + * default: 2 * @hide */ - public static final String SHOW_BATTERY_PERCENT = "status_bar_show_battery_percent"; + public static final String STATUS_BAR_AM_PM = "status_bar_am_pm"; - /** @hide */ - private static final Validator SHOW_BATTERY_PERCENT_VALIDATOR = sBooleanValidator; + /** + * Shows custom date before clock time + * 0 - No Date + * 1 - Small Date + * 2 - Normal Date + * @hide + */ + public static final String STATUS_BAR_CLOCK_DATE_DISPLAY = "statusbar_clock_date_display"; /** - * IMPORTANT: If you add a new public settings you also have to add it to - * PUBLIC_SETTINGS below. If the new setting is hidden you have to add - * it to PRIVATE_SETTINGS below. Also add a validator that can validate - * the setting value. See an example above. + * Sets the date string style + * 0 - Regular style + * 1 - Lowercase + * 2 - Uppercase + * @hide + */ + public static final String STATUS_BAR_CLOCK_DATE_STYLE = "statusbar_clock_date_style"; + + /** + * Stores the java DateFormat string for the date + * @hide */ + public static final String STATUS_BAR_CLOCK_DATE_FORMAT = "statusbar_clock_date_format"; /** * Settings to backup. This is here so that it's in the same place as the settings @@ -3991,7 +4498,12 @@ public boolean validate(String value) { LOCK_TO_APP_ENABLED, NOTIFICATION_SOUND, ACCELEROMETER_ROTATION, - SHOW_BATTERY_PERCENT + SHOW_BATTERY_PERCENT, + STATUS_BAR_CLOCK, + STATUS_BAR_AM_PM, + STATUS_BAR_CLOCK_DATE_DISPLAY, + STATUS_BAR_CLOCK_DATE_STYLE, + STATUS_BAR_CLOCK_DATE_FORMAT }; /** @@ -4101,6 +4613,7 @@ public boolean validate(String value) { PRIVATE_SETTINGS.add(LOCK_TO_APP_ENABLED); PRIVATE_SETTINGS.add(EGG_MODE); PRIVATE_SETTINGS.add(SHOW_BATTERY_PERCENT); + PRIVATE_SETTINGS.add(SYSTEM_THEME_STYLE); } /** @@ -4247,6 +4760,24 @@ public static void getCloneFromParentOnValueSettings(Map outMap) // Settings moved to Settings.Secure + /** + * Whether the phone ringtone should be played in an increasing manner + * @hide + */ + public static final String INCREASING_RING = "increasing_ring"; + + /** + * Start volume fraction for increasing ring volume + * @hide + */ + public static final String INCREASING_RING_START_VOLUME = "increasing_ring_start_vol"; + + /** + * Ramp up time (seconds) for increasing ring + * @hide + */ + public static final String INCREASING_RING_RAMP_UP_TIME = "increasing_ring_ramp_up_time"; + /** * @deprecated Use {@link android.provider.Settings.Global#ADB_ENABLED} * instead @@ -5412,6 +5943,266 @@ public static boolean putFloatForUser(ContentResolver cr, String name, float val */ public static final int LOCATION_MODE_HIGH_ACCURACY = 3; + /** + * @hide + */ + public static final String NAVIGATION_BAR_HEIGHT_LANDSCAPE = "navigation_bar_height_landscape"; + + /** + * @hide + */ + public static final String NAVIGATION_BAR_HEIGHT = "navigation_bar_height"; + + /** + * @hide + */ + public static final String NAVIGATION_BAR_WIDTH = "navigation_bar_width"; + + /** + * Add or remove software navigation bar + * @hide + */ + public static final String NAVIGATION_BAR_VISIBLE = "navigation_bar_visible"; + + /** + * Navigation bar mode + * + * @hide + */ + public static final String NAVIGATION_BAR_MODE = "navigation_bar_mode"; + + /** + * Fling actions + * + * @hide + */ + public static final String FLING_GESTURE_ACTIONS = "fling_gesture_configs"; + + /** + * Fling logo visible + * + * @hide + */ + public static final String FLING_LOGO_VISIBLE = "fling_logo_visible"; + + /** + * Fling logo animates + * + * @hide + */ + public static final String FLING_LOGO_ANIMATES= "fling_logo_animates"; + + /** + * Fling logo animates + * + * @hide + */ + //public static final String FLING_LOGO_COLOR = "fling_logo_color"; + + /** + * Fling logo opacity + * + * @hide + */ + public static final String FLING_LOGO_OPACITY = "fling_logo_opacity"; + + /** + * Fling pulse music visualizer + * + * @hide + */ + public static final String FLING_PULSE_ENABLED = "fling_pulse_enabled"; + + /** + * Fling pulse music visualizer color + * + * @hide + */ + public static final String FLING_PULSE_COLOR = "fling_pulse_color"; + + /** + * Fling ripple effect + * + * @hide + */ + public static final String FLING_RIPPLE_ENABLED = "fling_ripple_enabled"; + + /** + * Fling ripple color + * + * @hide + */ + public static final String FLING_RIPPLE_COLOR = "fling_ripple_color"; + + /** + * Fling pulse lavalamp psychedelic colors + * + * @hide + */ + public static final String FLING_PULSE_LAVALAMP_ENABLED = "fling_pulse_lavalamp_enabled"; + + /** + * Fling pulse lavalamp animation speed + * + * @hide + */ + public static final String FLING_PULSE_LAVALAMP_SPEED = "fling_pulse_lavalamp_speed"; + + /** + * Pulse renderer implementation + * + * @hide + */ + public static final String PULSE_RENDER_STYLE_URI = "pulse_render_style"; + + /** + * time it takes to execute Fling long press action + * + * @hide + */ + public static final String FLING_LONGPRESS_TIMEOUT = "fling_longpress_timeout"; + + /** + * distance to swipe right when device is in portrait orientation to + * trigger action + * + * @hide + */ + public static final String FLING_LONGSWIPE_THRESHOLD_RIGHT_PORT = "fling_longswipe_threshold_right_port"; + + /** + * distance to swipe left when device is in portrait orientation to + * trigger action + * + * @hide + */ + public static final String FLING_LONGSWIPE_THRESHOLD_LEFT_PORT = "fling_longswipe_threshold_left_port"; + + /** + * distance to swipe right when device is in landscape orientation to + * trigger action. Apples to a horizontal layout (tablet/phablet) + * + * @hide + */ + public static final String FLING_LONGSWIPE_THRESHOLD_RIGHT_LAND = "fling_longswipe_threshold_right_land"; + + /** + * distance to swipe left when device is in landscape orientation to + * trigger action. Apples to a horizontal layout (tablet/phablet) + * + * @hide + */ + public static final String FLING_LONGSWIPE_THRESHOLD_LEFT_LAND = "fling_longswipe_threshold_left_land"; + + /** + * distance to swipe up when device is in landscape orientation to + * trigger action. Apples to a vertical layout (phones) + * + * @hide + */ + public static final String FLING_LONGSWIPE_THRESHOLD_UP_LAND = "fling_longswipe_threshold_up_land"; + + /** + * distance to swipe down when device is in landscape orientation to + * trigger action. Apples to a horizontal layout (phones) + * + * @hide + */ + public static final String FLING_LONGSWIPE_THRESHOLD_DOWN_LAND = "fling_longswipe_threshold_down_land"; + + /** + * Navbar buttons transparency + * @hide + */ + public static final String NAVBAR_BUTTONS_ALPHA = "navbar_buttons_alpha"; + + /** + * Custom Pulse Widths + * @hide + */ + public static final String PULSE_CUSTOM_DIMEN = "pulse_custom_dimen"; + + /** + * Custom Spacing Between Pulse Bars + * @hide + */ + public static final String PULSE_CUSTOM_DIV = "pulse_custom_div"; + + /** + * Custom Pulse Block Size + * @hide + */ + public static final String PULSE_FILLED_BLOCK_SIZE = "pulse_filled_block_size"; + + /** + * Custom Spacing Between Pulse Blocks + * @hide + */ + public static final String PULSE_EMPTY_BLOCK_SIZE = "pulse_empty_block_size"; + + /** + * Custom Pulse Sanity Levels + * @hide + */ + public static final String PULSE_CUSTOM_FUDGE_FACTOR = "pulse_custom_fudge_factor"; + + /** + * Pulse Fudge Factor + * @hide + */ + public static final String PULSE_SOLID_FUDGE_FACTOR = "pulse_solid_fudge_factor"; + + /** + * Pulse Lavamp Animation Speed + * @hide + */ + public static final String PULSE_LAVALAMP_SOLID_SPEED = "lava_lamp_solid_speed"; + + /** + * Pulse Solid units count + * @hide + */ + public static final String PULSE_SOLID_UNITS_COUNT = "pulse_solid_units_count"; + + /** + * Pulse Solid units opacity + * @hide + */ + public static final String PULSE_SOLID_UNITS_OPACITY = "pulse_solid_units_opacity"; + + /** + * SmartBar buttons opacity on Pulse + * @hide + */ + public static final String PULSE_CUSTOM_BUTTONS_OPACITY = "pulse_custom_buttons_opacity"; + + /** + * Long press delay for smartbar buttons + * @hide + * 0: Default (fast) + * 1: Normal delay + * 2: Long delay + */ + public static final String SMARTBAR_LONGPRESS_DELAY = "smartbar_longpress_delay"; + + /** + * Scaling value for smartbar custom button icon + * @hide + */ + public static final String SMARTBAR_CUSTOM_ICON_SIZE = "smartbar_custom_icon_size"; + + /** + * Whether to switch Fling double tap right/left actions to kb cursors when a keyboard is showing + * @hide + */ + public static final String FLING_KEYBOARD_CURSORS = "fling_keyboard_cursors"; + + /** + * Whether to enable double tap to sleep for smartbar + * @hide + */ + public static final String SMARTBAR_DOUBLETAP_SLEEP = "smartbar_doubletap_sleep"; + /** * A flag containing settings used for biometric weak * @hide @@ -6289,6 +7080,12 @@ public static boolean putFloatForUser(ContentResolver cr, String name, float val public static final String SEARCH_GLOBAL_SEARCH_ACTIVITY = "search_global_search_activity"; + /** + * Disable hw buttons - actions, brightness, haptic feedback, overflow menu + * @hide + */ + public static final String HARDWARE_KEYS_DISABLE = "hardware_keys_disable"; + /** * The number of promoted sources in GlobalSearch. * @hide @@ -6841,6 +7638,18 @@ public static boolean putFloatForUser(ContentResolver cr, String name, float val public static final String CAMERA_DOUBLE_TAP_POWER_GESTURE_DISABLED = "camera_double_tap_power_gesture_disabled"; + /** + * Whether the torch launch gesture to double tap or long press the power button when the + * screen is off should be enabled. + * + * 0: disabled + * 1: double tap power for torch + * 2: long tap power for torch + * @hide + */ + public static final String TORCH_POWER_BUTTON_GESTURE = + "torch_power_button_gesture"; + /** * Whether the camera double twist gesture to flip between front and back mode should be * enabled. @@ -6980,6 +7789,12 @@ public static boolean putFloatForUser(ContentResolver cr, String name, float val */ public static final int VR_DISPLAY_MODE_OFF = 1; + /** Whether to vibrate when quick settings tile is pressed. + * + * @hide + */ + public static final String QUICK_SETTINGS_TILES_VIBRATE = "quick_settings_vibrate"; + /** * Whether CarrierAppUtils#disableCarrierAppsUntilPrivileged has been executed at least * once. @@ -7113,6 +7928,29 @@ public static boolean putFloatForUser(ContentResolver cr, String name, float val */ public static final String QS_AUTO_ADDED_TILES = "qs_auto_tiles"; + /** + * Disable power menu on secure lock screens + * + * @hide + */ + public static final String LOCK_POWER_MENU_DISABLED = "lockscreen_power_menu_disabled"; + + /** + * Disable expanding quick settings on secure lock screens + * + * @hide + */ + public static final String LOCK_QS_DISABLED = "lockscreen_qs_disabled"; + + /** + * 0 - Automatic (Wallpaper based) + * 1 - Light + * 2 - Dark + * 3 - Black + * @hide + */ + public static final String DEVICE_THEME = "device_theme"; + /** * This are the settings to be backed up. * @@ -7196,6 +8034,7 @@ public static boolean putFloatForUser(ContentResolver cr, String name, float val SYNC_PARENT_SOUNDS, CAMERA_DOUBLE_TWIST_TO_FLIP_ENABLED, CAMERA_DOUBLE_TAP_POWER_GESTURE_DISABLED, + TORCH_POWER_BUTTON_GESTURE, SYSTEM_NAVIGATION_KEYS_ENABLED, QS_TILES, DOZE_ENABLED, @@ -7685,6 +8524,12 @@ public static final class Global extends NameValueTable { public static final String WIRELESS_CHARGING_STARTED_SOUND = "wireless_charging_started_sound"; + /** + * URI for the battery plugged sound file. + * @hide + */ + public static final String BATTERY_PLUGGED_SOUND = "battery_plugged_sound"; + /** * Whether to play a sound for charging events. * @hide @@ -9944,12 +10789,26 @@ public static final String getBluetoothSapPriorityKey(String address) { /** * Defines global runtime overrides to window policy. * - * See {@link com.android.server.policy.PolicyControl} for value format. + * See {@link android.view.WindowManagerPolicyControl} for value format. * * @hide */ public static final String POLICY_CONTROL = "policy_control"; + /** + * @hide + */ + public static final String POLICY_CONTROL_SELECTED = "policy_control_selected"; + + /** + * Defines global runtime overrides to window policy style. + * + * See {@link android.view.WindowManagerPolicyControl} for value definitions. + * + * @hide + */ + public static final String POLICY_CONTROL_STYLE = "policy_control_style"; + /** * Defines global zen mode. ZEN_MODE_OFF, ZEN_MODE_IMPORTANT_INTERRUPTIONS, * or ZEN_MODE_NO_INTERRUPTIONS. @@ -9962,7 +10821,7 @@ public static final String getBluetoothSapPriorityKey(String address) { /** @hide */ public static final int ZEN_MODE_IMPORTANT_INTERRUPTIONS = 1; /** @hide */ public static final int ZEN_MODE_NO_INTERRUPTIONS = 2; /** @hide */ public static final int ZEN_MODE_ALARMS = 3; - + /** @hide */ public static final int ZEN_MODE_OFF_ONLY = 4; /** @hide */ public static String zenModeToString(int mode) { if (mode == ZEN_MODE_IMPORTANT_INTERRUPTIONS) return "ZEN_MODE_IMPORTANT_INTERRUPTIONS"; if (mode == ZEN_MODE_ALARMS) return "ZEN_MODE_ALARMS"; @@ -10191,6 +11050,14 @@ public static final String getBluetoothSapPriorityKey(String address) { */ public static final String SAFE_BOOT_DISALLOWED = "safe_boot_disallowed"; + + /** + * Whether to wake the display when plugging or unplugging the charger + * + * @hide + */ + public static final String WAKE_WHEN_PLUGGED_OR_UNPLUGGED = "wake_when_plugged_or_unplugged"; + /** * Whether this device is currently in retail demo mode. If true, device * usage is severely limited. @@ -10290,6 +11157,7 @@ public static final String getBluetoothSapPriorityKey(String address) { public static final String[] SETTINGS_TO_BACKUP = { BUGREPORT_IN_POWER_MENU, STAY_ON_WHILE_PLUGGED_IN, + WAKE_WHEN_PLUGGED_OR_UNPLUGGED, AUTO_TIME, AUTO_TIME_ZONE, POWER_SOUNDS_ENABLED, diff --git a/core/java/android/service/dreams/DreamManagerInternal.java b/core/java/android/service/dreams/DreamManagerInternal.java index ff7cef9d945a..c750b5e5976a 100644 --- a/core/java/android/service/dreams/DreamManagerInternal.java +++ b/core/java/android/service/dreams/DreamManagerInternal.java @@ -42,4 +42,9 @@ public abstract class DreamManagerInternal { * Called by the power manager to determine whether a dream is running. */ public abstract boolean isDreaming(); + + /** + * Called by the power manager to determine whether the dream has gone to doze mode. + */ + public abstract boolean isDozing(); } diff --git a/core/java/android/service/dreams/IDreamManager.aidl b/core/java/android/service/dreams/IDreamManager.aidl index be3f3b345824..983d8a35c880 100644 --- a/core/java/android/service/dreams/IDreamManager.aidl +++ b/core/java/android/service/dreams/IDreamManager.aidl @@ -30,6 +30,7 @@ interface IDreamManager { ComponentName getDefaultDreamComponent(); void testDream(in ComponentName componentName); boolean isDreaming(); + boolean isDozing(); void finishSelf(in IBinder token, boolean immediate); void startDozing(in IBinder token, int screenState, int screenBrightness); void stopDozing(in IBinder token); diff --git a/core/java/android/service/notification/ZenModeConfig.java b/core/java/android/service/notification/ZenModeConfig.java index 7bec898ac347..3bec06b7327f 100644 --- a/core/java/android/service/notification/ZenModeConfig.java +++ b/core/java/android/service/notification/ZenModeConfig.java @@ -306,7 +306,7 @@ private static boolean sameCondition(ZenRule rule) { } private static int[] generateMinuteBuckets() { - final int maxHrs = 12; + final int maxHrs = 24; final int[] buckets = new int[maxHrs + 3]; buckets[0] = 15; buckets[1] = 30; diff --git a/core/java/android/util/BoostFramework.java b/core/java/android/util/BoostFramework.java new file mode 100644 index 000000000000..54df88253d04 --- /dev/null +++ b/core/java/android/util/BoostFramework.java @@ -0,0 +1,222 @@ +/* + * Copyright (c) 2015, The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package android.util; + +import android.util.Log; +import dalvik.system.PathClassLoader; +import java.lang.reflect.Constructor; +import java.lang.reflect.Method; +import java.lang.System; +import android.view.MotionEvent; +import android.util.DisplayMetrics; +import android.os.SystemProperties; +import android.content.Context; + +/** @hide */ +public class BoostFramework { + + private static final String TAG = "BoostFramework"; + private static final String PERFORMANCE_JAR = "/system/framework/QPerformance.jar"; + private static final String PERFORMANCE_CLASS = "com.qualcomm.qti.Performance"; + +/** @hide */ + private static boolean mIsLoaded = false; + private static Method mAcquireFunc = null; + private static Method mReleaseFunc = null; + private static Method mAcquireTouchFunc = null; + private static Method mIOPStart = null; + private static Method mIOPStop = null; + private static Constructor mConstructor = null; + private static int mLockDuration = -1; + private static int mParamVal[]; + private static String mBoostActivityList[]; + private static long mStartTime; + +/** @hide */ + private Object mPerf = null; + +/** @hide */ + public BoostFramework() { + synchronized(BoostFramework.class) { + if (mIsLoaded == false) { + try { + Class perfClass; + PathClassLoader perfClassLoader; + + perfClassLoader = new PathClassLoader(PERFORMANCE_JAR, + ClassLoader.getSystemClassLoader()); + perfClass = perfClassLoader.loadClass(PERFORMANCE_CLASS); + mConstructor = perfClass.getConstructor(); + + Class[] argClasses = new Class[] {int.class, int[].class}; + mAcquireFunc = perfClass.getDeclaredMethod("perfLockAcquire", argClasses); + + argClasses = new Class[] {}; + mReleaseFunc = perfClass.getDeclaredMethod("perfLockRelease", argClasses); + + argClasses = new Class[] {MotionEvent.class, DisplayMetrics.class, int.class, int[].class}; + mAcquireTouchFunc = perfClass.getDeclaredMethod("perfLockAcquireTouch", argClasses); + + argClasses = new Class[] {int.class, String.class}; + mIOPStart = perfClass.getDeclaredMethod("perfIOPrefetchStart", argClasses); + + argClasses = new Class[] {}; + mIOPStop = perfClass.getDeclaredMethod("perfIOPrefetchStop", argClasses); + + mIsLoaded = true; + } + catch(Exception e) { + Log.e(TAG,"BoostFramework() : Exception_1 = " + e); + } + } + } + + try { + if (mConstructor != null) { + mPerf = mConstructor.newInstance(); + } + } + catch(Exception e) { + Log.e(TAG,"BoostFramework() : Exception_2 = " + e); + } + } + +/** @hide */ +/* private static void loadNative() { + if(!isLoaded){ + //System.loadLibrary("perf_jni"); + System.loadLibrary("qti_performance"); + isLoaded=true; + } + return; + } +*/ + +/** @hide */ + public void perfLockAcquire(int duration, int... list) { + new Thread(() -> { + try { + mAcquireFunc.invoke(mPerf, duration, list); + } catch(Exception e) { + Log.e(TAG,"Exception " + e); + } + }).start(); + } + +/** @hide */ + public void perfLockRelease() { + new Thread(() -> { + try { + mReleaseFunc.invoke(mPerf); + } catch(Exception e) { + Log.e(TAG,"Exception " + e); + } + }).start(); + } + +/** @hide Acquires debug boost perflock + * @param ev Touch Screen event + */ + public void enableDebugBoost(Context context, MotionEvent ev, DisplayMetrics metrics) { + + final int NANO_TO_MILLI = 1000000; + long elapsedMillis; + boolean mDebugBoostPossible = false; + + /* extract the XML params */ + if (mLockDuration == -1 || mParamVal == null || mBoostActivityList == null) { + mLockDuration = context.getResources().getInteger( + com.android.internal.R.integer.debugBoost_timeout); + mParamVal = context.getResources().getIntArray( + com.android.internal.R.array.debugBoost_param_value); + mBoostActivityList = context.getResources().getStringArray( + com.android.internal.R.array.debugBoost_activityList); + } + + String currentActivity = context.getPackageName(); + + /* search for the current activity in list */ + for (String match : mBoostActivityList) { + if (currentActivity.indexOf(match) != -1) { + /* break if found */ + mDebugBoostPossible = true; + break; + } + } + + elapsedMillis = (System.nanoTime() - mStartTime)/NANO_TO_MILLI; + + /* elapsed should be atleast greater than lock duration */ + if (mDebugBoostPossible == true && elapsedMillis > mLockDuration) { + perfLockAcquireTouch(ev, metrics, mLockDuration, mParamVal); + mStartTime = System.nanoTime(); + Log.i(TAG, "dBoost: activity = " + currentActivity + " " + "elapsed = " + elapsedMillis); + } + } + +/** @hide */ + public void perfLockAcquireTouch(MotionEvent ev, DisplayMetrics metrics, + int duration, int... list) { + new Thread(() -> { + try { + mAcquireTouchFunc.invoke(mPerf, ev, metrics, duration, list); + } catch(Exception e) { + Log.e(TAG,"Exception " + e); + } + }).start(); + } + +/** @hide */ + public int perfIOPrefetchStart(int pid, String pkg_name) + { + int ret = -1; + try { + Object retVal = mIOPStart.invoke(mPerf,pid,pkg_name); + ret = (int)retVal; + } catch(Exception e) { + Log.e(TAG,"Exception " + e); + } + return ret; + } + +/** @hide */ + public int perfIOPrefetchStop() + { + int ret = -1; + try { + Object retVal = mIOPStop.invoke(mPerf); + ret = (int)retVal; + } catch(Exception e) { + Log.e(TAG,"Exception " + e); + } + return ret; + } + +}; diff --git a/core/java/android/view/IWindowManager.aidl b/core/java/android/view/IWindowManager.aidl index e576a0fbdb2b..eeeb11d7228f 100644 --- a/core/java/android/view/IWindowManager.aidl +++ b/core/java/android/view/IWindowManager.aidl @@ -23,6 +23,7 @@ import com.android.internal.view.IInputMethodClient; import com.android.internal.policy.IKeyguardDismissCallback; import com.android.internal.policy.IShortcutService; +import android.content.Intent; import android.content.res.CompatibilityInfo; import android.content.res.Configuration; import android.graphics.Bitmap; @@ -279,6 +280,11 @@ interface IWindowManager */ oneway void statusBarVisibilityChanged(int visibility); + /** + * Send some ActionHandler commands to WindowManager. + */ + void sendCustomAction(in Intent intent); + /** * Called by System UI to notify of changes to the visibility of Recents. */ @@ -294,6 +300,11 @@ interface IWindowManager */ boolean hasNavigationBar(); + /** + * Simulate a hardware menu key + */ + boolean hasPermanentMenuKey(); + /** * Lock the device immediately with the specified options (can be null). */ diff --git a/core/java/android/view/InputDevice.java b/core/java/android/view/InputDevice.java index 8405d9ea8c38..0a4e13a82a87 100644 --- a/core/java/android/view/InputDevice.java +++ b/core/java/android/view/InputDevice.java @@ -289,6 +289,15 @@ public final class InputDevice implements Parcelable { */ public static final int SOURCE_HDMI = 0x02000000 | SOURCE_CLASS_BUTTON; + /** + * The input source is a specific virtual event sent from navigation bar. + * + * @see com.android.systemui.statusbar.policy.KeyButtonView#sendEvent() + * @author Carlo Savignano + * @hide + */ + public static final int SOURCE_NAVIGATION_BAR = 0x04000000 | SOURCE_CLASS_BUTTON; + /** * A special input source constant that is used when filtering input devices * to match devices that provide any type of input source. diff --git a/core/java/android/view/ViewConfiguration.java b/core/java/android/view/ViewConfiguration.java index 574137b30f1e..c91762197714 100644 --- a/core/java/android/view/ViewConfiguration.java +++ b/core/java/android/view/ViewConfiguration.java @@ -62,7 +62,7 @@ public class ViewConfiguration { * Defines the default duration in milliseconds before a press turns into * a long press */ - private static final int DEFAULT_LONG_PRESS_TIMEOUT = 500; + private static final int DEFAULT_LONG_PRESS_TIMEOUT = 250; /** * Defines the default duration in milliseconds between the first tap's up event and the second @@ -80,7 +80,7 @@ public class ViewConfiguration { * appropriate button to bring up the global actions dialog (power off, * lock screen, etc). */ - private static final int GLOBAL_ACTIONS_KEY_TIMEOUT = 500; + private static final int GLOBAL_ACTIONS_KEY_TIMEOUT = 250; /** * Defines the duration in milliseconds a user needs to hold down the @@ -101,7 +101,7 @@ public class ViewConfiguration { * is a jump tap. If the user does not complete the jump tap within this interval, it is * considered to be a tap. */ - private static final int JUMP_TAP_TIMEOUT = 500; + private static final int JUMP_TAP_TIMEOUT = 250; /** * Defines the duration in milliseconds between the first tap's up event and @@ -135,12 +135,12 @@ public class ViewConfiguration { * Defines the duration in milliseconds we want to display zoom controls in response * to a user panning within an application. */ - private static final int ZOOM_CONTROLS_TIMEOUT = 3000; + private static final int ZOOM_CONTROLS_TIMEOUT = 1500; /** * Inset in dips to look for touchable content when the user touches the edge of the screen */ - private static final int EDGE_SLOP = 12; + private static final int EDGE_SLOP = 6; /** * Distance a touch can wander before we think the user is scrolling in dips. @@ -199,7 +199,7 @@ public class ViewConfiguration { /** * Maximum velocity to initiate a fling, as measured in dips per second */ - private static final int MAXIMUM_FLING_VELOCITY = 8000; + private static final int MAXIMUM_FLING_VELOCITY = 16000; /** * Delay before dispatching a recurring accessibility event in milliseconds. @@ -219,7 +219,7 @@ public class ViewConfiguration { /** * The coefficient of friction applied to flings/scrolls. */ - private static final float SCROLL_FRICTION = 0.015f; + private static final float SCROLL_FRICTION = 0.007f; /** * Max distance in dips to overscroll for edge effects @@ -378,7 +378,7 @@ private ViewConfiguration(Context context) { case HAS_PERMANENT_MENU_KEY_AUTODETECT: { IWindowManager wm = WindowManagerGlobal.getWindowManagerService(); try { - sHasPermanentMenuKey = !wm.hasNavigationBar(); + sHasPermanentMenuKey = wm.hasPermanentMenuKey(); sHasPermanentMenuKeySet = true; } catch (RemoteException ex) { sHasPermanentMenuKey = false; diff --git a/core/java/android/view/Window.java b/core/java/android/view/Window.java index 3d6af414a3a0..06b20d42ab83 100644 --- a/core/java/android/view/Window.java +++ b/core/java/android/view/Window.java @@ -1088,6 +1088,11 @@ public void clearFlags(int flags) { setFlags(0, flags); } + /** @hide */ + public void clearPrivateFlags(int flags) { + setPrivateFlags(0, flags); + } + /** * Set the flags of the window, as per the * {@link WindowManager.LayoutParams WindowManager.LayoutParams} @@ -1115,6 +1120,10 @@ public void setFlags(int flags, int mask) { } private void setPrivateFlags(int flags, int mask) { + if ((flags & mask & WindowManager.LayoutParams.PRIVATE_FLAG_PREVENT_POWER_KEY) != 0) { + mContext.enforceCallingOrSelfPermission("android.permission.PREVENT_POWER_KEY", + "No permission to prevent power key"); + } final WindowManager.LayoutParams attrs = getAttributes(); attrs.privateFlags = (attrs.privateFlags & ~mask) | (flags & mask); dispatchWindowAttributesChanged(attrs); diff --git a/core/java/android/view/WindowManager.java b/core/java/android/view/WindowManager.java index 86402a7c6abe..90d1339fbc7f 100644 --- a/core/java/android/view/WindowManager.java +++ b/core/java/android/view/WindowManager.java @@ -1433,6 +1433,29 @@ public static boolean isSystemAlertWindowType(int type) { @RequiresPermission(permission.DEVICE_POWER) public static final int PRIVATE_FLAG_ACQUIRES_SLEEP_TOKEN = 0x00200000; + /** + * Window flag: Overrides default power key behavior + * @hide + */ + public static final int PRIVATE_FLAG_PREVENT_POWER_KEY = 0x20000000; + + /** + * {@hide} + */ + public static final int PRIVATE_FLAG_STATUS_HIDE_FORCED = 0x01000000; + + /** + * {@hide} + */ + public static final int PRIVATE_FLAG_NAV_HIDE_FORCED = 0x02000000; + + /** + * The window had not set FULLSCREEN flag so don't handle it as fullscreen in layoutWindowLw + * + * {@hide} + */ + public static final int PRIVATE_FLAG_WAS_NOT_FULLSCREEN = 0x03000000; + /** * Control flags that are private to the platform. * @hide diff --git a/core/java/android/view/WindowManagerPolicy.java b/core/java/android/view/WindowManagerPolicy.java index c4ffb4c06a26..5096e5e548df 100644 --- a/core/java/android/view/WindowManagerPolicy.java +++ b/core/java/android/view/WindowManagerPolicy.java @@ -68,6 +68,7 @@ import android.annotation.SystemApi; import android.app.ActivityManager.StackId; import android.content.Context; +import android.content.Intent; import android.content.pm.ActivityInfo; import android.content.res.CompatibilityInfo; import android.content.res.Configuration; @@ -574,6 +575,12 @@ public InputConsumer createInputConsumer(Looper looper, String name, public void reboot(boolean confirm); public void rebootSafeMode(boolean confirm); + /** + * Reboot with a custom reason. + * @hide + */ + public void reboot(boolean confirm, String reason); + /** * Return the window manager lock needed to correctly call "Lw" methods. */ @@ -616,6 +623,8 @@ public InputConsumer createInputConsumer(Looper looper, String name, * @param listener callback to call when display can be turned off */ void screenTurningOff(ScreenOffListener listener); + + void addSystemUIVisibilityFlag(int flags); } public interface PointerEventListener { @@ -1583,6 +1592,12 @@ public boolean rotationHasCompatibleMetricsLw(@ActivityInfo.ScreenOrientation in * Specifies whether there is an on-screen navigation bar separate from the status bar. */ public boolean hasNavigationBar(); + public boolean hasPermanentMenuKey(); + + /** + * Send some ActionHandler commands to WindowManager. + */ + public void sendCustomAction(Intent intent); /** * Lock the device now. diff --git a/services/core/java/com/android/server/policy/PolicyControl.java b/core/java/android/view/WindowManagerPolicyControl.java similarity index 57% rename from services/core/java/com/android/server/policy/PolicyControl.java rename to core/java/android/view/WindowManagerPolicyControl.java index dbafc424b7fd..cdba239787bd 100644 --- a/services/core/java/com/android/server/policy/PolicyControl.java +++ b/core/java/android/view/WindowManagerPolicyControl.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.server.policy; +package android.view; import android.app.ActivityManager; import android.content.Context; @@ -22,13 +22,12 @@ import android.provider.Settings; import android.util.ArraySet; import android.util.Slog; -import android.view.View; -import android.view.WindowManager; import android.view.WindowManager.LayoutParams; import android.view.WindowManagerPolicy.WindowState; import java.io.PrintWriter; import java.io.StringWriter; +import java.util.Iterator; /** * Runtime adjustments applied to the global window policy. @@ -47,8 +46,10 @@ * * Separate multiple name-value pairs with ':' * e.g. "immersive.status=apps:immersive.preconfirms=*" + * + * @hide */ -public class PolicyControl { +public class WindowManagerPolicyControl { private static String TAG = "PolicyControl"; private static boolean DEBUG = false; @@ -57,22 +58,36 @@ public class PolicyControl { private static final String NAME_IMMERSIVE_NAVIGATION = "immersive.navigation"; private static final String NAME_IMMERSIVE_PRECONFIRMATIONS = "immersive.preconfirms"; + private static int sDefaultImmersiveStyle; private static String sSettingValue; private static Filter sImmersivePreconfirmationsFilter; private static Filter sImmersiveStatusFilter; private static Filter sImmersiveNavigationFilter; + /** + * Accessible constants for Settings + */ + public final static class ImmersiveDefaultStyles { + public final static int IMMERSIVE_FULL = 0; + public final static int IMMERSIVE_STATUS = 1; + public final static int IMMERSIVE_NAVIGATION = 2; + } + public static int getSystemUiVisibility(WindowState win, LayoutParams attrs) { attrs = attrs != null ? attrs : win.getAttrs(); int vis = win != null ? win.getSystemUiVisibility() : attrs.systemUiVisibility; - if (sImmersiveStatusFilter != null && sImmersiveStatusFilter.matches(attrs)) { + if (sImmersiveStatusFilter != null && sImmersiveStatusFilter.matches(attrs) + && (sDefaultImmersiveStyle == ImmersiveDefaultStyles.IMMERSIVE_FULL || + sDefaultImmersiveStyle == ImmersiveDefaultStyles.IMMERSIVE_STATUS)) { vis |= View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY | View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN; vis &= ~(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.STATUS_BAR_TRANSLUCENT); } - if (sImmersiveNavigationFilter != null && sImmersiveNavigationFilter.matches(attrs)) { + if (sImmersiveNavigationFilter != null && sImmersiveNavigationFilter.matches(attrs) + && (sDefaultImmersiveStyle == ImmersiveDefaultStyles.IMMERSIVE_FULL || + sDefaultImmersiveStyle == ImmersiveDefaultStyles.IMMERSIVE_NAVIGATION)) { vis |= View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION; @@ -85,17 +100,71 @@ public static int getSystemUiVisibility(WindowState win, LayoutParams attrs) { public static int getWindowFlags(WindowState win, LayoutParams attrs) { attrs = attrs != null ? attrs : win.getAttrs(); int flags = attrs.flags; - if (sImmersiveStatusFilter != null && sImmersiveStatusFilter.matches(attrs)) { + + if (sImmersiveStatusFilter != null && sImmersiveStatusFilter.matches(attrs) + && (sDefaultImmersiveStyle == ImmersiveDefaultStyles.IMMERSIVE_FULL || + sDefaultImmersiveStyle == ImmersiveDefaultStyles.IMMERSIVE_STATUS)) { flags |= WindowManager.LayoutParams.FLAG_FULLSCREEN; flags &= ~(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS | WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN); } - if (sImmersiveNavigationFilter != null && sImmersiveNavigationFilter.matches(attrs)) { + if (sImmersiveNavigationFilter != null && sImmersiveNavigationFilter.matches(attrs) + && (sDefaultImmersiveStyle == ImmersiveDefaultStyles.IMMERSIVE_FULL || + sDefaultImmersiveStyle == ImmersiveDefaultStyles.IMMERSIVE_NAVIGATION)) { flags &= ~WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION; } return flags; } + public static int getPrivateWindowFlags(WindowState win, LayoutParams attrs) { + attrs = attrs != null ? attrs : win.getAttrs(); + int privateFlags = attrs.privateFlags; + + if (sImmersiveStatusFilter != null && sImmersiveNavigationFilter != null && + sImmersiveStatusFilter.isEnabledForAll() + && sImmersiveNavigationFilter.isEnabledForAll()) { + + if ((attrs.flags & LayoutParams.FLAG_FULLSCREEN) == 0) { + privateFlags |= LayoutParams.PRIVATE_FLAG_WAS_NOT_FULLSCREEN; + } + + switch (sDefaultImmersiveStyle) { + case ImmersiveDefaultStyles.IMMERSIVE_FULL: + privateFlags |= LayoutParams.PRIVATE_FLAG_NAV_HIDE_FORCED; + privateFlags |= LayoutParams.PRIVATE_FLAG_STATUS_HIDE_FORCED; + return privateFlags; + case ImmersiveDefaultStyles.IMMERSIVE_STATUS: + privateFlags |= LayoutParams.PRIVATE_FLAG_STATUS_HIDE_FORCED; + return privateFlags; + case ImmersiveDefaultStyles.IMMERSIVE_NAVIGATION: + privateFlags |= LayoutParams.PRIVATE_FLAG_NAV_HIDE_FORCED; + return privateFlags; + } + } + + if (sImmersiveStatusFilter != null && sImmersiveStatusFilter.matches(attrs)) { + if ((attrs.flags & LayoutParams.FLAG_FULLSCREEN) == 0) { + privateFlags |= LayoutParams.PRIVATE_FLAG_WAS_NOT_FULLSCREEN; + } + privateFlags |= LayoutParams.PRIVATE_FLAG_STATUS_HIDE_FORCED; + } + + if (sImmersiveNavigationFilter != null && sImmersiveNavigationFilter.matches(attrs)) { + privateFlags |= LayoutParams.PRIVATE_FLAG_NAV_HIDE_FORCED; + } + + return privateFlags; + } + + public static boolean immersiveStatusFilterMatches(String packageName) { + return sImmersiveStatusFilter != null && sImmersiveStatusFilter.matches(packageName); + } + + public static boolean immersiveNavigationFilterMatches(String packageName) { + return sImmersiveNavigationFilter != null + && sImmersiveNavigationFilter.matches(packageName); + } + public static int adjustClearableFlags(WindowState win, int clearableFlags) { final LayoutParams attrs = win != null ? win.getAttrs() : null; if (sImmersiveStatusFilter != null && sImmersiveStatusFilter.matches(attrs)) { @@ -111,11 +180,16 @@ public static boolean disableImmersiveConfirmation(String pkg) { } public static void reloadFromSetting(Context context) { + reloadStyleFromSetting(context, Settings.Global.POLICY_CONTROL_STYLE); + reloadFromSetting(context, Settings.Global.POLICY_CONTROL); + } + + public static void reloadFromSetting(Context context, String key) { if (DEBUG) Slog.d(TAG, "reloadFromSetting()"); String value = null; try { value = Settings.Global.getStringForUser(context.getContentResolver(), - Settings.Global.POLICY_CONTROL, + key, UserHandle.USER_CURRENT); if (sSettingValue != null && sSettingValue.equals(value)) return; setFilters(value); @@ -125,6 +199,121 @@ public static void reloadFromSetting(Context context) { } } + public static void reloadStyleFromSetting(Context context, String key) { + sDefaultImmersiveStyle = Settings.Global.getInt(context.getContentResolver(), + key, WindowManagerPolicyControl.ImmersiveDefaultStyles.IMMERSIVE_FULL); + if (DEBUG) Slog.d(TAG, "reloadStyleFromSetting " + sDefaultImmersiveStyle); + } + + public static void saveToSettings(Context context) { + saveToSettings(context, Settings.Global.POLICY_CONTROL); + } + + public static void saveToSettings(Context context, String key) { + StringBuilder value = new StringBuilder(); + boolean needSemicolon = false; + if (sImmersiveStatusFilter != null) { + writeFilter(NAME_IMMERSIVE_STATUS, sImmersiveStatusFilter, value); + needSemicolon = true; + } + if (sImmersiveNavigationFilter != null) { + if (needSemicolon) { + value.append(":"); + } + writeFilter(NAME_IMMERSIVE_NAVIGATION, sImmersiveNavigationFilter, value); + } + + Settings.Global.putString(context.getContentResolver(), key, value.toString()); + } + + public static void saveStyleToSettings(Context context, int value) { + Settings.Global.putInt(context.getContentResolver(), + Settings.Global.POLICY_CONTROL_STYLE, value); + sDefaultImmersiveStyle = value; + } + + public static void addToStatusWhiteList(String packageName) { + if (sImmersiveStatusFilter == null) { + sImmersiveStatusFilter = new Filter(new ArraySet(), new ArraySet()); + } + + if (!sImmersiveStatusFilter.mWhitelist.contains(packageName)) { + sImmersiveStatusFilter.mWhitelist.add(packageName); + } + } + + public static void addToNavigationWhiteList(String packageName) { + if (sImmersiveNavigationFilter == null) { + sImmersiveNavigationFilter = new Filter(new ArraySet(), new ArraySet()); + } + + if (!sImmersiveNavigationFilter.mWhitelist.contains(packageName)) { + sImmersiveNavigationFilter.mWhitelist.add(packageName); + } + } + + public static void removeFromWhiteLists(String packageName) { + if (sImmersiveStatusFilter != null) { + sImmersiveStatusFilter.mWhitelist.remove(packageName); + } + if (sImmersiveNavigationFilter != null) { + sImmersiveNavigationFilter.mWhitelist.remove(packageName); + } + } + + public static ArraySet getWhiteLists() { + ArraySet result = new ArraySet<>(); + + if (sImmersiveStatusFilter != null) { + result.addAll(sImmersiveStatusFilter.mWhitelist); + } + if (sImmersiveNavigationFilter != null + && sImmersiveNavigationFilter != sImmersiveStatusFilter) { + result.addAll(sImmersiveNavigationFilter.mWhitelist); + } + + return result; + } + + private static void writeFilter(String name, Filter filter, StringBuilder stringBuilder) { + if (filter.mWhitelist.isEmpty() && filter.mBlacklist.isEmpty()) { + return; + } + stringBuilder.append(name); + stringBuilder.append("="); + + boolean needComma = false; + if (!filter.mWhitelist.isEmpty()) { + writePackages(filter.mWhitelist, stringBuilder, false); + needComma = true; + } + if (!filter.mBlacklist.isEmpty()) { + if (needComma) { + stringBuilder.append(","); + } + writePackages(filter.mBlacklist, stringBuilder, true); + } + } + + private static void writePackages(ArraySet set, StringBuilder stringBuilder, + boolean isBlackList) { + Iterator iterator = set.iterator(); + while (iterator.hasNext()) { + if (isBlackList) { + stringBuilder.append("-"); + } + String name = iterator.next(); + stringBuilder.append(name); + if (iterator.hasNext()) { + stringBuilder.append(","); + } + } + } + + public static boolean isImmersiveFiltersActive() { + return sImmersiveStatusFilter != null || sImmersiveNavigationFilter != null; + } + public static void dump(String prefix, PrintWriter pw) { dump("sImmersiveStatusFilter", sImmersiveStatusFilter, prefix, pw); dump("sImmersiveNavigationFilter", sImmersiveNavigationFilter, prefix, pw); @@ -206,6 +395,10 @@ boolean matches(String packageName) { return !onBlacklist(packageName) && onWhitelist(packageName); } + public boolean isEnabledForAll() { + return mWhitelist.contains(ALL); + } + private boolean onBlacklist(String packageName) { return mBlacklist.contains(packageName) || mBlacklist.contains(ALL); } diff --git a/core/java/android/webkit/WebChromeClient.java b/core/java/android/webkit/WebChromeClient.java index 70a49fb45e2c..b6c453da9c5f 100644 --- a/core/java/android/webkit/WebChromeClient.java +++ b/core/java/android/webkit/WebChromeClient.java @@ -57,6 +57,15 @@ public void onReceivedIcon(WebView view, Bitmap icon) {} public void onReceivedTouchIconUrl(WebView view, String url, boolean precomposed) {} + /** + * Notify the host application of a new theme color. + * @param view The WebView that initiated the callback. + * @param color The newly set theme color, which may be partially transparent. + * A value of Color.TRANSPARENT denotes no theme color being set. + * @hide + */ + public void onThemeColorChanged(WebView view, int color) {} + /** * A callback interface used by the host application to notify * the current page that its custom view has been dismissed. diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index 637b60e2dcb4..205d9926f21b 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -27,6 +27,7 @@ import android.content.res.Configuration; import android.graphics.Bitmap; import android.graphics.Canvas; +import android.graphics.Color; import android.graphics.Paint; import android.graphics.Picture; import android.graphics.Rect; @@ -67,6 +68,8 @@ import java.io.File; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; import java.util.List; import java.util.Map; @@ -354,6 +357,8 @@ public class WebView extends AbsoluteLayout // set in the WebView constructor. private static volatile boolean sEnforceThreadChecking = false; + private Method mGetThemeColorMethod; + /** * Transportation object for returning WebView across thread boundaries. */ @@ -655,6 +660,13 @@ protected WebView(Context context, AttributeSet attrs, int defStyleAttr, int def checkThread(); ensureProviderCreated(); + + try { + mGetThemeColorMethod = mProvider.getClass().getMethod("getThemeColor"); + } catch (Exception e) { + // ignored, no theme color support + } + mProvider.init(javaScriptInterfaces, privateBrowsing); // Post condition of creating a webview is the CookieSyncManager.getInstance() is allowed. CookieSyncManager.setGetInstanceIsAllowed(); @@ -1489,6 +1501,37 @@ public int getProgress() { return mProvider.getProgress(); } + /** + * Checks whether the WebView implementation has support for fetching + * the theme color set by the page. + * + * @return true if the WebView supports the getThemeColor() method + * @hide + */ + public boolean isThemeColorSupported() { + return mGetThemeColorMethod != null; + } + + /** + * Gets the theme color set by the page. + * + * The returned color may not be fully opaque. If the page didn't set + * any theme color, Color.TRANSPARENT is returned. + * + * @return theme color set by the page + * @hide + */ + public int getThemeColor() { + if (mGetThemeColorMethod != null) { + try { + return (Integer) mGetThemeColorMethod.invoke(mProvider); + } catch (IllegalAccessException | InvocationTargetException e) { + // ignored, fall back to returning transparent + } + } + return Color.TRANSPARENT; + } + /** * Gets the height of the HTML content. * diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java index 91e2f7d4ddd0..af02a1b03fab 100644 --- a/core/java/android/widget/AbsListView.java +++ b/core/java/android/widget/AbsListView.java @@ -627,6 +627,7 @@ public abstract class AbsListView extends AdapterView implements Te Runnable mPositionScrollAfterLayout; private int mMinimumVelocity; private int mMaximumVelocity; + private int mDecacheThreshold; private float mVelocityScale = 1.0f; final boolean[] mIsScrap = new boolean[1]; @@ -880,6 +881,7 @@ private void initAbsListView() { mVerticalScrollFactor = configuration.getScaledVerticalScrollFactor(); mMinimumVelocity = configuration.getScaledMinimumFlingVelocity(); mMaximumVelocity = configuration.getScaledMaximumFlingVelocity(); + mDecacheThreshold = mMaximumVelocity / 2; mOverscrollDistance = configuration.getScaledOverscrollDistance(); mOverflingDistance = configuration.getScaledOverflingDistance(); @@ -4595,7 +4597,7 @@ public void run() { // Keep the fling alive a little longer postDelayed(this, FLYWHEEL_TIMEOUT); } else { - endFling(); + endFling(false); // Don't disable the scrolling cache right after it was enabled mTouchMode = TOUCH_MODE_SCROLL; reportScrollStateChange(OnScrollListener.SCROLL_STATE_TOUCH_SCROLL); } @@ -4606,9 +4608,15 @@ public void run() { FlingRunnable() { mScroller = new OverScroller(getContext()); + mScroller.setFriction(0.006f); } void start(int initialVelocity) { + if (Math.abs(initialVelocity) > mDecacheThreshold) { + // For long flings, scrolling cache causes stutter, so don't use it + clearScrollingCache(); + } + int initialY = initialVelocity < 0 ? Integer.MAX_VALUE : 0; mLastFlingY = initialY; mScroller.setInterpolator(null); @@ -4686,6 +4694,10 @@ void startScroll(int distance, int duration, boolean linear, } void endFling() { + endFling(true); + } + + void endFling(boolean clearCache) { mTouchMode = TOUCH_MODE_REST; removeCallbacks(this); @@ -4694,7 +4706,8 @@ void endFling() { if (!mSuppressIdleStateChangeCall) { reportScrollStateChange(OnScrollListener.SCROLL_STATE_IDLE); } - clearScrollingCache(); + if (clearCache) + clearScrollingCache(); mScroller.abortAnimation(); if (mFlingStrictSpan != null) { diff --git a/core/java/android/widget/AbsSeekBar.java b/core/java/android/widget/AbsSeekBar.java index 1d1fcc969b56..4fa0912ed661 100644 --- a/core/java/android/widget/AbsSeekBar.java +++ b/core/java/android/widget/AbsSeekBar.java @@ -866,7 +866,15 @@ private void trackTouchEvent(MotionEvent event) { progress += scale * range; setHotspot(x, y); - setProgressInternal(Math.round(progress), true, false); + setProgressInternal(updateTouchProgress(getProgress(), + Math.round(progress)), true, false); + } + + /** + * @hide + */ + protected int updateTouchProgress(int lastProgress, int newProgress) { + return newProgress; } /** diff --git a/core/java/android/widget/ImageSwitcher.java b/core/java/android/widget/ImageSwitcher.java index 112fcc313366..d8f9953f37f7 100644 --- a/core/java/android/widget/ImageSwitcher.java +++ b/core/java/android/widget/ImageSwitcher.java @@ -94,10 +94,27 @@ public void setImageURI(Uri uri) public void setImageDrawable(Drawable drawable) { ImageView image = (ImageView)this.getNextView(); + image.setImageTintList(null); image.setImageDrawable(drawable); showNext(); } + /** + * @hide + */ + public void setImageDrawableTint(Drawable drawable, int tint, boolean isGrayscale) + { + ImageView image = (ImageView)this.getNextView(); + if (isGrayscale) { + drawable.setTint(tint); + image.setImageDrawable(drawable); + } else { + image.setImageDrawable(drawable); + image.setImageTintList(null); + } + showNext(); + } + @Override public CharSequence getAccessibilityClassName() { return ImageSwitcher.class.getName(); diff --git a/core/java/android/widget/OverScroller.java b/core/java/android/widget/OverScroller.java index 99387896913a..8b4d22d3b9e0 100644 --- a/core/java/android/widget/OverScroller.java +++ b/core/java/android/widget/OverScroller.java @@ -22,6 +22,7 @@ import android.view.ViewConfiguration; import android.view.animation.AnimationUtils; import android.view.animation.Interpolator; +import android.util.BoostFramework; /** * This class encapsulates scrolling with the ability to overshoot the bounds @@ -601,6 +602,18 @@ static class SplineOverScroller { private static final int CUBIC = 1; private static final int BALLISTIC = 2; + /* + * Perf boost related variables + * Enabled/Disabled using config_enableCpuBoostForOverScrollerFling + * true value turns it on, by default will be turned off + */ + private BoostFramework mPerf = null; + private boolean mIsPerfLockAcquired = false; + private boolean mIsPerfBoostEnabled = false; + private int fBoostTimeOut = 0; + private int flingBoostTimeOut = 0; + private int fBoostParamVal[]; + static { float x_min = 0.0f; float y_min = 0.0f; @@ -645,6 +658,19 @@ void setFriction(float friction) { * 39.37f // inch/meter * ppi * 0.84f; // look and feel tuning + + mIsPerfBoostEnabled = context.getResources().getBoolean( + com.android.internal.R.bool.config_enableCpuBoostForOverScrollerFling); + if (mIsPerfBoostEnabled) { + fBoostTimeOut = context.getResources().getInteger( + com.android.internal.R.integer.flingboost_timeout_param); + fBoostParamVal = context.getResources().getIntArray( + com.android.internal.R.array.flingboost_param_value); + } + + if (mPerf == null && mIsPerfBoostEnabled) { + mPerf = new BoostFramework(); + } } void updateScroll(float q) { @@ -692,6 +718,11 @@ void startScroll(int start, int distance, int duration) { } void finish() { + if (mIsPerfLockAcquired && mPerf != null) { + mPerf.perfLockRelease(); + mIsPerfLockAcquired = false; + } + mCurrentPosition = mFinal; // Not reset since WebView relies on this value for fast fling. // TODO: restore when WebView uses the fast fling implemented in this class. @@ -751,6 +782,11 @@ void fling(int start, int velocity, int min, int max, int over) { mStartTime = AnimationUtils.currentAnimationTimeMillis(); mCurrentPosition = mStart = start; + if (mIsPerfLockAcquired && mPerf != null) { + mPerf.perfLockRelease(); + mIsPerfLockAcquired = false; + } + if (start > max || start < min) { startAfterEdge(start, min, max, velocity); return; @@ -915,6 +951,18 @@ boolean update() { return false; } + if (mPerf != null && !mIsPerfLockAcquired) { + mIsPerfLockAcquired = true; + if (0 == fBoostTimeOut) { + //config value is not defined + flingBoostTimeOut = mDuration; + } else { + //config value is present + flingBoostTimeOut = fBoostTimeOut; + } + mPerf.perfLockAcquire(flingBoostTimeOut, fBoostParamVal); + } + double distance = 0.0; switch (mState) { case SPLINE: { diff --git a/core/java/android/widget/ScrollView.java b/core/java/android/widget/ScrollView.java index 97d32f1266af..11f46de0dafa 100644 --- a/core/java/android/widget/ScrollView.java +++ b/core/java/android/widget/ScrollView.java @@ -84,7 +84,7 @@ public class ScrollView extends FrameLayout { private long mLastScroll; private final Rect mTempRect = new Rect(); - private OverScroller mScroller; + private static OverScroller mScroller; private EdgeEffect mEdgeGlowTop; private EdgeEffect mEdgeGlowBottom; @@ -116,7 +116,7 @@ public class ScrollView extends FrameLayout { /** * Determines speed during touch scrolling */ - private VelocityTracker mVelocityTracker; + private static VelocityTracker mVelocityTracker; /** * When set to true, the scroll view measure its child to make it fill the currently @@ -189,7 +189,6 @@ public ScrollView(Context context, AttributeSet attrs, int defStyleAttr, int def attrs, com.android.internal.R.styleable.ScrollView, defStyleAttr, defStyleRes); setFillViewport(a.getBoolean(R.styleable.ScrollView_fillViewport, false)); - a.recycle(); if (context.getResources().getConfiguration().uiMode == Configuration.UI_MODE_TYPE_WATCH) { @@ -243,6 +242,7 @@ public int getMaxScrollAmount() { private void initScrollView() { mScroller = new OverScroller(getContext()); + mScroller.setFriction(0.006f); setFocusable(true); setDescendantFocusability(FOCUS_AFTER_DESCENDANTS); setWillNotDraw(false); @@ -465,7 +465,7 @@ private void initVelocityTrackerIfNotExists() { } } - private void recycleVelocityTracker() { + private static void recycleVelocityTracker() { if (mVelocityTracker != null) { mVelocityTracker.recycle(); mVelocityTracker = null; diff --git a/core/java/android/widget/Scroller.java b/core/java/android/widget/Scroller.java index 357c9c36936b..d0ba9e68a63f 100644 --- a/core/java/android/widget/Scroller.java +++ b/core/java/android/widget/Scroller.java @@ -22,6 +22,7 @@ import android.view.ViewConfiguration; import android.view.animation.AnimationUtils; import android.view.animation.Interpolator; +import android.util.BoostFramework; /** @@ -108,6 +109,17 @@ public class Scroller { private float mDeceleration; private final float mPpi; + /* + * Perf boost related variables + * Enabled/Disabled using config_enableCpuBoostForScroller + * true value turns it on, by default will be turned off + */ + private BoostFramework mPerf = null; + boolean bIsPerfBoostEnabled = false; + private int sBoostTimeOut = 0; + private int scrollBoostTimeOut = 0; + private int sBoostParamVal[]; + // A context-specific coefficient adjusted to physical values. private float mPhysicalCoeff; @@ -167,6 +179,7 @@ public Scroller(Context context, Interpolator interpolator) { * not to support progressive "flywheel" behavior in flinging. */ public Scroller(Context context, Interpolator interpolator, boolean flywheel) { + boolean bIsPerfBoostEnabled = false; mFinished = true; if (interpolator == null) { mInterpolator = new ViscousFluidInterpolator(); @@ -178,6 +191,18 @@ public Scroller(Context context, Interpolator interpolator, boolean flywheel) { mFlywheel = flywheel; mPhysicalCoeff = computeDeceleration(0.84f); // look and feel tuning + bIsPerfBoostEnabled = context.getResources().getBoolean( + com.android.internal.R.bool.config_enableCpuBoostForScroller); + if (bIsPerfBoostEnabled) { + sBoostTimeOut = context.getResources().getInteger( + com.android.internal.R.integer.scrollboost_timeout_param); + sBoostParamVal = context.getResources().getIntArray( + com.android.internal.R.array.scrollboost_param_value); + } + if (mPerf == null && bIsPerfBoostEnabled) { + mPerf = new BoostFramework(); + } + } /** @@ -395,6 +420,17 @@ public void startScroll(int startX, int startY, int dx, int dy, int duration) { mDeltaX = dx; mDeltaY = dy; mDurationReciprocal = 1.0f / (float) mDuration; + + if ((mPerf != null) && (duration != 0)) { + if (0 == sBoostTimeOut) { + //config value is not defined + scrollBoostTimeOut = mDuration; + } else { + //config value is present + scrollBoostTimeOut = sBoostTimeOut; + } + mPerf.perfLockAcquire(scrollBoostTimeOut, sBoostParamVal); + } } /** diff --git a/core/java/android/widget/TextSwitcher.java b/core/java/android/widget/TextSwitcher.java index ecd9a8cfb3d1..123ca7a1c368 100644 --- a/core/java/android/widget/TextSwitcher.java +++ b/core/java/android/widget/TextSwitcher.java @@ -93,4 +93,13 @@ public void setCurrentText(CharSequence text) { public CharSequence getAccessibilityClassName() { return TextSwitcher.class.getName(); } + + /** + * Sets the color of the text view that is currently showing. + * @hide + * @param color the text color to display + */ + public void setTextColor(int color) { + ((TextView)getCurrentView()).setTextColor(color); + } } diff --git a/core/java/android/widget/Toast.java b/core/java/android/widget/Toast.java index d80712006a53..e4483c4f598c 100644 --- a/core/java/android/widget/Toast.java +++ b/core/java/android/widget/Toast.java @@ -23,15 +23,18 @@ import android.app.INotificationManager; import android.app.ITransientNotification; import android.content.Context; +import android.content.pm.PackageManager; import android.content.res.Configuration; import android.content.res.Resources; import android.graphics.PixelFormat; +import android.graphics.drawable.Drawable; import android.os.Handler; import android.os.IBinder; import android.os.Looper; import android.os.Message; import android.os.RemoteException; import android.os.ServiceManager; +import android.provider.Settings; import android.util.Log; import android.view.Gravity; import android.view.LayoutInflater; @@ -463,6 +466,21 @@ public void handleShow(IBinder windowToken) { if (context == null) { context = mView.getContext(); } + + ImageView appIcon = (ImageView) mView.findViewById(android.R.id.icon); + if ((Settings.System.getInt(context.getContentResolver(), + Settings.System.TOAST_ICON, 1) == 1)) { + if (appIcon != null) { + PackageManager pm = context.getPackageManager(); + Drawable icon = null; + try { + icon = pm.getApplicationIcon(packageName); + } catch (PackageManager.NameNotFoundException e) { + // nothing to do + } + appIcon.setImageDrawable(icon); + } + } mWM = (WindowManager)context.getSystemService(Context.WINDOW_SERVICE); // We can resolve the Gravity here by using the Locale for getting // the layout direction diff --git a/core/java/com/android/internal/app/IBatteryStats.aidl b/core/java/com/android/internal/app/IBatteryStats.aidl index 4275e0b43a4e..4a1e4aadf963 100644 --- a/core/java/com/android/internal/app/IBatteryStats.aidl +++ b/core/java/com/android/internal/app/IBatteryStats.aidl @@ -140,4 +140,7 @@ interface IBatteryStats { oneway void noteBluetoothControllerActivity(in BluetoothActivityEnergyInfo info); oneway void noteModemControllerActivity(in ModemActivityInfo info); oneway void noteWifiControllerActivity(in WifiActivityEnergyInfo info); + + /** @hide **/ + void resetStatistics(); } diff --git a/core/java/com/android/internal/notification/SystemNotificationChannels.java b/core/java/com/android/internal/notification/SystemNotificationChannels.java index d64c9a1d813b..629cb76af9f0 100644 --- a/core/java/com/android/internal/notification/SystemNotificationChannels.java +++ b/core/java/com/android/internal/notification/SystemNotificationChannels.java @@ -135,7 +135,7 @@ public static void createAll(Context context) { NotificationChannel foregroundChannel = new NotificationChannel( FOREGROUND_SERVICE, context.getString(R.string.notification_channel_foreground_service), - NotificationManager.IMPORTANCE_LOW); + NotificationManager.IMPORTANCE_NONE); foregroundChannel.setBlockableSystem(true); channelsList.add(foregroundChannel); diff --git a/core/java/com/android/internal/os/BatteryStatsHelper.java b/core/java/com/android/internal/os/BatteryStatsHelper.java index f085e290222f..ddcd6c778006 100644 --- a/core/java/com/android/internal/os/BatteryStatsHelper.java +++ b/core/java/com/android/internal/os/BatteryStatsHelper.java @@ -249,6 +249,16 @@ public void clearStats() { mStats = null; } + private void clearAllStats() { + clearStats(); + sStatsXfer = null; + sBatteryBroadcastXfer = null; + for (File f : sFileXfer.keySet()) { + f.delete(); + } + sFileXfer.clear(); + } + public BatteryStats getStats() { if (mStats == null) { load(); @@ -1000,6 +1010,15 @@ private void load() { } } + public void resetStatistics() { + try { + clearAllStats(); + mBatteryInfo.resetStatistics(); + } catch (RemoteException e) { + Log.e(TAG, "RemoteException:", e); + } + } + private static BatteryStatsImpl getStats(IBatteryStats service) { try { ParcelFileDescriptor pfd = service.getStatisticsStream(); diff --git a/core/java/com/android/internal/os/DeviceKeyHandler.java b/core/java/com/android/internal/os/DeviceKeyHandler.java new file mode 100644 index 000000000000..8902337f3ebb --- /dev/null +++ b/core/java/com/android/internal/os/DeviceKeyHandler.java @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2012 The CyanogenMod 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.os; + +import android.view.KeyEvent; + +public interface DeviceKeyHandler { + + /** + * Invoked when an unknown key was detected by the system, letting the device handle + * this special keys prior to pass the key to the active app. + * + * @param event The key event to be handled + * @return null if event is consumed, KeyEvent to be handled otherwise + */ + public KeyEvent handleKeyEvent(KeyEvent event); +} diff --git a/core/java/com/android/internal/os/KernelWakelockReader.java b/core/java/com/android/internal/os/KernelWakelockReader.java index 7178ec7af20b..b4fadbb0e71f 100644 --- a/core/java/com/android/internal/os/KernelWakelockReader.java +++ b/core/java/com/android/internal/os/KernelWakelockReader.java @@ -79,8 +79,8 @@ public final KernelWakelockStats readKernelWakelockStats(KernelWakelockStats sta is = new FileInputStream(sWakeupSourceFile); wakeup_sources = true; } catch (java.io.FileNotFoundException e2) { - Slog.wtf(TAG, "neither " + sWakelockFile + " nor " + - sWakeupSourceFile + " exists"); + Slog.w(TAG, "neither " + sWakelockFile + " nor " + + sWakeupSourceFile + " exists, ignoring."); return null; } } @@ -88,7 +88,7 @@ public final KernelWakelockStats readKernelWakelockStats(KernelWakelockStats sta len = is.read(buffer); is.close(); } catch (java.io.IOException e) { - Slog.wtf(TAG, "failed to read kernel wakelocks", e); + Slog.w(TAG, "failed to read kernel wakelocks", e); return null; } @@ -99,7 +99,7 @@ public final KernelWakelockStats readKernelWakelockStats(KernelWakelockStats sta if (len > 0) { if (len >= buffer.length) { - Slog.wtf(TAG, "Kernel wake locks exceeded buffer size " + buffer.length); + Slog.w(TAG, "Kernel wake locks exceeded buffer size " + buffer.length); } int i; for (i=0; i 0) { + Slog.i(TAG, "getPowerProfileResId: using power profile \"" + + powerProfileOverride + "\""); + id = tmpId; + } else { + Slog.e(TAG, "getPowerProfileResId: could not retrieve power profile \"" + + powerProfileOverride + "\", using default instead"); + } + } + return id; + } + /** * Returns the number of memory bandwidth buckets defined in power_profile.xml, or a * default value if the subsystem has no recorded value. diff --git a/core/java/com/android/internal/os/RuntimeInit.java b/core/java/com/android/internal/os/RuntimeInit.java index 66475e445efa..d6d07f0d964c 100644 --- a/core/java/com/android/internal/os/RuntimeInit.java +++ b/core/java/com/android/internal/os/RuntimeInit.java @@ -143,6 +143,8 @@ protected static final void commonInit() { Thread.setUncaughtExceptionPreHandler(new LoggingHandler()); Thread.setDefaultUncaughtExceptionHandler(new KillApplicationHandler()); + Build.adjustBuildTypeIfNeeded(); + /* * Install a TimezoneGetter subclass for ZoneInfo.db */ diff --git a/core/java/com/android/internal/policy/DecorView.java b/core/java/com/android/internal/policy/DecorView.java index 4e06577e3588..0b02b9130cb8 100644 --- a/core/java/com/android/internal/policy/DecorView.java +++ b/core/java/com/android/internal/policy/DecorView.java @@ -55,6 +55,7 @@ import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.os.RemoteException; +import android.provider.Settings; import android.util.DisplayMetrics; import android.util.Log; import android.util.TypedValue; @@ -1341,6 +1342,8 @@ private void updateColorViewTranslations() { private WindowInsets updateStatusGuard(WindowInsets insets) { boolean showStatusGuard = false; + boolean isDynamic = Settings.System.getInt(mContext.getContentResolver(), + Settings.System.NAVBAR_DYNAMIC, 0) == 1; // Show the status guard when the non-overlay contextual action bar is showing if (mPrimaryActionModeView != null) { if (mPrimaryActionModeView.getLayoutParams() instanceof MarginLayoutParams) { @@ -1364,8 +1367,13 @@ private WindowInsets updateStatusGuard(WindowInsets insets) { if (mStatusGuard == null) { mStatusGuard = new View(mContext); - mStatusGuard.setBackgroundColor(mContext.getColor( - R.color.input_method_navigation_guard)); + if (!isDynamic) { + mStatusGuard.setBackgroundColor(mContext.getColor( + R.color.input_method_navigation_guard)); + } else { + mStatusGuard.setBackgroundColor(mContext.getColor( + R.color.input_method_navigation_guard_dynamic)); + } addView(mStatusGuard, indexOfChild(mStatusColorViewState.view), new LayoutParams(LayoutParams.MATCH_PARENT, mlp.topMargin, Gravity.START | Gravity.TOP)); @@ -1410,6 +1418,8 @@ private WindowInsets updateStatusGuard(WindowInsets insets) { } private WindowInsets updateNavigationGuard(WindowInsets insets) { + boolean isDynamic = Settings.System.getInt(mContext.getContentResolver(), + Settings.System.NAVBAR_DYNAMIC, 0) == 1; // IME windows lay out below the nav bar, but the content view must not (for back compat) // Only make this adjustment if the window is not requesting layout in overscan if (mWindow.getAttributes().type == WindowManager.LayoutParams.TYPE_INPUT_METHOD @@ -1426,8 +1436,13 @@ private WindowInsets updateNavigationGuard(WindowInsets insets) { // position the navigation guard view, creating it if necessary if (mNavigationGuard == null) { mNavigationGuard = new View(mContext); - mNavigationGuard.setBackgroundColor(mContext.getColor( - R.color.input_method_navigation_guard)); + if (!isDynamic) { + mNavigationGuard.setBackgroundColor(mContext.getColor( + R.color.input_method_navigation_guard)); + } else { + mNavigationGuard.setBackgroundColor(mContext.getColor( + R.color.input_method_navigation_guard_dynamic)); + } addView(mNavigationGuard, indexOfChild(mNavigationColorViewState.view), new LayoutParams(LayoutParams.MATCH_PARENT, insets.getSystemWindowInsetBottom(), diff --git a/core/java/com/android/internal/policy/PhoneWindow.java b/core/java/com/android/internal/policy/PhoneWindow.java index b13560c10326..30f4ce06a4b2 100644 --- a/core/java/com/android/internal/policy/PhoneWindow.java +++ b/core/java/com/android/internal/policy/PhoneWindow.java @@ -40,6 +40,7 @@ import android.view.MenuItem; import android.view.MotionEvent; import android.view.SearchEvent; +import android.view.Surface; import android.view.SurfaceHolder.Callback2; import android.view.View; import android.view.ViewConfiguration; @@ -1885,6 +1886,18 @@ protected boolean onKeyDown(int featureId, int keyCode, KeyEvent event) { direction = AudioManager.ADJUST_TOGGLE_MUTE; break; } + final int rotation = getWindowManager().getDefaultDisplay().getRotation(); + final Configuration config = getContext().getResources().getConfiguration(); + final boolean swapKeys = Settings.System.getInt(getContext().getContentResolver(), + Settings.System.SWAP_VOLUME_BUTTONS, 0) == 1; + + if (swapKeys + && (rotation == Surface.ROTATION_90 || rotation == Surface.ROTATION_180) + && config.getLayoutDirection() == View.LAYOUT_DIRECTION_LTR) { + direction = keyCode == KeyEvent.KEYCODE_VOLUME_UP + ? AudioManager.ADJUST_LOWER + : AudioManager.ADJUST_RAISE; + } mMediaController.adjustVolume(direction, AudioManager.FLAG_SHOW_UI); } else { MediaSessionLegacyHelper.getHelper(getContext()).sendVolumeKeyEvent( @@ -2432,9 +2445,17 @@ protected ViewGroup generateLayout(DecorView decor) { mStatusBarColor = a.getColor(R.styleable.Window_statusBarColor, 0xFF000000); } if (!mForcedNavigationBarColor) { - mNavigationBarColor = a.getColor(R.styleable.Window_navigationBarColor, 0xFF000000); - mNavigationBarDividerColor = a.getColor(R.styleable.Window_navigationBarDividerColor, - 0x00000000); + boolean isDynamic = Settings.System.getInt(getContext().getContentResolver(), + Settings.System.NAVBAR_DYNAMIC, 0) == 1; + if (!isDynamic) { + mNavigationBarColor = a.getColor(R.styleable.Window_navigationBarColor, 0xFF000000); + mNavigationBarDividerColor = a.getColor(R.styleable.Window_navigationBarDividerColor, + 0x00000000); + } else { + mNavigationBarColor = a.getColor(R.styleable.Window_navigationBarColordynamic, 0x00000000); + mNavigationBarDividerColor = a.getColor(R.styleable.Window_navigationBarColordynamic, + 0x00000000); + } } WindowManager.LayoutParams params = getAttributes(); diff --git a/core/java/com/android/internal/statusbar/IStatusBar.aidl b/core/java/com/android/internal/statusbar/IStatusBar.aidl index bab0306aaf9f..17cc210d52ff 100644 --- a/core/java/com/android/internal/statusbar/IStatusBar.aidl +++ b/core/java/com/android/internal/statusbar/IStatusBar.aidl @@ -17,6 +17,7 @@ package com.android.internal.statusbar; import android.content.ComponentName; +import android.content.Intent; import android.graphics.Rect; import android.os.Bundle; import android.service.notification.StatusBarNotification; @@ -94,6 +95,11 @@ oneway interface IStatusBar void showAssistDisclosure(); void startAssist(in Bundle args); + void screenPinningStateChanged(boolean enabled); + void leftInLandscapeChanged(boolean isLeft); + void toggleFlashlight(); + void toggleNavigationEditor(); + void dispatchNavigationEditorResults(in Intent intent); /** * Notifies the status bar that a camera launch gesture has been detected. @@ -124,5 +130,10 @@ oneway interface IStatusBar void clickQsTile(in ComponentName tile); void handleSystemKey(in int key); - void showShutdownUi(boolean isReboot, String reason); + void showShutdownUi(boolean isReboot, String reason, boolean rebootCustom); + + /** + * FireHound + */ + void toggleCameraFlash(); } diff --git a/core/java/com/android/internal/statusbar/IStatusBarService.aidl b/core/java/com/android/internal/statusbar/IStatusBarService.aidl index 82eb1abcba4d..5fbcbf62441d 100644 --- a/core/java/com/android/internal/statusbar/IStatusBarService.aidl +++ b/core/java/com/android/internal/statusbar/IStatusBarService.aidl @@ -17,6 +17,7 @@ package com.android.internal.statusbar; import android.content.ComponentName; +import android.content.Intent; import android.graphics.Rect; import android.os.Bundle; import android.service.notification.StatusBarNotification; @@ -71,10 +72,26 @@ interface IStatusBarService * These methods are needed for global actions control which the UI is shown in sysui. */ void shutdown(); - void reboot(boolean safeMode); + void reboot(boolean safeMode, String reason); void addTile(in ComponentName tile); void remTile(in ComponentName tile); void clickTile(in ComponentName tile); void handleSystemKey(in int key); + + /** + * FireHound + */ + void toggleCameraFlash(); + // Start DU methods + void toggleRecentApps(); + void toggleSplitScreen(); + void preloadRecentApps(); + void cancelPreloadRecentApps(); + void startAssist(in Bundle args); + void screenPinningStateChanged(boolean enabled); + void leftInLandscapeChanged(boolean isLeft); + void toggleFlashlight(); + void toggleNavigationEditor(); + void dispatchNavigationEditorResults(in Intent intent); } diff --git a/core/java/com/android/internal/util/fh/FhUtils.java b/core/java/com/android/internal/util/fh/FhUtils.java new file mode 100644 index 000000000000..b85f206d88f0 --- /dev/null +++ b/core/java/com/android/internal/util/fh/FhUtils.java @@ -0,0 +1,380 @@ +/* + * Copyright (C) 2017 FireHound ROMs + * + * 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.util.fh; + +import android.app.ActivityManager; +import android.content.Context; +import android.content.Intent; +import android.content.pm.ActivityInfo; +import android.content.pm.ApplicationInfo; +import android.content.pm.PackageManager; +import android.content.res.Resources; +import android.graphics.Color; +import android.hardware.camera2.CameraAccessException; +import android.hardware.camera2.CameraCharacteristics; +import android.hardware.camera2.CameraManager; +import android.hardware.input.InputManager; +import android.net.ConnectivityManager; +import android.os.Handler; +import android.os.Looper; +import android.os.PowerManager; +import android.os.UserHandle; +import android.os.SystemClock; +import android.util.Log; +import android.view.InputDevice; +import android.view.KeyCharacterMap; +import android.view.KeyEvent; +import android.os.ServiceManager; +import android.os.RemoteException; +import android.view.IWindowManager; +import android.view.WindowManagerGlobal; + +import java.util.List; + +import java.util.Locale; + +import com.android.internal.statusbar.IStatusBarService; + +public class FhUtils { + + private static final String TAG = "FhUtils"; + public static final String INTENT_SCREENSHOT = "action_take_screenshot"; + public static final String INTENT_REGION_SCREENSHOT = "action_take_region_screenshot"; + + public static boolean isChineseLanguage() { + return Resources.getSystem().getConfiguration().locale.getLanguage().startsWith( + Locale.CHINESE.getLanguage()); + } + + public static boolean isWifiOnly(Context context) { + ConnectivityManager cm = (ConnectivityManager)context.getSystemService( + Context.CONNECTIVITY_SERVICE); + return (cm.isNetworkSupported(ConnectivityManager.TYPE_MOBILE) == false); + } + + /** + * Checks if a specific package is installed. + * + * @param context The context to retrieve the package manager + * @param packageName The name of the package + * @return Whether the package is installed or not. + */ + public static boolean isPackageInstalled(Context context, String packageName) { + PackageManager pm = context.getPackageManager(); + try { + if (pm != null) { + List packages = pm.getInstalledApplications(0); + for (ApplicationInfo packageInfo : packages) { + if (packageInfo.packageName.equals(packageName)) { + return true; + } + } + } + } catch (Exception e) { + Log.e(TAG, "Error: " + e.getMessage()); + } + return false; + } + + public static void takeScreenshot(boolean full) { + IWindowManager wm = WindowManagerGlobal.getWindowManagerService(); + try { + wm.sendCustomAction(new Intent(full? INTENT_SCREENSHOT : INTENT_REGION_SCREENSHOT)); + } catch (RemoteException e) { + e.printStackTrace(); + } + } + + public static boolean isPackageEnabled(String packageName, PackageManager pm) { + try { + ApplicationInfo ai = pm.getApplicationInfo(packageName, 0); + return ai.enabled; + } catch (PackageManager.NameNotFoundException notFound) { + return false; + } + } + + /** + * Checks if a specific service is running. + * + * @param context The context to retrieve the activity manager + * @param serviceName The name of the service + * @return Whether the service is running or not + */ + public static boolean isServiceRunning(Context context, String serviceName) { + ActivityManager activityManager = (ActivityManager) context + .getSystemService(Context.ACTIVITY_SERVICE); + List services = activityManager + .getRunningServices(Integer.MAX_VALUE); + + if (services != null) { + for (ActivityManager.RunningServiceInfo info : services) { + if (info.service != null) { + if (info.service.getClassName() != null && info.service.getClassName() + .equalsIgnoreCase(serviceName)) { + return true; + } + } + } + } + + return false; + } + + /** + * Check if system has a camera. + * + * @param context + * @return + */ + public static boolean hasCamera(final Context context) { + final PackageManager pm = context.getPackageManager(); + return pm != null && pm.hasSystemFeature(PackageManager.FEATURE_CAMERA); + } + + /** + * Check if system has a front camera. + * + * @param context + * @return + */ + public static boolean hasFrontCamera(final Context context) { + final PackageManager pm = context.getPackageManager(); + return pm != null && pm.hasSystemFeature(PackageManager.FEATURE_CAMERA_FRONT); + } + + public static boolean deviceSupportsFlashLight(Context context) { + CameraManager cameraManager = (CameraManager) context.getSystemService( + Context.CAMERA_SERVICE); + try { + String[] ids = cameraManager.getCameraIdList(); + for (String id : ids) { + CameraCharacteristics c = cameraManager.getCameraCharacteristics(id); + Boolean flashAvailable = c.get(CameraCharacteristics.FLASH_INFO_AVAILABLE); + Integer lensFacing = c.get(CameraCharacteristics.LENS_FACING); + if (flashAvailable != null + && flashAvailable + && lensFacing != null + && lensFacing == CameraCharacteristics.LENS_FACING_BACK) { + return true; + } + } + } catch (CameraAccessException e) { + // Ignore + } + return false; + } + + // Omni Switch Constants + + /** + * Package name of the omnniswitch app + */ + public static final String APP_PACKAGE_NAME = "org.omnirom.omniswitch"; + + /** + * Intent broadcast action for toogle the omniswitch overlay + */ + private static final String ACTION_TOGGLE_OVERLAY2 = APP_PACKAGE_NAME + ".ACTION_TOGGLE_OVERLAY2"; + + /** + * Intent broadcast action for telling omniswitch to preload tasks + */ + private static final String ACTION_PRELOAD_TASKS = APP_PACKAGE_NAME + ".ACTION_PRELOAD_TASKS"; + + /** + * Intent broadcast action for restoring the home stack + */ + private static final String ACTION_RESTORE_HOME_STACK = APP_PACKAGE_NAME + ".ACTION_RESTORE_HOME_STACK"; + + /** + * Intent broadcast action for hide the omniswitch overlay + */ + private static final String ACTION_HIDE_OVERLAY = APP_PACKAGE_NAME + ".ACTION_HIDE_OVERLAY"; + + /** + * Intent for launching the omniswitch settings actvity + */ + public static Intent INTENT_LAUNCH_APP = new Intent(Intent.ACTION_MAIN) + .setClassName(APP_PACKAGE_NAME, APP_PACKAGE_NAME + ".SettingsActivity"); + + public static boolean isBillingBypassInstalled(final Context context) { + boolean mBillingBypassInstalled = false; + final String[] billingBypassPackageNames = { + "com.dimonvideo.luckypatcher", // used by Lucky Patcher + "com.chelpus.lackypatch", // used by Lucky Patcher + "com.android.vending.billing.InAppBillingService.LACK", // used by Lucky Patcher + "com.android.vending.billing.InAppBillingService.LOCK", // used by Lucky Patcher + "com.android.vending.billing.InAppBillingService.CLON", // used by Lucky Patcher + "com.android.vendinc", // used by Uret + "uret.jasi2169.patcher" // used by Uret + }; + for (String billingBypassPackageName : billingBypassPackageNames) { + mBillingBypassInstalled = mBillingBypassInstalled || isPackageInstalled(context, billingBypassPackageName); + } + + return mBillingBypassInstalled; + } + + /** + * @hide + */ + public static void toggleOmniSwitchRecents(Context context, UserHandle user) { + final Intent intent = new Intent(FhUtils.ACTION_TOGGLE_OVERLAY2); + intent.setPackage(APP_PACKAGE_NAME); + context.sendBroadcastAsUser(intent, user); + } + + /** + * @hide + */ + public static void hideOmniSwitchRecents(Context context, UserHandle user) { + final Intent intent = new Intent(FhUtils.ACTION_HIDE_OVERLAY); + intent.setPackage(APP_PACKAGE_NAME); + context.sendBroadcastAsUser(intent, user); + } + + /** + * @hide + */ + public static void restoreHomeStack(Context context, UserHandle user) { + final Intent intent = new Intent(FhUtils.ACTION_RESTORE_HOME_STACK); + intent.setPackage(APP_PACKAGE_NAME); + context.sendBroadcastAsUser(intent, user); + } + + /** + * @hide + */ + public static void preloadOmniSwitchRecents(Context context, UserHandle user) { + final Intent intent = new Intent(FhUtils.ACTION_PRELOAD_TASKS); + intent.setPackage(APP_PACKAGE_NAME); + context.sendBroadcastAsUser(intent, user); + } + + public static int getBlendColorForPercent(int fullColor, int emptyColor, boolean reversed, + int percentage) { + float[] newColor = new float[3]; + float[] empty = new float[3]; + float[] full = new float[3]; + Color.colorToHSV(fullColor, full); + int fullAlpha = Color.alpha(fullColor); + Color.colorToHSV(emptyColor, empty); + int emptyAlpha = Color.alpha(emptyColor); + float blendFactor = percentage/100f; + if (reversed) { + if (empty[0] < full[0]) { + empty[0] += 360f; + } + newColor[0] = empty[0] - (empty[0]-full[0])*blendFactor; + } else { + if (empty[0] > full[0]) { + full[0] += 360f; + } + newColor[0] = empty[0] + (full[0]-empty[0])*blendFactor; + } + if (newColor[0] > 360f) { + newColor[0] -= 360f; + } else if (newColor[0] < 0) { + newColor[0] += 360f; + } + newColor[1] = empty[1] + ((full[1]-empty[1])*blendFactor); + newColor[2] = empty[2] + ((full[2]-empty[2])*blendFactor); + int newAlpha = (int) (emptyAlpha + ((fullAlpha-emptyAlpha)*blendFactor)); + return Color.HSVToColor(newAlpha, newColor); + } + + public static void switchScreenOff(Context ctx) { + PowerManager pm = (PowerManager) ctx.getSystemService(Context.POWER_SERVICE); + if (pm!= null) { + pm.goToSleep(SystemClock.uptimeMillis()); + } + } + + public static ActivityInfo getRunningActivityInfo(Context context) { + final ActivityManager am = (ActivityManager) context + .getSystemService(Context.ACTIVITY_SERVICE); + final PackageManager pm = context.getPackageManager(); + + List tasks = am.getRunningTasks(1); + if (tasks != null && !tasks.isEmpty()) { + ActivityManager.RunningTaskInfo top = tasks.get(0); + try { + return pm.getActivityInfo(top.topActivity, 0); + } catch (PackageManager.NameNotFoundException e) { + } + } + return null; + } + + public static void sendKeycode(int keycode) { + long when = SystemClock.uptimeMillis(); + final KeyEvent evDown = new KeyEvent(when, when, KeyEvent.ACTION_DOWN, keycode, 0, + 0, KeyCharacterMap.VIRTUAL_KEYBOARD, 0, + KeyEvent.FLAG_FROM_SYSTEM | KeyEvent.FLAG_VIRTUAL_HARD_KEY, + InputDevice.SOURCE_KEYBOARD); + final KeyEvent evUp = KeyEvent.changeAction(evDown, KeyEvent.ACTION_UP); + + final Handler handler = new Handler(Looper.getMainLooper()); + handler.post(new Runnable() { + @Override + public void run() { + InputManager.getInstance().injectInputEvent(evDown, + InputManager.INJECT_INPUT_EVENT_MODE_ASYNC); + } + }); + handler.postDelayed(new Runnable() { + @Override + public void run() { + InputManager.getInstance().injectInputEvent(evUp, + InputManager.INJECT_INPUT_EVENT_MODE_ASYNC); + } + }, 20); + } + + public static boolean deviceHasFlashlight(Context ctx) { + return ctx.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA_FLASH); + } + + public static void toggleCameraFlash() { + FireActions.toggleCameraFlash(); + } + + private static final class FireActions { + private static IStatusBarService mStatusBarService = null; + private static IStatusBarService getStatusBarService() { + synchronized (FireActions.class) { + if (mStatusBarService == null) { + mStatusBarService = IStatusBarService.Stub.asInterface( + ServiceManager.getService("statusbar")); + } + return mStatusBarService; + } + } + + public static void toggleCameraFlash() { + IStatusBarService service = getStatusBarService(); + if (service != null) { + try { + service.toggleCameraFlash(); + } catch (RemoteException e) { + // do nothing. + } + } + } + } +} diff --git a/core/java/com/android/internal/widget/LockPatternUtils.java b/core/java/com/android/internal/widget/LockPatternUtils.java index 54399061a38f..f831eba07566 100644 --- a/core/java/com/android/internal/widget/LockPatternUtils.java +++ b/core/java/com/android/internal/widget/LockPatternUtils.java @@ -387,7 +387,6 @@ private boolean checkCredential(String credential, int type, int userId, */ public byte[] verifyPattern(List pattern, long challenge, int userId) throws RequestThrottledException { - throwIfCalledOnMainThread(); return verifyCredential(patternToString(pattern), CREDENTIAL_TYPE_PATTERN, challenge, userId); } @@ -412,7 +411,6 @@ public boolean checkPattern(List pattern, int userId) public boolean checkPattern(List pattern, int userId, @Nullable CheckCredentialProgressCallback progressCallback) throws RequestThrottledException { - throwIfCalledOnMainThread(); return checkCredential(patternToString(pattern), CREDENTIAL_TYPE_PATTERN, userId, progressCallback); } @@ -428,7 +426,6 @@ public boolean checkPattern(List pattern, int userId, */ public byte[] verifyPassword(String password, long challenge, int userId) throws RequestThrottledException { - throwIfCalledOnMainThread(); return verifyCredential(password, CREDENTIAL_TYPE_PASSWORD, challenge, userId); } @@ -444,7 +441,6 @@ public byte[] verifyPassword(String password, long challenge, int userId) */ public byte[] verifyTiedProfileChallenge(String password, boolean isPattern, long challenge, int userId) throws RequestThrottledException { - throwIfCalledOnMainThread(); try { VerifyCredentialResponse response = getLockSettings().verifyTiedProfileChallenge(password, @@ -482,7 +478,6 @@ public boolean checkPassword(String password, int userId) throws RequestThrottle public boolean checkPassword(String password, int userId, @Nullable CheckCredentialProgressCallback progressCallback) throws RequestThrottledException { - throwIfCalledOnMainThread(); return checkCredential(password, CREDENTIAL_TYPE_PASSWORD, userId, progressCallback); } @@ -1266,7 +1261,7 @@ public long getLockoutAttemptDeadline(int userId) { return deadline; } - private boolean getBoolean(String secureSettingKey, boolean defaultValue, int userId) { + protected boolean getBoolean(String secureSettingKey, boolean defaultValue, int userId) { try { return getLockSettings().getBoolean(secureSettingKey, defaultValue, userId); } catch (RemoteException re) { @@ -1274,7 +1269,7 @@ private boolean getBoolean(String secureSettingKey, boolean defaultValue, int us } } - private void setBoolean(String secureSettingKey, boolean enabled, int userId) { + protected void setBoolean(String secureSettingKey, boolean enabled, int userId) { try { getLockSettings().setBoolean(secureSettingKey, enabled, userId); } catch (RemoteException re) { @@ -1283,7 +1278,7 @@ private void setBoolean(String secureSettingKey, boolean enabled, int userId) { } } - private long getLong(String secureSettingKey, long defaultValue, int userHandle) { + protected long getLong(String secureSettingKey, long defaultValue, int userHandle) { try { return getLockSettings().getLong(secureSettingKey, defaultValue, userHandle); } catch (RemoteException re) { @@ -1291,7 +1286,7 @@ private long getLong(String secureSettingKey, long defaultValue, int userHandle) } } - private void setLong(String secureSettingKey, long value, int userHandle) { + protected void setLong(String secureSettingKey, long value, int userHandle) { try { getLockSettings().setLong(secureSettingKey, value, userHandle); } catch (RemoteException re) { @@ -1300,7 +1295,7 @@ private void setLong(String secureSettingKey, long value, int userHandle) { } } - private String getString(String secureSettingKey, int userHandle) { + protected String getString(String secureSettingKey, int userHandle) { try { return getLockSettings().getString(secureSettingKey, null, userHandle); } catch (RemoteException re) { @@ -1308,7 +1303,7 @@ private String getString(String secureSettingKey, int userHandle) { } } - private void setString(String secureSettingKey, String value, int userHandle) { + protected void setString(String secureSettingKey, String value, int userHandle) { try { getLockSettings().setString(secureSettingKey, value, userHandle); } catch (RemoteException re) { @@ -1415,12 +1410,6 @@ private boolean shouldEncryptWithCredentials(boolean defaultValue) { return isCredentialRequiredToDecrypt(defaultValue) && !isDoNotAskCredentialsOnBootSet(); } - private void throwIfCalledOnMainThread() { - if (Looper.getMainLooper().isCurrentThread()) { - throw new IllegalStateException("should not be called from the main thread."); - } - } - public void registerStrongAuthTracker(final StrongAuthTracker strongAuthTracker) { try { getLockSettings().registerStrongAuthTracker(strongAuthTracker.mStub); diff --git a/core/jni/android/graphics/Bitmap.cpp b/core/jni/android/graphics/Bitmap.cpp index ad05a5113dff..108fdbce386f 100755 --- a/core/jni/android/graphics/Bitmap.cpp +++ b/core/jni/android/graphics/Bitmap.cpp @@ -682,6 +682,8 @@ static jobject Bitmap_creator(JNIEnv* env, jobject, jintArray jColors, sk_sp nativeBitmap = Bitmap::allocateHeapBitmap(&bitmap); if (!nativeBitmap) { + ALOGE("OOM allocating Bitmap with dimensions %i x %i", width, height); + doThrowOOME(env); return NULL; } diff --git a/core/jni/android_hardware_Camera.cpp b/core/jni/android_hardware_Camera.cpp index d6f8dc45560c..f7ead4e0592b 100644 --- a/core/jni/android_hardware_Camera.cpp +++ b/core/jni/android_hardware_Camera.cpp @@ -466,6 +466,56 @@ void JNICameraContext::setCallbackMode(JNIEnv *env, bool installed, bool manualM } } +static void android_hardware_Camera_setLongshot(JNIEnv *env, jobject thiz, jboolean enable) +{ + ALOGV("setLongshot"); + JNICameraContext* context; + status_t rc; + sp camera = get_native_camera(env, thiz, &context); + if (camera == 0) return; + + if ( enable ) { + rc = camera->sendCommand(CAMERA_CMD_LONGSHOT_ON, 0, 0); + } else { + rc = camera->sendCommand(CAMERA_CMD_LONGSHOT_OFF, 0, 0); + } + + if (rc != NO_ERROR) { + jniThrowException(env, "java/lang/RuntimeException", "enabling longshot mode failed"); + } +} + +static void android_hardware_Camera_sendHistogramData(JNIEnv *env, jobject thiz) + { + ALOGV("sendHistogramData" ); + JNICameraContext* context; + status_t rc; + sp camera = get_native_camera(env, thiz, &context); + if (camera == 0) return; + + rc = camera->sendCommand(CAMERA_CMD_HISTOGRAM_SEND_DATA, 0, 0); + + if (rc != NO_ERROR) { + jniThrowException(env, "java/lang/RuntimeException", "send histogram data failed"); + } + } + static void android_hardware_Camera_setHistogramMode(JNIEnv *env, jobject thiz, jboolean mode) + { + ALOGV("setHistogramMode: mode:%d", (int)mode); + JNICameraContext* context; + status_t rc; + sp camera = get_native_camera(env, thiz, &context); + if (camera == 0) return; + + if(mode == true) + rc = camera->sendCommand(CAMERA_CMD_HISTOGRAM_ON, 0, 0); + else + rc = camera->sendCommand(CAMERA_CMD_HISTOGRAM_OFF, 0, 0); + + if (rc != NO_ERROR) { + jniThrowException(env, "java/lang/RuntimeException", "set histogram mode failed"); + } + } void JNICameraContext::addCallbackBuffer( JNIEnv *env, jbyteArray cbb, int msgType) { @@ -788,7 +838,25 @@ static void android_hardware_Camera_setHasPreviewCallback(JNIEnv *env, jobject t context->setCallbackMode(env, installed, manualBuffer); } -static void android_hardware_Camera_addCallbackBuffer(JNIEnv *env, jobject thiz, jbyteArray bytes, jint msgType) { +static void android_hardware_Camera_setMetadataCb(JNIEnv *env, jobject thiz, jboolean mode) +{ + ALOGV("setMetadataCb: mode:%d", (int)mode); + JNICameraContext* context; + status_t rc; + sp camera = get_native_camera(env, thiz, &context); + if (camera == 0) return; + + if(mode == true) + rc = camera->sendCommand(CAMERA_CMD_METADATA_ON, 0, 0); + else + rc = camera->sendCommand(CAMERA_CMD_METADATA_OFF, 0, 0); + + if (rc != NO_ERROR) { + jniThrowException(env, "java/lang/RuntimeException", "set metadata mode failed"); + } +} + +static void android_hardware_Camera_addCallbackBuffer(JNIEnv *env, jobject thiz, jbyteArray bytes, int msgType) { ALOGV("addCallbackBuffer: 0x%x", msgType); JNICameraContext* context = reinterpret_cast(env->GetLongField(thiz, fields.context)); @@ -1018,6 +1086,18 @@ static void android_hardware_Camera_enableFocusMoveCallback(JNIEnv *env, jobject } } +static void android_hardware_Camera_sendVendorCommand(JNIEnv *env, jobject thiz, + jint cmd, jint arg1, jint arg2) +{ + ALOGV("sendVendorCommand"); + sp camera = get_native_camera(env, thiz, NULL); + if (camera == 0) return; + + if (camera->sendCommand(cmd, arg1, arg2) != NO_ERROR) { + jniThrowRuntimeException(env, "sending vendor command failed"); + } +} + //------------------------------------------------- static const JNINativeMethod camMethods[] = { @@ -1066,6 +1146,18 @@ static const JNINativeMethod camMethods[] = { { "native_takePicture", "(I)V", (void *)android_hardware_Camera_takePicture }, + { "native_setHistogramMode", + "(Z)V", + (void *)android_hardware_Camera_setHistogramMode }, + { "native_setMetadataCb", + "(Z)V", + (void *)android_hardware_Camera_setMetadataCb }, + { "native_sendHistogramData", + "()V", + (void *)android_hardware_Camera_sendHistogramData }, + { "native_setLongshot", + "(Z)V", + (void *)android_hardware_Camera_setLongshot }, { "native_setParameters", "(Ljava/lang/String;)V", (void *)android_hardware_Camera_setParameters }, @@ -1102,6 +1194,9 @@ static const JNINativeMethod camMethods[] = { { "enableFocusMoveCallback", "(I)V", (void *)android_hardware_Camera_enableFocusMoveCallback}, + { "_sendVendorCommand", + "(III)V", + (void *)android_hardware_Camera_sendVendorCommand }, }; struct field { diff --git a/core/jni/android_util_AssetManager.cpp b/core/jni/android_util_AssetManager.cpp index b137da3ef792..c963a1b6ec45 100644 --- a/core/jni/android_util_AssetManager.cpp +++ b/core/jni/android_util_AssetManager.cpp @@ -1608,6 +1608,18 @@ static void android_content_AssetManager_init(JNIEnv* env, jobject clazz, jboole env->SetLongField(clazz, gAssetManagerOffsets.mObject, reinterpret_cast(am)); } +static void android_content_AssetManager_initExtraAssets(JNIEnv* env, jobject clazz) +{ + AssetManager* am = (AssetManager*) + (env->GetLongField(clazz, gAssetManagerOffsets.mObject)); + if (am == NULL) { + jniThrowNullPointerException(env, "asset"); + return; + } + + am->addExtraAssets(); +} + static void android_content_AssetManager_destroy(JNIEnv* env, jobject clazz) { AssetManager* am = (AssetManager*) @@ -1755,6 +1767,8 @@ static const JNINativeMethod gAssetManagerMethods[] = { // Bookkeeping. { "init", "(Z)V", (void*) android_content_AssetManager_init }, + { "initExtraAssets", "()V", + (void*) android_content_AssetManager_initExtraAssets }, { "destroy", "()V", (void*) android_content_AssetManager_destroy }, { "getGlobalAssetCount", "()I", diff --git a/core/jni/fd_utils.cpp b/core/jni/fd_utils.cpp index 956b7249660f..92a542676bcd 100644 --- a/core/jni/fd_utils.cpp +++ b/core/jni/fd_utils.cpp @@ -42,6 +42,7 @@ static const char* kPathWhitelist[] = { "/dev/urandom", "/dev/ion", "/dev/dri/renderD129", // Fixes b/31172436 + "/system/framework/org.lineageos.platform-res.apk", }; static const char kFdPath[] = "/proc/self/fd"; diff --git a/core/res/Android.mk b/core/res/Android.mk index b0669294dd9d..536e6959dc4f 100644 --- a/core/res/Android.mk +++ b/core/res/Android.mk @@ -16,6 +16,8 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) +LOCAL_FULL_LIBS_MANIFEST_FILES := $(LOCAL_PATH)/LineageManifest.xml + LOCAL_USE_AAPT2 := true LOCAL_NO_STANDARD_LIBRARIES := true LOCAL_PACKAGE_NAME := framework-res diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index 8c0da4fb5b47..8d87dd2a9af9 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -2144,6 +2144,13 @@ android:description="@string/permdesc_getPackageSize" android:protectionLevel="normal" /> + + + @@ -3060,6 +3067,13 @@ + + + @@ -3552,6 +3566,13 @@ + + + + + + + + + + + + + diff --git a/core/res/res/anim/du_app_in.xml b/core/res/res/anim/du_app_in.xml new file mode 100644 index 000000000000..bf89dbf922f2 --- /dev/null +++ b/core/res/res/anim/du_app_in.xml @@ -0,0 +1,41 @@ + + + + + + + + + + diff --git a/core/res/res/anim/du_app_out.xml b/core/res/res/anim/du_app_out.xml new file mode 100644 index 000000000000..834dfff5b1a7 --- /dev/null +++ b/core/res/res/anim/du_app_out.xml @@ -0,0 +1,41 @@ + + + + + + + + + + diff --git a/core/res/res/drawable-hdpi/battery_charge_background.png b/core/res/res/drawable-hdpi/battery_charge_background.png deleted file mode 100644 index 19023a9cc854..000000000000 Binary files a/core/res/res/drawable-hdpi/battery_charge_background.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/btn_check_on_disable_focused_holo_light.png b/core/res/res/drawable-hdpi/btn_check_on_disable_focused_holo_light.png deleted file mode 100644 index 1f740add42bb..000000000000 Binary files a/core/res/res/drawable-hdpi/btn_check_on_disable_focused_holo_light.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/btn_check_on_disable_holo_dark.png b/core/res/res/drawable-hdpi/btn_check_on_disable_holo_dark.png deleted file mode 100644 index 1f7aeee3bbd5..000000000000 Binary files a/core/res/res/drawable-hdpi/btn_check_on_disable_holo_dark.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/btn_check_on_disable_holo_light.png b/core/res/res/drawable-hdpi/btn_check_on_disable_holo_light.png deleted file mode 100644 index 1f740add42bb..000000000000 Binary files a/core/res/res/drawable-hdpi/btn_check_on_disable_holo_light.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/btn_keyboard_key_dark_normal_holo.9.png b/core/res/res/drawable-hdpi/btn_keyboard_key_dark_normal_holo.9.png deleted file mode 100644 index 5e6a9d6a478b..000000000000 Binary files a/core/res/res/drawable-hdpi/btn_keyboard_key_dark_normal_holo.9.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/btn_keyboard_key_dark_normal_off_holo.9.png b/core/res/res/drawable-hdpi/btn_keyboard_key_dark_normal_off_holo.9.png deleted file mode 100644 index eb9d7406af7d..000000000000 Binary files a/core/res/res/drawable-hdpi/btn_keyboard_key_dark_normal_off_holo.9.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/btn_keyboard_key_dark_normal_on_holo.9.png b/core/res/res/drawable-hdpi/btn_keyboard_key_dark_normal_on_holo.9.png deleted file mode 100644 index 869a33080c62..000000000000 Binary files a/core/res/res/drawable-hdpi/btn_keyboard_key_dark_normal_on_holo.9.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/btn_keyboard_key_dark_pressed_holo.9.png b/core/res/res/drawable-hdpi/btn_keyboard_key_dark_pressed_holo.9.png deleted file mode 100644 index 7ec33dd20769..000000000000 Binary files a/core/res/res/drawable-hdpi/btn_keyboard_key_dark_pressed_holo.9.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/btn_keyboard_key_dark_pressed_off_holo.9.png b/core/res/res/drawable-hdpi/btn_keyboard_key_dark_pressed_off_holo.9.png deleted file mode 100644 index 72d63da61deb..000000000000 Binary files a/core/res/res/drawable-hdpi/btn_keyboard_key_dark_pressed_off_holo.9.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/btn_keyboard_key_dark_pressed_on_holo.9.png b/core/res/res/drawable-hdpi/btn_keyboard_key_dark_pressed_on_holo.9.png deleted file mode 100644 index fcc5cac897ff..000000000000 Binary files a/core/res/res/drawable-hdpi/btn_keyboard_key_dark_pressed_on_holo.9.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/btn_keyboard_key_light_normal_holo.9.png b/core/res/res/drawable-hdpi/btn_keyboard_key_light_normal_holo.9.png deleted file mode 100644 index baff85873eb6..000000000000 Binary files a/core/res/res/drawable-hdpi/btn_keyboard_key_light_normal_holo.9.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/btn_keyboard_key_light_pressed_holo.9.png b/core/res/res/drawable-hdpi/btn_keyboard_key_light_pressed_holo.9.png deleted file mode 100644 index 5612c51a12c5..000000000000 Binary files a/core/res/res/drawable-hdpi/btn_keyboard_key_light_pressed_holo.9.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/dropdown_disabled_focused_holo_dark.9.png b/core/res/res/drawable-hdpi/dropdown_disabled_focused_holo_dark.9.png deleted file mode 100644 index 519f5227c2d4..000000000000 Binary files a/core/res/res/drawable-hdpi/dropdown_disabled_focused_holo_dark.9.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/dropdown_disabled_focused_holo_light.9.png b/core/res/res/drawable-hdpi/dropdown_disabled_focused_holo_light.9.png deleted file mode 100644 index 9c181d07fd54..000000000000 Binary files a/core/res/res/drawable-hdpi/dropdown_disabled_focused_holo_light.9.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/dropdown_disabled_holo_dark.9.png b/core/res/res/drawable-hdpi/dropdown_disabled_holo_dark.9.png deleted file mode 100644 index 6ca975f16c5f..000000000000 Binary files a/core/res/res/drawable-hdpi/dropdown_disabled_holo_dark.9.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/dropdown_disabled_holo_light.9.png b/core/res/res/drawable-hdpi/dropdown_disabled_holo_light.9.png deleted file mode 100644 index 7a20af73808d..000000000000 Binary files a/core/res/res/drawable-hdpi/dropdown_disabled_holo_light.9.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/dropdown_focused_holo_dark.9.png b/core/res/res/drawable-hdpi/dropdown_focused_holo_dark.9.png deleted file mode 100644 index a3dfb98a4f6f..000000000000 Binary files a/core/res/res/drawable-hdpi/dropdown_focused_holo_dark.9.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/dropdown_focused_holo_light.9.png b/core/res/res/drawable-hdpi/dropdown_focused_holo_light.9.png deleted file mode 100644 index 766543c2c2cf..000000000000 Binary files a/core/res/res/drawable-hdpi/dropdown_focused_holo_light.9.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/dropdown_ic_arrow_disabled_focused_holo_dark.png b/core/res/res/drawable-hdpi/dropdown_ic_arrow_disabled_focused_holo_dark.png deleted file mode 100644 index 53f0257624f6..000000000000 Binary files a/core/res/res/drawable-hdpi/dropdown_ic_arrow_disabled_focused_holo_dark.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/dropdown_ic_arrow_disabled_focused_holo_light.png b/core/res/res/drawable-hdpi/dropdown_ic_arrow_disabled_focused_holo_light.png deleted file mode 100644 index 0daee9b77bab..000000000000 Binary files a/core/res/res/drawable-hdpi/dropdown_ic_arrow_disabled_focused_holo_light.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/dropdown_ic_arrow_disabled_holo_dark.png b/core/res/res/drawable-hdpi/dropdown_ic_arrow_disabled_holo_dark.png deleted file mode 100644 index b659926c8794..000000000000 Binary files a/core/res/res/drawable-hdpi/dropdown_ic_arrow_disabled_holo_dark.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/dropdown_ic_arrow_disabled_holo_light.png b/core/res/res/drawable-hdpi/dropdown_ic_arrow_disabled_holo_light.png deleted file mode 100644 index e22dbfdd1efb..000000000000 Binary files a/core/res/res/drawable-hdpi/dropdown_ic_arrow_disabled_holo_light.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/dropdown_ic_arrow_focused_holo_dark.png b/core/res/res/drawable-hdpi/dropdown_ic_arrow_focused_holo_dark.png deleted file mode 100644 index 0f65227b7ddf..000000000000 Binary files a/core/res/res/drawable-hdpi/dropdown_ic_arrow_focused_holo_dark.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/dropdown_ic_arrow_focused_holo_light.png b/core/res/res/drawable-hdpi/dropdown_ic_arrow_focused_holo_light.png deleted file mode 100644 index 9c47d7ef95b9..000000000000 Binary files a/core/res/res/drawable-hdpi/dropdown_ic_arrow_focused_holo_light.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/dropdown_ic_arrow_normal_holo_dark.png b/core/res/res/drawable-hdpi/dropdown_ic_arrow_normal_holo_dark.png deleted file mode 100644 index 06e5b4730bb5..000000000000 Binary files a/core/res/res/drawable-hdpi/dropdown_ic_arrow_normal_holo_dark.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/dropdown_ic_arrow_normal_holo_light.png b/core/res/res/drawable-hdpi/dropdown_ic_arrow_normal_holo_light.png deleted file mode 100644 index d362ec1c7682..000000000000 Binary files a/core/res/res/drawable-hdpi/dropdown_ic_arrow_normal_holo_light.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/dropdown_ic_arrow_pressed_holo_dark.png b/core/res/res/drawable-hdpi/dropdown_ic_arrow_pressed_holo_dark.png deleted file mode 100644 index d010995cf155..000000000000 Binary files a/core/res/res/drawable-hdpi/dropdown_ic_arrow_pressed_holo_dark.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/dropdown_ic_arrow_pressed_holo_light.png b/core/res/res/drawable-hdpi/dropdown_ic_arrow_pressed_holo_light.png deleted file mode 100644 index b95f94b8caf4..000000000000 Binary files a/core/res/res/drawable-hdpi/dropdown_ic_arrow_pressed_holo_light.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/dropdown_normal_holo_dark.9.png b/core/res/res/drawable-hdpi/dropdown_normal_holo_dark.9.png deleted file mode 100644 index a4ac31783466..000000000000 Binary files a/core/res/res/drawable-hdpi/dropdown_normal_holo_dark.9.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/dropdown_normal_holo_light.9.png b/core/res/res/drawable-hdpi/dropdown_normal_holo_light.9.png deleted file mode 100644 index b4ab9ad83ae0..000000000000 Binary files a/core/res/res/drawable-hdpi/dropdown_normal_holo_light.9.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/dropdown_pressed_holo_dark.9.png b/core/res/res/drawable-hdpi/dropdown_pressed_holo_dark.9.png deleted file mode 100644 index f6382c8f50cc..000000000000 Binary files a/core/res/res/drawable-hdpi/dropdown_pressed_holo_dark.9.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/dropdown_pressed_holo_light.9.png b/core/res/res/drawable-hdpi/dropdown_pressed_holo_light.9.png deleted file mode 100644 index c849e2f94ff8..000000000000 Binary files a/core/res/res/drawable-hdpi/dropdown_pressed_holo_light.9.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/ic_jog_dial_answer.png b/core/res/res/drawable-hdpi/ic_jog_dial_answer.png deleted file mode 100644 index ca0a825ffe8e..000000000000 Binary files a/core/res/res/drawable-hdpi/ic_jog_dial_answer.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/ic_jog_dial_answer_and_end.png b/core/res/res/drawable-hdpi/ic_jog_dial_answer_and_end.png deleted file mode 100644 index 82237bdd8d51..000000000000 Binary files a/core/res/res/drawable-hdpi/ic_jog_dial_answer_and_end.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/ic_jog_dial_answer_and_hold.png b/core/res/res/drawable-hdpi/ic_jog_dial_answer_and_hold.png deleted file mode 100644 index 4946adab1e54..000000000000 Binary files a/core/res/res/drawable-hdpi/ic_jog_dial_answer_and_hold.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/ic_jog_dial_decline.png b/core/res/res/drawable-hdpi/ic_jog_dial_decline.png deleted file mode 100644 index 006a6e4f02dd..000000000000 Binary files a/core/res/res/drawable-hdpi/ic_jog_dial_decline.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/ic_jog_dial_sound_off.png b/core/res/res/drawable-hdpi/ic_jog_dial_sound_off.png deleted file mode 100644 index d73db482ff8d..000000000000 Binary files a/core/res/res/drawable-hdpi/ic_jog_dial_sound_off.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/ic_jog_dial_sound_on.png b/core/res/res/drawable-hdpi/ic_jog_dial_sound_on.png deleted file mode 100644 index 90da6e3e26d9..000000000000 Binary files a/core/res/res/drawable-hdpi/ic_jog_dial_sound_on.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/ic_jog_dial_unlock.png b/core/res/res/drawable-hdpi/ic_jog_dial_unlock.png deleted file mode 100644 index a9af1aff0c3a..000000000000 Binary files a/core/res/res/drawable-hdpi/ic_jog_dial_unlock.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/ic_jog_dial_vibrate_on.png b/core/res/res/drawable-hdpi/ic_jog_dial_vibrate_on.png deleted file mode 100644 index 86caa074a382..000000000000 Binary files a/core/res/res/drawable-hdpi/ic_jog_dial_vibrate_on.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/ic_menu_moreoverflow_focused_holo_dark.png b/core/res/res/drawable-hdpi/ic_menu_moreoverflow_focused_holo_dark.png deleted file mode 100644 index 061f80a0916f..000000000000 Binary files a/core/res/res/drawable-hdpi/ic_menu_moreoverflow_focused_holo_dark.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/ic_menu_moreoverflow_focused_holo_light.png b/core/res/res/drawable-hdpi/ic_menu_moreoverflow_focused_holo_light.png deleted file mode 100644 index d81880644be0..000000000000 Binary files a/core/res/res/drawable-hdpi/ic_menu_moreoverflow_focused_holo_light.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/stat_notify_missed_call.png b/core/res/res/drawable-hdpi/stat_notify_missed_call.png index f205471bc5f1..37f478b1b1a2 100644 Binary files a/core/res/res/drawable-hdpi/stat_notify_missed_call.png and b/core/res/res/drawable-hdpi/stat_notify_missed_call.png differ diff --git a/core/res/res/drawable-hdpi/stat_sys_battery_10.png b/core/res/res/drawable-hdpi/stat_sys_battery_10.png deleted file mode 100644 index 4486553d7280..000000000000 Binary files a/core/res/res/drawable-hdpi/stat_sys_battery_10.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/stat_sys_battery_20.png b/core/res/res/drawable-hdpi/stat_sys_battery_20.png deleted file mode 100644 index c8f9c9231a28..000000000000 Binary files a/core/res/res/drawable-hdpi/stat_sys_battery_20.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/stat_sys_battery_40.png b/core/res/res/drawable-hdpi/stat_sys_battery_40.png deleted file mode 100644 index 441bbfba9f03..000000000000 Binary files a/core/res/res/drawable-hdpi/stat_sys_battery_40.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/stat_sys_battery_60.png b/core/res/res/drawable-hdpi/stat_sys_battery_60.png deleted file mode 100644 index d9467eda963f..000000000000 Binary files a/core/res/res/drawable-hdpi/stat_sys_battery_60.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/stat_sys_battery_80.png b/core/res/res/drawable-hdpi/stat_sys_battery_80.png deleted file mode 100644 index e3f48054a55e..000000000000 Binary files a/core/res/res/drawable-hdpi/stat_sys_battery_80.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/stat_sys_battery_charge_anim1.png b/core/res/res/drawable-hdpi/stat_sys_battery_charge_anim1.png deleted file mode 100644 index 997feb36658d..000000000000 Binary files a/core/res/res/drawable-hdpi/stat_sys_battery_charge_anim1.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/stat_sys_battery_charge_anim2.png b/core/res/res/drawable-hdpi/stat_sys_battery_charge_anim2.png deleted file mode 100644 index 426a66b60223..000000000000 Binary files a/core/res/res/drawable-hdpi/stat_sys_battery_charge_anim2.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/stat_sys_battery_charge_anim3.png b/core/res/res/drawable-hdpi/stat_sys_battery_charge_anim3.png deleted file mode 100644 index 21582ca14f4e..000000000000 Binary files a/core/res/res/drawable-hdpi/stat_sys_battery_charge_anim3.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/stat_sys_battery_charge_anim4.png b/core/res/res/drawable-hdpi/stat_sys_battery_charge_anim4.png deleted file mode 100644 index 8a94763d5915..000000000000 Binary files a/core/res/res/drawable-hdpi/stat_sys_battery_charge_anim4.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/stat_sys_battery_charge_anim5.png b/core/res/res/drawable-hdpi/stat_sys_battery_charge_anim5.png deleted file mode 100644 index fad0d657a252..000000000000 Binary files a/core/res/res/drawable-hdpi/stat_sys_battery_charge_anim5.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/stat_sys_data_wimax_signal_3_fully.png b/core/res/res/drawable-hdpi/stat_sys_data_wimax_signal_3_fully.png deleted file mode 100644 index cb08eed75658..000000000000 Binary files a/core/res/res/drawable-hdpi/stat_sys_data_wimax_signal_3_fully.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/stat_sys_data_wimax_signal_disconnected.png b/core/res/res/drawable-hdpi/stat_sys_data_wimax_signal_disconnected.png deleted file mode 100644 index ea065c36e742..000000000000 Binary files a/core/res/res/drawable-hdpi/stat_sys_data_wimax_signal_disconnected.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/stat_sys_r_signal_0_cdma.png b/core/res/res/drawable-hdpi/stat_sys_r_signal_0_cdma.png deleted file mode 100644 index 14a7e942f50e..000000000000 Binary files a/core/res/res/drawable-hdpi/stat_sys_r_signal_0_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/stat_sys_r_signal_1_cdma.png b/core/res/res/drawable-hdpi/stat_sys_r_signal_1_cdma.png deleted file mode 100644 index 9cf04b588240..000000000000 Binary files a/core/res/res/drawable-hdpi/stat_sys_r_signal_1_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/stat_sys_r_signal_2_cdma.png b/core/res/res/drawable-hdpi/stat_sys_r_signal_2_cdma.png deleted file mode 100644 index dbd3308eb55d..000000000000 Binary files a/core/res/res/drawable-hdpi/stat_sys_r_signal_2_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/stat_sys_r_signal_3_cdma.png b/core/res/res/drawable-hdpi/stat_sys_r_signal_3_cdma.png deleted file mode 100644 index a3a6b6c13eb8..000000000000 Binary files a/core/res/res/drawable-hdpi/stat_sys_r_signal_3_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/stat_sys_r_signal_4_cdma.png b/core/res/res/drawable-hdpi/stat_sys_r_signal_4_cdma.png deleted file mode 100644 index 0f9504105555..000000000000 Binary files a/core/res/res/drawable-hdpi/stat_sys_r_signal_4_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/stat_sys_ra_signal_0_cdma.png b/core/res/res/drawable-hdpi/stat_sys_ra_signal_0_cdma.png deleted file mode 100644 index a2fa5472de24..000000000000 Binary files a/core/res/res/drawable-hdpi/stat_sys_ra_signal_0_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/stat_sys_ra_signal_1_cdma.png b/core/res/res/drawable-hdpi/stat_sys_ra_signal_1_cdma.png deleted file mode 100644 index 17c8681ba3c5..000000000000 Binary files a/core/res/res/drawable-hdpi/stat_sys_ra_signal_1_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/stat_sys_ra_signal_2_cdma.png b/core/res/res/drawable-hdpi/stat_sys_ra_signal_2_cdma.png deleted file mode 100644 index 4a21fb6f4536..000000000000 Binary files a/core/res/res/drawable-hdpi/stat_sys_ra_signal_2_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/stat_sys_ra_signal_3_cdma.png b/core/res/res/drawable-hdpi/stat_sys_ra_signal_3_cdma.png deleted file mode 100644 index 188b1f9bd4d4..000000000000 Binary files a/core/res/res/drawable-hdpi/stat_sys_ra_signal_3_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/stat_sys_ra_signal_4_cdma.png b/core/res/res/drawable-hdpi/stat_sys_ra_signal_4_cdma.png deleted file mode 100644 index 5729f7db299e..000000000000 Binary files a/core/res/res/drawable-hdpi/stat_sys_ra_signal_4_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_0_cdma.png b/core/res/res/drawable-hdpi/stat_sys_signal_0_cdma.png deleted file mode 100644 index af43e00a1d20..000000000000 Binary files a/core/res/res/drawable-hdpi/stat_sys_signal_0_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_1_cdma.png b/core/res/res/drawable-hdpi/stat_sys_signal_1_cdma.png deleted file mode 100644 index 4ffe42116f0f..000000000000 Binary files a/core/res/res/drawable-hdpi/stat_sys_signal_1_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_2_cdma.png b/core/res/res/drawable-hdpi/stat_sys_signal_2_cdma.png deleted file mode 100644 index 6f27b96c3626..000000000000 Binary files a/core/res/res/drawable-hdpi/stat_sys_signal_2_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_3_cdma.png b/core/res/res/drawable-hdpi/stat_sys_signal_3_cdma.png deleted file mode 100644 index ddc46b073663..000000000000 Binary files a/core/res/res/drawable-hdpi/stat_sys_signal_3_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_4_cdma.png b/core/res/res/drawable-hdpi/stat_sys_signal_4_cdma.png deleted file mode 100644 index fb3cfe96c4e6..000000000000 Binary files a/core/res/res/drawable-hdpi/stat_sys_signal_4_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_evdo_0.png b/core/res/res/drawable-hdpi/stat_sys_signal_evdo_0.png deleted file mode 100644 index b697ca447cfb..000000000000 Binary files a/core/res/res/drawable-hdpi/stat_sys_signal_evdo_0.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_evdo_1.png b/core/res/res/drawable-hdpi/stat_sys_signal_evdo_1.png deleted file mode 100644 index a61de4d25dfa..000000000000 Binary files a/core/res/res/drawable-hdpi/stat_sys_signal_evdo_1.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_evdo_2.png b/core/res/res/drawable-hdpi/stat_sys_signal_evdo_2.png deleted file mode 100644 index 62e0393d9793..000000000000 Binary files a/core/res/res/drawable-hdpi/stat_sys_signal_evdo_2.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_evdo_3.png b/core/res/res/drawable-hdpi/stat_sys_signal_evdo_3.png deleted file mode 100644 index 09eae9d4f6fc..000000000000 Binary files a/core/res/res/drawable-hdpi/stat_sys_signal_evdo_3.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/stat_sys_signal_evdo_4.png b/core/res/res/drawable-hdpi/stat_sys_signal_evdo_4.png deleted file mode 100644 index 4012ac5d149c..000000000000 Binary files a/core/res/res/drawable-hdpi/stat_sys_signal_evdo_4.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/tab_selected_holo.9.png b/core/res/res/drawable-hdpi/tab_selected_holo.9.png deleted file mode 100644 index d57df98b5019..000000000000 Binary files a/core/res/res/drawable-hdpi/tab_selected_holo.9.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/textfield_bg_activated_holo_dark.9.png b/core/res/res/drawable-hdpi/textfield_bg_activated_holo_dark.9.png deleted file mode 100644 index a233b0d7079c..000000000000 Binary files a/core/res/res/drawable-hdpi/textfield_bg_activated_holo_dark.9.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/textfield_bg_default_holo_dark.9.png b/core/res/res/drawable-hdpi/textfield_bg_default_holo_dark.9.png deleted file mode 100644 index 403f5021163b..000000000000 Binary files a/core/res/res/drawable-hdpi/textfield_bg_default_holo_dark.9.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/textfield_bg_disabled_focused_holo_dark.9.png b/core/res/res/drawable-hdpi/textfield_bg_disabled_focused_holo_dark.9.png deleted file mode 100644 index 0ded801333d5..000000000000 Binary files a/core/res/res/drawable-hdpi/textfield_bg_disabled_focused_holo_dark.9.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/textfield_bg_disabled_holo_dark.9.png b/core/res/res/drawable-hdpi/textfield_bg_disabled_holo_dark.9.png deleted file mode 100644 index 27237b8fe068..000000000000 Binary files a/core/res/res/drawable-hdpi/textfield_bg_disabled_holo_dark.9.png and /dev/null differ diff --git a/core/res/res/drawable-hdpi/textfield_bg_focused_holo_dark.9.png b/core/res/res/drawable-hdpi/textfield_bg_focused_holo_dark.9.png deleted file mode 100644 index 0e451f1733d6..000000000000 Binary files a/core/res/res/drawable-hdpi/textfield_bg_focused_holo_dark.9.png and /dev/null differ diff --git a/core/res/res/drawable-land-ldpi/ic_jog_dial_sound_off.png b/core/res/res/drawable-land-ldpi/ic_jog_dial_sound_off.png deleted file mode 100644 index a4e3edf1c42a..000000000000 Binary files a/core/res/res/drawable-land-ldpi/ic_jog_dial_sound_off.png and /dev/null differ diff --git a/core/res/res/drawable-land-ldpi/ic_jog_dial_sound_on.png b/core/res/res/drawable-land-ldpi/ic_jog_dial_sound_on.png deleted file mode 100644 index f8190b56f498..000000000000 Binary files a/core/res/res/drawable-land-ldpi/ic_jog_dial_sound_on.png and /dev/null differ diff --git a/core/res/res/drawable-land-ldpi/ic_jog_dial_unlock.png b/core/res/res/drawable-land-ldpi/ic_jog_dial_unlock.png deleted file mode 100644 index 16fa0db9942a..000000000000 Binary files a/core/res/res/drawable-land-ldpi/ic_jog_dial_unlock.png and /dev/null differ diff --git a/core/res/res/drawable-ldpi/battery_charge_background.png b/core/res/res/drawable-ldpi/battery_charge_background.png deleted file mode 100644 index 503c4f9fd991..000000000000 Binary files a/core/res/res/drawable-ldpi/battery_charge_background.png and /dev/null differ diff --git a/core/res/res/drawable-ldpi/ic_jog_dial_answer.png b/core/res/res/drawable-ldpi/ic_jog_dial_answer.png deleted file mode 100644 index 9c5800ad1f3e..000000000000 Binary files a/core/res/res/drawable-ldpi/ic_jog_dial_answer.png and /dev/null differ diff --git a/core/res/res/drawable-ldpi/ic_jog_dial_answer_and_end.png b/core/res/res/drawable-ldpi/ic_jog_dial_answer_and_end.png deleted file mode 100644 index 117c6d84b516..000000000000 Binary files a/core/res/res/drawable-ldpi/ic_jog_dial_answer_and_end.png and /dev/null differ diff --git a/core/res/res/drawable-ldpi/ic_jog_dial_answer_and_hold.png b/core/res/res/drawable-ldpi/ic_jog_dial_answer_and_hold.png deleted file mode 100644 index 08280e3824b6..000000000000 Binary files a/core/res/res/drawable-ldpi/ic_jog_dial_answer_and_hold.png and /dev/null differ diff --git a/core/res/res/drawable-ldpi/ic_jog_dial_decline.png b/core/res/res/drawable-ldpi/ic_jog_dial_decline.png deleted file mode 100644 index 7ccc1ca1a431..000000000000 Binary files a/core/res/res/drawable-ldpi/ic_jog_dial_decline.png and /dev/null differ diff --git a/core/res/res/drawable-ldpi/ic_jog_dial_sound_off.png b/core/res/res/drawable-ldpi/ic_jog_dial_sound_off.png deleted file mode 100644 index a4e3edf1c42a..000000000000 Binary files a/core/res/res/drawable-ldpi/ic_jog_dial_sound_off.png and /dev/null differ diff --git a/core/res/res/drawable-ldpi/ic_jog_dial_sound_on.png b/core/res/res/drawable-ldpi/ic_jog_dial_sound_on.png deleted file mode 100644 index f8190b56f498..000000000000 Binary files a/core/res/res/drawable-ldpi/ic_jog_dial_sound_on.png and /dev/null differ diff --git a/core/res/res/drawable-ldpi/ic_jog_dial_unlock.png b/core/res/res/drawable-ldpi/ic_jog_dial_unlock.png deleted file mode 100644 index 16fa0db9942a..000000000000 Binary files a/core/res/res/drawable-ldpi/ic_jog_dial_unlock.png and /dev/null differ diff --git a/core/res/res/drawable-ldpi/ic_jog_dial_vibrate_on.png b/core/res/res/drawable-ldpi/ic_jog_dial_vibrate_on.png deleted file mode 100644 index ac5a9b955caf..000000000000 Binary files a/core/res/res/drawable-ldpi/ic_jog_dial_vibrate_on.png and /dev/null differ diff --git a/core/res/res/drawable-ldpi/stat_sys_battery_10.png b/core/res/res/drawable-ldpi/stat_sys_battery_10.png deleted file mode 100644 index 5e7efd10645e..000000000000 Binary files a/core/res/res/drawable-ldpi/stat_sys_battery_10.png and /dev/null differ diff --git a/core/res/res/drawable-ldpi/stat_sys_battery_100.png b/core/res/res/drawable-ldpi/stat_sys_battery_100.png deleted file mode 100644 index 7023ea7b420c..000000000000 Binary files a/core/res/res/drawable-ldpi/stat_sys_battery_100.png and /dev/null differ diff --git a/core/res/res/drawable-ldpi/stat_sys_battery_20.png b/core/res/res/drawable-ldpi/stat_sys_battery_20.png deleted file mode 100644 index 275ebbb1ba30..000000000000 Binary files a/core/res/res/drawable-ldpi/stat_sys_battery_20.png and /dev/null differ diff --git a/core/res/res/drawable-ldpi/stat_sys_battery_40.png b/core/res/res/drawable-ldpi/stat_sys_battery_40.png deleted file mode 100644 index 6a46fe096dcc..000000000000 Binary files a/core/res/res/drawable-ldpi/stat_sys_battery_40.png and /dev/null differ diff --git a/core/res/res/drawable-ldpi/stat_sys_battery_60.png b/core/res/res/drawable-ldpi/stat_sys_battery_60.png deleted file mode 100644 index f94115a01e44..000000000000 Binary files a/core/res/res/drawable-ldpi/stat_sys_battery_60.png and /dev/null differ diff --git a/core/res/res/drawable-ldpi/stat_sys_battery_80.png b/core/res/res/drawable-ldpi/stat_sys_battery_80.png deleted file mode 100644 index 8b07df923adb..000000000000 Binary files a/core/res/res/drawable-ldpi/stat_sys_battery_80.png and /dev/null differ diff --git a/core/res/res/drawable-ldpi/stat_sys_battery_charge_anim0.png b/core/res/res/drawable-ldpi/stat_sys_battery_charge_anim0.png deleted file mode 100644 index 7c4a783c3c8e..000000000000 Binary files a/core/res/res/drawable-ldpi/stat_sys_battery_charge_anim0.png and /dev/null differ diff --git a/core/res/res/drawable-ldpi/stat_sys_battery_charge_anim1.png b/core/res/res/drawable-ldpi/stat_sys_battery_charge_anim1.png deleted file mode 100644 index 9eea8ae94442..000000000000 Binary files a/core/res/res/drawable-ldpi/stat_sys_battery_charge_anim1.png and /dev/null differ diff --git a/core/res/res/drawable-ldpi/stat_sys_battery_charge_anim2.png b/core/res/res/drawable-ldpi/stat_sys_battery_charge_anim2.png deleted file mode 100644 index 112c8696438d..000000000000 Binary files a/core/res/res/drawable-ldpi/stat_sys_battery_charge_anim2.png and /dev/null differ diff --git a/core/res/res/drawable-ldpi/stat_sys_battery_charge_anim3.png b/core/res/res/drawable-ldpi/stat_sys_battery_charge_anim3.png deleted file mode 100644 index 7b5c08b36dec..000000000000 Binary files a/core/res/res/drawable-ldpi/stat_sys_battery_charge_anim3.png and /dev/null differ diff --git a/core/res/res/drawable-ldpi/stat_sys_battery_charge_anim4.png b/core/res/res/drawable-ldpi/stat_sys_battery_charge_anim4.png deleted file mode 100644 index ddda4ad6db7d..000000000000 Binary files a/core/res/res/drawable-ldpi/stat_sys_battery_charge_anim4.png and /dev/null differ diff --git a/core/res/res/drawable-ldpi/stat_sys_battery_charge_anim5.png b/core/res/res/drawable-ldpi/stat_sys_battery_charge_anim5.png deleted file mode 100644 index 52050b2f832c..000000000000 Binary files a/core/res/res/drawable-ldpi/stat_sys_battery_charge_anim5.png and /dev/null differ diff --git a/core/res/res/drawable-ldpi/stat_sys_r_signal_0_cdma.png b/core/res/res/drawable-ldpi/stat_sys_r_signal_0_cdma.png deleted file mode 100644 index 2c4ff0678960..000000000000 Binary files a/core/res/res/drawable-ldpi/stat_sys_r_signal_0_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-ldpi/stat_sys_r_signal_1_cdma.png b/core/res/res/drawable-ldpi/stat_sys_r_signal_1_cdma.png deleted file mode 100644 index 82626ac1fb4c..000000000000 Binary files a/core/res/res/drawable-ldpi/stat_sys_r_signal_1_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-ldpi/stat_sys_r_signal_2_cdma.png b/core/res/res/drawable-ldpi/stat_sys_r_signal_2_cdma.png deleted file mode 100644 index 96304b15bbe2..000000000000 Binary files a/core/res/res/drawable-ldpi/stat_sys_r_signal_2_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-ldpi/stat_sys_r_signal_3_cdma.png b/core/res/res/drawable-ldpi/stat_sys_r_signal_3_cdma.png deleted file mode 100644 index 9a3f2309d85f..000000000000 Binary files a/core/res/res/drawable-ldpi/stat_sys_r_signal_3_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-ldpi/stat_sys_r_signal_4_cdma.png b/core/res/res/drawable-ldpi/stat_sys_r_signal_4_cdma.png deleted file mode 100644 index 5a607ee98474..000000000000 Binary files a/core/res/res/drawable-ldpi/stat_sys_r_signal_4_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-ldpi/stat_sys_ra_signal_0_cdma.png b/core/res/res/drawable-ldpi/stat_sys_ra_signal_0_cdma.png deleted file mode 100644 index 0db564b0d403..000000000000 Binary files a/core/res/res/drawable-ldpi/stat_sys_ra_signal_0_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-ldpi/stat_sys_ra_signal_1_cdma.png b/core/res/res/drawable-ldpi/stat_sys_ra_signal_1_cdma.png deleted file mode 100644 index ca697db30d4f..000000000000 Binary files a/core/res/res/drawable-ldpi/stat_sys_ra_signal_1_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-ldpi/stat_sys_ra_signal_2_cdma.png b/core/res/res/drawable-ldpi/stat_sys_ra_signal_2_cdma.png deleted file mode 100644 index 816aaaa45cde..000000000000 Binary files a/core/res/res/drawable-ldpi/stat_sys_ra_signal_2_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-ldpi/stat_sys_ra_signal_3_cdma.png b/core/res/res/drawable-ldpi/stat_sys_ra_signal_3_cdma.png deleted file mode 100644 index ebb103c050e7..000000000000 Binary files a/core/res/res/drawable-ldpi/stat_sys_ra_signal_3_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-ldpi/stat_sys_ra_signal_4_cdma.png b/core/res/res/drawable-ldpi/stat_sys_ra_signal_4_cdma.png deleted file mode 100644 index f21120157b7d..000000000000 Binary files a/core/res/res/drawable-ldpi/stat_sys_ra_signal_4_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-ldpi/stat_sys_signal_0_cdma.png b/core/res/res/drawable-ldpi/stat_sys_signal_0_cdma.png deleted file mode 100644 index dabba9c8b505..000000000000 Binary files a/core/res/res/drawable-ldpi/stat_sys_signal_0_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-ldpi/stat_sys_signal_1_cdma.png b/core/res/res/drawable-ldpi/stat_sys_signal_1_cdma.png deleted file mode 100644 index 5d99b4544237..000000000000 Binary files a/core/res/res/drawable-ldpi/stat_sys_signal_1_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-ldpi/stat_sys_signal_2_cdma.png b/core/res/res/drawable-ldpi/stat_sys_signal_2_cdma.png deleted file mode 100644 index f68f836e7662..000000000000 Binary files a/core/res/res/drawable-ldpi/stat_sys_signal_2_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-ldpi/stat_sys_signal_3_cdma.png b/core/res/res/drawable-ldpi/stat_sys_signal_3_cdma.png deleted file mode 100644 index 370b91f2c29a..000000000000 Binary files a/core/res/res/drawable-ldpi/stat_sys_signal_3_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-ldpi/stat_sys_signal_4_cdma.png b/core/res/res/drawable-ldpi/stat_sys_signal_4_cdma.png deleted file mode 100644 index e8b4d389a06e..000000000000 Binary files a/core/res/res/drawable-ldpi/stat_sys_signal_4_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-ldpi/stat_sys_signal_evdo_0.png b/core/res/res/drawable-ldpi/stat_sys_signal_evdo_0.png deleted file mode 100644 index 2b360c21e72c..000000000000 Binary files a/core/res/res/drawable-ldpi/stat_sys_signal_evdo_0.png and /dev/null differ diff --git a/core/res/res/drawable-ldpi/stat_sys_signal_evdo_1.png b/core/res/res/drawable-ldpi/stat_sys_signal_evdo_1.png deleted file mode 100644 index dfcd1f73a571..000000000000 Binary files a/core/res/res/drawable-ldpi/stat_sys_signal_evdo_1.png and /dev/null differ diff --git a/core/res/res/drawable-ldpi/stat_sys_signal_evdo_2.png b/core/res/res/drawable-ldpi/stat_sys_signal_evdo_2.png deleted file mode 100644 index b8a5bdac9ead..000000000000 Binary files a/core/res/res/drawable-ldpi/stat_sys_signal_evdo_2.png and /dev/null differ diff --git a/core/res/res/drawable-ldpi/stat_sys_signal_evdo_3.png b/core/res/res/drawable-ldpi/stat_sys_signal_evdo_3.png deleted file mode 100644 index 65c76d323f94..000000000000 Binary files a/core/res/res/drawable-ldpi/stat_sys_signal_evdo_3.png and /dev/null differ diff --git a/core/res/res/drawable-ldpi/stat_sys_signal_evdo_4.png b/core/res/res/drawable-ldpi/stat_sys_signal_evdo_4.png deleted file mode 100644 index 974f936457bd..000000000000 Binary files a/core/res/res/drawable-ldpi/stat_sys_signal_evdo_4.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/battery_charge_background.png b/core/res/res/drawable-mdpi/battery_charge_background.png deleted file mode 100644 index 9219745c5bc2..000000000000 Binary files a/core/res/res/drawable-mdpi/battery_charge_background.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/btn_check_on_disable_focused_holo_light.png b/core/res/res/drawable-mdpi/btn_check_on_disable_focused_holo_light.png deleted file mode 100644 index c9ebbca33b80..000000000000 Binary files a/core/res/res/drawable-mdpi/btn_check_on_disable_focused_holo_light.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/btn_check_on_disable_holo_dark.png b/core/res/res/drawable-mdpi/btn_check_on_disable_holo_dark.png deleted file mode 100644 index 48cc017c4e4b..000000000000 Binary files a/core/res/res/drawable-mdpi/btn_check_on_disable_holo_dark.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/btn_check_on_disable_holo_light.png b/core/res/res/drawable-mdpi/btn_check_on_disable_holo_light.png deleted file mode 100644 index c9ebbca33b80..000000000000 Binary files a/core/res/res/drawable-mdpi/btn_check_on_disable_holo_light.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/btn_keyboard_key_dark_normal_holo.9.png b/core/res/res/drawable-mdpi/btn_keyboard_key_dark_normal_holo.9.png deleted file mode 100644 index d449d760067d..000000000000 Binary files a/core/res/res/drawable-mdpi/btn_keyboard_key_dark_normal_holo.9.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/btn_keyboard_key_dark_normal_off_holo.9.png b/core/res/res/drawable-mdpi/btn_keyboard_key_dark_normal_off_holo.9.png deleted file mode 100644 index 80fe863f5f6c..000000000000 Binary files a/core/res/res/drawable-mdpi/btn_keyboard_key_dark_normal_off_holo.9.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/btn_keyboard_key_dark_normal_on_holo.9.png b/core/res/res/drawable-mdpi/btn_keyboard_key_dark_normal_on_holo.9.png deleted file mode 100644 index 196d6d9bda61..000000000000 Binary files a/core/res/res/drawable-mdpi/btn_keyboard_key_dark_normal_on_holo.9.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/btn_keyboard_key_dark_pressed_holo.9.png b/core/res/res/drawable-mdpi/btn_keyboard_key_dark_pressed_holo.9.png deleted file mode 100644 index 8f340d3551de..000000000000 Binary files a/core/res/res/drawable-mdpi/btn_keyboard_key_dark_pressed_holo.9.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/btn_keyboard_key_dark_pressed_off_holo.9.png b/core/res/res/drawable-mdpi/btn_keyboard_key_dark_pressed_off_holo.9.png deleted file mode 100644 index b34b95765a7d..000000000000 Binary files a/core/res/res/drawable-mdpi/btn_keyboard_key_dark_pressed_off_holo.9.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/btn_keyboard_key_dark_pressed_on_holo.9.png b/core/res/res/drawable-mdpi/btn_keyboard_key_dark_pressed_on_holo.9.png deleted file mode 100644 index 02f4b3de941c..000000000000 Binary files a/core/res/res/drawable-mdpi/btn_keyboard_key_dark_pressed_on_holo.9.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/btn_keyboard_key_light_normal_holo.9.png b/core/res/res/drawable-mdpi/btn_keyboard_key_light_normal_holo.9.png deleted file mode 100644 index 976083fdf909..000000000000 Binary files a/core/res/res/drawable-mdpi/btn_keyboard_key_light_normal_holo.9.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/btn_keyboard_key_light_pressed_holo.9.png b/core/res/res/drawable-mdpi/btn_keyboard_key_light_pressed_holo.9.png deleted file mode 100644 index c39dd4a94c52..000000000000 Binary files a/core/res/res/drawable-mdpi/btn_keyboard_key_light_pressed_holo.9.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/dropdown_disabled_focused_holo_dark.9.png b/core/res/res/drawable-mdpi/dropdown_disabled_focused_holo_dark.9.png deleted file mode 100644 index bc6636cc231a..000000000000 Binary files a/core/res/res/drawable-mdpi/dropdown_disabled_focused_holo_dark.9.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/dropdown_disabled_focused_holo_light.9.png b/core/res/res/drawable-mdpi/dropdown_disabled_focused_holo_light.9.png deleted file mode 100644 index 7f9a9f13e773..000000000000 Binary files a/core/res/res/drawable-mdpi/dropdown_disabled_focused_holo_light.9.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/dropdown_disabled_holo_dark.9.png b/core/res/res/drawable-mdpi/dropdown_disabled_holo_dark.9.png deleted file mode 100644 index 6af742a97285..000000000000 Binary files a/core/res/res/drawable-mdpi/dropdown_disabled_holo_dark.9.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/dropdown_disabled_holo_light.9.png b/core/res/res/drawable-mdpi/dropdown_disabled_holo_light.9.png deleted file mode 100644 index f54d0b4f1f9c..000000000000 Binary files a/core/res/res/drawable-mdpi/dropdown_disabled_holo_light.9.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/dropdown_focused_holo_dark.9.png b/core/res/res/drawable-mdpi/dropdown_focused_holo_dark.9.png deleted file mode 100644 index b7044db5121b..000000000000 Binary files a/core/res/res/drawable-mdpi/dropdown_focused_holo_dark.9.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/dropdown_focused_holo_light.9.png b/core/res/res/drawable-mdpi/dropdown_focused_holo_light.9.png deleted file mode 100644 index 0de1bb1bcb05..000000000000 Binary files a/core/res/res/drawable-mdpi/dropdown_focused_holo_light.9.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/dropdown_ic_arrow_disabled_focused_holo_dark.png b/core/res/res/drawable-mdpi/dropdown_ic_arrow_disabled_focused_holo_dark.png deleted file mode 100644 index 95e684a7ea5f..000000000000 Binary files a/core/res/res/drawable-mdpi/dropdown_ic_arrow_disabled_focused_holo_dark.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/dropdown_ic_arrow_disabled_focused_holo_light.png b/core/res/res/drawable-mdpi/dropdown_ic_arrow_disabled_focused_holo_light.png deleted file mode 100644 index ed3e2401cb15..000000000000 Binary files a/core/res/res/drawable-mdpi/dropdown_ic_arrow_disabled_focused_holo_light.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/dropdown_ic_arrow_disabled_holo_dark.png b/core/res/res/drawable-mdpi/dropdown_ic_arrow_disabled_holo_dark.png deleted file mode 100644 index 2bbfc3a89e0e..000000000000 Binary files a/core/res/res/drawable-mdpi/dropdown_ic_arrow_disabled_holo_dark.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/dropdown_ic_arrow_disabled_holo_light.png b/core/res/res/drawable-mdpi/dropdown_ic_arrow_disabled_holo_light.png deleted file mode 100644 index db6347b8db9d..000000000000 Binary files a/core/res/res/drawable-mdpi/dropdown_ic_arrow_disabled_holo_light.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/dropdown_ic_arrow_focused_holo_dark.png b/core/res/res/drawable-mdpi/dropdown_ic_arrow_focused_holo_dark.png deleted file mode 100644 index 9196b7254b6b..000000000000 Binary files a/core/res/res/drawable-mdpi/dropdown_ic_arrow_focused_holo_dark.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/dropdown_ic_arrow_focused_holo_light.png b/core/res/res/drawable-mdpi/dropdown_ic_arrow_focused_holo_light.png deleted file mode 100644 index 7c88a57e58eb..000000000000 Binary files a/core/res/res/drawable-mdpi/dropdown_ic_arrow_focused_holo_light.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/dropdown_ic_arrow_normal_holo_dark.png b/core/res/res/drawable-mdpi/dropdown_ic_arrow_normal_holo_dark.png deleted file mode 100644 index 81de1bb4610d..000000000000 Binary files a/core/res/res/drawable-mdpi/dropdown_ic_arrow_normal_holo_dark.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/dropdown_ic_arrow_normal_holo_light.png b/core/res/res/drawable-mdpi/dropdown_ic_arrow_normal_holo_light.png deleted file mode 100644 index c3fdef7bffb2..000000000000 Binary files a/core/res/res/drawable-mdpi/dropdown_ic_arrow_normal_holo_light.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/dropdown_ic_arrow_pressed_holo_dark.png b/core/res/res/drawable-mdpi/dropdown_ic_arrow_pressed_holo_dark.png deleted file mode 100644 index ef21dc26cabe..000000000000 Binary files a/core/res/res/drawable-mdpi/dropdown_ic_arrow_pressed_holo_dark.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/dropdown_ic_arrow_pressed_holo_light.png b/core/res/res/drawable-mdpi/dropdown_ic_arrow_pressed_holo_light.png deleted file mode 100644 index 5352c0247ca1..000000000000 Binary files a/core/res/res/drawable-mdpi/dropdown_ic_arrow_pressed_holo_light.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/dropdown_normal_holo_dark.9.png b/core/res/res/drawable-mdpi/dropdown_normal_holo_dark.9.png deleted file mode 100644 index 05d9e7e9b855..000000000000 Binary files a/core/res/res/drawable-mdpi/dropdown_normal_holo_dark.9.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/dropdown_normal_holo_light.9.png b/core/res/res/drawable-mdpi/dropdown_normal_holo_light.9.png deleted file mode 100644 index 4a15c63708a8..000000000000 Binary files a/core/res/res/drawable-mdpi/dropdown_normal_holo_light.9.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/dropdown_pressed_holo_dark.9.png b/core/res/res/drawable-mdpi/dropdown_pressed_holo_dark.9.png deleted file mode 100644 index 5248c48b1ecb..000000000000 Binary files a/core/res/res/drawable-mdpi/dropdown_pressed_holo_dark.9.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/dropdown_pressed_holo_light.9.png b/core/res/res/drawable-mdpi/dropdown_pressed_holo_light.9.png deleted file mode 100644 index f2f6428dee02..000000000000 Binary files a/core/res/res/drawable-mdpi/dropdown_pressed_holo_light.9.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/ic_jog_dial_answer.png b/core/res/res/drawable-mdpi/ic_jog_dial_answer.png deleted file mode 100644 index e2bc483de27a..000000000000 Binary files a/core/res/res/drawable-mdpi/ic_jog_dial_answer.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/ic_jog_dial_answer_and_end.png b/core/res/res/drawable-mdpi/ic_jog_dial_answer_and_end.png deleted file mode 100644 index aa0fab224b55..000000000000 Binary files a/core/res/res/drawable-mdpi/ic_jog_dial_answer_and_end.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/ic_jog_dial_answer_and_hold.png b/core/res/res/drawable-mdpi/ic_jog_dial_answer_and_hold.png deleted file mode 100644 index 9effe375c317..000000000000 Binary files a/core/res/res/drawable-mdpi/ic_jog_dial_answer_and_hold.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/ic_jog_dial_decline.png b/core/res/res/drawable-mdpi/ic_jog_dial_decline.png deleted file mode 100644 index 81c76b59a453..000000000000 Binary files a/core/res/res/drawable-mdpi/ic_jog_dial_decline.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/ic_jog_dial_sound_off.png b/core/res/res/drawable-mdpi/ic_jog_dial_sound_off.png deleted file mode 100644 index b9aec697961c..000000000000 Binary files a/core/res/res/drawable-mdpi/ic_jog_dial_sound_off.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/ic_jog_dial_sound_on.png b/core/res/res/drawable-mdpi/ic_jog_dial_sound_on.png deleted file mode 100644 index 4952746ae419..000000000000 Binary files a/core/res/res/drawable-mdpi/ic_jog_dial_sound_on.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/ic_jog_dial_unlock.png b/core/res/res/drawable-mdpi/ic_jog_dial_unlock.png deleted file mode 100644 index e697d91d2224..000000000000 Binary files a/core/res/res/drawable-mdpi/ic_jog_dial_unlock.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/ic_jog_dial_vibrate_on.png b/core/res/res/drawable-mdpi/ic_jog_dial_vibrate_on.png deleted file mode 100644 index 9aa9b133ac05..000000000000 Binary files a/core/res/res/drawable-mdpi/ic_jog_dial_vibrate_on.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/ic_menu_moreoverflow_focused_holo_dark.png b/core/res/res/drawable-mdpi/ic_menu_moreoverflow_focused_holo_dark.png deleted file mode 100644 index 48d6c78bbcbc..000000000000 Binary files a/core/res/res/drawable-mdpi/ic_menu_moreoverflow_focused_holo_dark.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/ic_menu_moreoverflow_focused_holo_light.png b/core/res/res/drawable-mdpi/ic_menu_moreoverflow_focused_holo_light.png deleted file mode 100644 index 50ff8fce6713..000000000000 Binary files a/core/res/res/drawable-mdpi/ic_menu_moreoverflow_focused_holo_light.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/stat_notify_missed_call.png b/core/res/res/drawable-mdpi/stat_notify_missed_call.png index f2ff56e21ba7..cd73b12e5569 100644 Binary files a/core/res/res/drawable-mdpi/stat_notify_missed_call.png and b/core/res/res/drawable-mdpi/stat_notify_missed_call.png differ diff --git a/core/res/res/drawable-mdpi/stat_sys_data_wimax_signal_3_fully.png b/core/res/res/drawable-mdpi/stat_sys_data_wimax_signal_3_fully.png deleted file mode 100644 index d3ba98c3ebc2..000000000000 Binary files a/core/res/res/drawable-mdpi/stat_sys_data_wimax_signal_3_fully.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/stat_sys_data_wimax_signal_disconnected.png b/core/res/res/drawable-mdpi/stat_sys_data_wimax_signal_disconnected.png deleted file mode 100644 index 153c6ad1f6cf..000000000000 Binary files a/core/res/res/drawable-mdpi/stat_sys_data_wimax_signal_disconnected.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/stat_sys_r_signal_0_cdma.png b/core/res/res/drawable-mdpi/stat_sys_r_signal_0_cdma.png deleted file mode 100644 index f39f5ba26ddb..000000000000 Binary files a/core/res/res/drawable-mdpi/stat_sys_r_signal_0_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/stat_sys_r_signal_1_cdma.png b/core/res/res/drawable-mdpi/stat_sys_r_signal_1_cdma.png deleted file mode 100644 index 86bb2def65ae..000000000000 Binary files a/core/res/res/drawable-mdpi/stat_sys_r_signal_1_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/stat_sys_r_signal_2_cdma.png b/core/res/res/drawable-mdpi/stat_sys_r_signal_2_cdma.png deleted file mode 100644 index b6eda0718931..000000000000 Binary files a/core/res/res/drawable-mdpi/stat_sys_r_signal_2_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/stat_sys_r_signal_3_cdma.png b/core/res/res/drawable-mdpi/stat_sys_r_signal_3_cdma.png deleted file mode 100644 index b7ca7f908e70..000000000000 Binary files a/core/res/res/drawable-mdpi/stat_sys_r_signal_3_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/stat_sys_r_signal_4_cdma.png b/core/res/res/drawable-mdpi/stat_sys_r_signal_4_cdma.png deleted file mode 100644 index 61a95753fa74..000000000000 Binary files a/core/res/res/drawable-mdpi/stat_sys_r_signal_4_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/stat_sys_ra_signal_0_cdma.png b/core/res/res/drawable-mdpi/stat_sys_ra_signal_0_cdma.png deleted file mode 100644 index feb4f2c0afc7..000000000000 Binary files a/core/res/res/drawable-mdpi/stat_sys_ra_signal_0_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/stat_sys_ra_signal_1_cdma.png b/core/res/res/drawable-mdpi/stat_sys_ra_signal_1_cdma.png deleted file mode 100644 index a42ff0c48188..000000000000 Binary files a/core/res/res/drawable-mdpi/stat_sys_ra_signal_1_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/stat_sys_ra_signal_2_cdma.png b/core/res/res/drawable-mdpi/stat_sys_ra_signal_2_cdma.png deleted file mode 100644 index e991c7688b32..000000000000 Binary files a/core/res/res/drawable-mdpi/stat_sys_ra_signal_2_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/stat_sys_ra_signal_3_cdma.png b/core/res/res/drawable-mdpi/stat_sys_ra_signal_3_cdma.png deleted file mode 100644 index 4b743fb5d857..000000000000 Binary files a/core/res/res/drawable-mdpi/stat_sys_ra_signal_3_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/stat_sys_ra_signal_4_cdma.png b/core/res/res/drawable-mdpi/stat_sys_ra_signal_4_cdma.png deleted file mode 100644 index 65172b76b7ca..000000000000 Binary files a/core/res/res/drawable-mdpi/stat_sys_ra_signal_4_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/stat_sys_signal_0_cdma.png b/core/res/res/drawable-mdpi/stat_sys_signal_0_cdma.png deleted file mode 100644 index 03c51ce3755c..000000000000 Binary files a/core/res/res/drawable-mdpi/stat_sys_signal_0_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/stat_sys_signal_1_cdma.png b/core/res/res/drawable-mdpi/stat_sys_signal_1_cdma.png deleted file mode 100644 index dced6df8ce83..000000000000 Binary files a/core/res/res/drawable-mdpi/stat_sys_signal_1_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/stat_sys_signal_2_cdma.png b/core/res/res/drawable-mdpi/stat_sys_signal_2_cdma.png deleted file mode 100644 index 9eac4c611620..000000000000 Binary files a/core/res/res/drawable-mdpi/stat_sys_signal_2_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/stat_sys_signal_3_cdma.png b/core/res/res/drawable-mdpi/stat_sys_signal_3_cdma.png deleted file mode 100644 index 74d983c408c6..000000000000 Binary files a/core/res/res/drawable-mdpi/stat_sys_signal_3_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/stat_sys_signal_4_cdma.png b/core/res/res/drawable-mdpi/stat_sys_signal_4_cdma.png deleted file mode 100644 index 8cc40b5248fb..000000000000 Binary files a/core/res/res/drawable-mdpi/stat_sys_signal_4_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/stat_sys_signal_evdo_0.png b/core/res/res/drawable-mdpi/stat_sys_signal_evdo_0.png deleted file mode 100644 index 177e0e9683ec..000000000000 Binary files a/core/res/res/drawable-mdpi/stat_sys_signal_evdo_0.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/stat_sys_signal_evdo_1.png b/core/res/res/drawable-mdpi/stat_sys_signal_evdo_1.png deleted file mode 100644 index 5f663192b0a1..000000000000 Binary files a/core/res/res/drawable-mdpi/stat_sys_signal_evdo_1.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/stat_sys_signal_evdo_2.png b/core/res/res/drawable-mdpi/stat_sys_signal_evdo_2.png deleted file mode 100644 index c3659128112c..000000000000 Binary files a/core/res/res/drawable-mdpi/stat_sys_signal_evdo_2.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/stat_sys_signal_evdo_3.png b/core/res/res/drawable-mdpi/stat_sys_signal_evdo_3.png deleted file mode 100644 index 58d631bcc938..000000000000 Binary files a/core/res/res/drawable-mdpi/stat_sys_signal_evdo_3.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/stat_sys_signal_evdo_4.png b/core/res/res/drawable-mdpi/stat_sys_signal_evdo_4.png deleted file mode 100644 index e63af68fd5d1..000000000000 Binary files a/core/res/res/drawable-mdpi/stat_sys_signal_evdo_4.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/tab_selected_holo.9.png b/core/res/res/drawable-mdpi/tab_selected_holo.9.png deleted file mode 100644 index 587337caf74f..000000000000 Binary files a/core/res/res/drawable-mdpi/tab_selected_holo.9.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/textfield_bg_activated_holo_dark.9.png b/core/res/res/drawable-mdpi/textfield_bg_activated_holo_dark.9.png deleted file mode 100644 index a233b0d7079c..000000000000 Binary files a/core/res/res/drawable-mdpi/textfield_bg_activated_holo_dark.9.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/textfield_bg_default_holo_dark.9.png b/core/res/res/drawable-mdpi/textfield_bg_default_holo_dark.9.png deleted file mode 100644 index 403f5021163b..000000000000 Binary files a/core/res/res/drawable-mdpi/textfield_bg_default_holo_dark.9.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/textfield_bg_disabled_focused_holo_dark.9.png b/core/res/res/drawable-mdpi/textfield_bg_disabled_focused_holo_dark.9.png deleted file mode 100644 index 0ded801333d5..000000000000 Binary files a/core/res/res/drawable-mdpi/textfield_bg_disabled_focused_holo_dark.9.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/textfield_bg_disabled_holo_dark.9.png b/core/res/res/drawable-mdpi/textfield_bg_disabled_holo_dark.9.png deleted file mode 100644 index 27237b8fe068..000000000000 Binary files a/core/res/res/drawable-mdpi/textfield_bg_disabled_holo_dark.9.png and /dev/null differ diff --git a/core/res/res/drawable-mdpi/textfield_bg_focused_holo_dark.9.png b/core/res/res/drawable-mdpi/textfield_bg_focused_holo_dark.9.png deleted file mode 100644 index 0e451f1733d6..000000000000 Binary files a/core/res/res/drawable-mdpi/textfield_bg_focused_holo_dark.9.png and /dev/null differ diff --git a/core/res/res/drawable-nodpi/default_wallpaper.png b/core/res/res/drawable-nodpi/default_wallpaper.png deleted file mode 100644 index ce546f0a11e7..000000000000 Binary files a/core/res/res/drawable-nodpi/default_wallpaper.png and /dev/null differ diff --git a/core/res/res/drawable-sw600dp-nodpi/default_wallpaper.png b/core/res/res/drawable-sw600dp-nodpi/default_wallpaper.png deleted file mode 100644 index af8e2512385a..000000000000 Binary files a/core/res/res/drawable-sw600dp-nodpi/default_wallpaper.png and /dev/null differ diff --git a/core/res/res/drawable-sw720dp-nodpi/default_wallpaper.png b/core/res/res/drawable-sw720dp-nodpi/default_wallpaper.png deleted file mode 100644 index cb00d82a826f..000000000000 Binary files a/core/res/res/drawable-sw720dp-nodpi/default_wallpaper.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/battery_charge_background.png b/core/res/res/drawable-xhdpi/battery_charge_background.png deleted file mode 100644 index 84b168c74b37..000000000000 Binary files a/core/res/res/drawable-xhdpi/battery_charge_background.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/btn_keyboard_key_dark_normal_holo.9.png b/core/res/res/drawable-xhdpi/btn_keyboard_key_dark_normal_holo.9.png deleted file mode 100644 index d2cd029bb6b7..000000000000 Binary files a/core/res/res/drawable-xhdpi/btn_keyboard_key_dark_normal_holo.9.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/btn_keyboard_key_dark_normal_off_holo.9.png b/core/res/res/drawable-xhdpi/btn_keyboard_key_dark_normal_off_holo.9.png deleted file mode 100644 index 0f709eb02f05..000000000000 Binary files a/core/res/res/drawable-xhdpi/btn_keyboard_key_dark_normal_off_holo.9.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/btn_keyboard_key_dark_normal_on_holo.9.png b/core/res/res/drawable-xhdpi/btn_keyboard_key_dark_normal_on_holo.9.png deleted file mode 100644 index 2f4de8ee74ee..000000000000 Binary files a/core/res/res/drawable-xhdpi/btn_keyboard_key_dark_normal_on_holo.9.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/btn_keyboard_key_dark_pressed_holo.9.png b/core/res/res/drawable-xhdpi/btn_keyboard_key_dark_pressed_holo.9.png deleted file mode 100644 index 3871689ef23c..000000000000 Binary files a/core/res/res/drawable-xhdpi/btn_keyboard_key_dark_pressed_holo.9.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/btn_keyboard_key_dark_pressed_off_holo.9.png b/core/res/res/drawable-xhdpi/btn_keyboard_key_dark_pressed_off_holo.9.png deleted file mode 100644 index 836ea6e789cf..000000000000 Binary files a/core/res/res/drawable-xhdpi/btn_keyboard_key_dark_pressed_off_holo.9.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/btn_keyboard_key_dark_pressed_on_holo.9.png b/core/res/res/drawable-xhdpi/btn_keyboard_key_dark_pressed_on_holo.9.png deleted file mode 100644 index 279db1f92e8f..000000000000 Binary files a/core/res/res/drawable-xhdpi/btn_keyboard_key_dark_pressed_on_holo.9.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/btn_keyboard_key_light_normal_holo.9.png b/core/res/res/drawable-xhdpi/btn_keyboard_key_light_normal_holo.9.png deleted file mode 100644 index b26f1d27a87a..000000000000 Binary files a/core/res/res/drawable-xhdpi/btn_keyboard_key_light_normal_holo.9.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/btn_keyboard_key_light_pressed_holo.9.png b/core/res/res/drawable-xhdpi/btn_keyboard_key_light_pressed_holo.9.png deleted file mode 100644 index c23a4b22578d..000000000000 Binary files a/core/res/res/drawable-xhdpi/btn_keyboard_key_light_pressed_holo.9.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/dropdown_disabled_focused_holo_dark.9.png b/core/res/res/drawable-xhdpi/dropdown_disabled_focused_holo_dark.9.png deleted file mode 100644 index b5d226a13e6a..000000000000 Binary files a/core/res/res/drawable-xhdpi/dropdown_disabled_focused_holo_dark.9.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/dropdown_disabled_focused_holo_light.9.png b/core/res/res/drawable-xhdpi/dropdown_disabled_focused_holo_light.9.png deleted file mode 100644 index af855619397b..000000000000 Binary files a/core/res/res/drawable-xhdpi/dropdown_disabled_focused_holo_light.9.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/dropdown_disabled_holo_dark.9.png b/core/res/res/drawable-xhdpi/dropdown_disabled_holo_dark.9.png deleted file mode 100644 index bf01b0af9b38..000000000000 Binary files a/core/res/res/drawable-xhdpi/dropdown_disabled_holo_dark.9.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/dropdown_disabled_holo_light.9.png b/core/res/res/drawable-xhdpi/dropdown_disabled_holo_light.9.png deleted file mode 100644 index f4effa1903b1..000000000000 Binary files a/core/res/res/drawable-xhdpi/dropdown_disabled_holo_light.9.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/dropdown_focused_holo_dark.9.png b/core/res/res/drawable-xhdpi/dropdown_focused_holo_dark.9.png deleted file mode 100644 index ce31d0fb3b34..000000000000 Binary files a/core/res/res/drawable-xhdpi/dropdown_focused_holo_dark.9.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/dropdown_focused_holo_light.9.png b/core/res/res/drawable-xhdpi/dropdown_focused_holo_light.9.png deleted file mode 100644 index 45961712bffc..000000000000 Binary files a/core/res/res/drawable-xhdpi/dropdown_focused_holo_light.9.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/dropdown_ic_arrow_disabled_focused_holo_dark.png b/core/res/res/drawable-xhdpi/dropdown_ic_arrow_disabled_focused_holo_dark.png deleted file mode 100644 index adb6c36cb037..000000000000 Binary files a/core/res/res/drawable-xhdpi/dropdown_ic_arrow_disabled_focused_holo_dark.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/dropdown_ic_arrow_disabled_focused_holo_light.png b/core/res/res/drawable-xhdpi/dropdown_ic_arrow_disabled_focused_holo_light.png deleted file mode 100644 index a1075d5c9e47..000000000000 Binary files a/core/res/res/drawable-xhdpi/dropdown_ic_arrow_disabled_focused_holo_light.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/dropdown_ic_arrow_disabled_holo_dark.png b/core/res/res/drawable-xhdpi/dropdown_ic_arrow_disabled_holo_dark.png deleted file mode 100644 index 782325ffb625..000000000000 Binary files a/core/res/res/drawable-xhdpi/dropdown_ic_arrow_disabled_holo_dark.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/dropdown_ic_arrow_disabled_holo_light.png b/core/res/res/drawable-xhdpi/dropdown_ic_arrow_disabled_holo_light.png deleted file mode 100644 index 195ecbb7057f..000000000000 Binary files a/core/res/res/drawable-xhdpi/dropdown_ic_arrow_disabled_holo_light.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/dropdown_ic_arrow_focused_holo_light.png b/core/res/res/drawable-xhdpi/dropdown_ic_arrow_focused_holo_light.png deleted file mode 100644 index 988e3f4353d3..000000000000 Binary files a/core/res/res/drawable-xhdpi/dropdown_ic_arrow_focused_holo_light.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/dropdown_ic_arrow_normal_holo_dark.png b/core/res/res/drawable-xhdpi/dropdown_ic_arrow_normal_holo_dark.png deleted file mode 100644 index 36d8cf47ee09..000000000000 Binary files a/core/res/res/drawable-xhdpi/dropdown_ic_arrow_normal_holo_dark.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/dropdown_ic_arrow_normal_holo_light.png b/core/res/res/drawable-xhdpi/dropdown_ic_arrow_normal_holo_light.png deleted file mode 100644 index a931132bfb20..000000000000 Binary files a/core/res/res/drawable-xhdpi/dropdown_ic_arrow_normal_holo_light.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/dropdown_ic_arrow_pressed_holo_light.png b/core/res/res/drawable-xhdpi/dropdown_ic_arrow_pressed_holo_light.png deleted file mode 100644 index 833bc1314aee..000000000000 Binary files a/core/res/res/drawable-xhdpi/dropdown_ic_arrow_pressed_holo_light.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/dropdown_normal_holo_dark.9.png b/core/res/res/drawable-xhdpi/dropdown_normal_holo_dark.9.png deleted file mode 100644 index ca18b0dafff1..000000000000 Binary files a/core/res/res/drawable-xhdpi/dropdown_normal_holo_dark.9.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/dropdown_normal_holo_light.9.png b/core/res/res/drawable-xhdpi/dropdown_normal_holo_light.9.png deleted file mode 100644 index 37ad0e001ff5..000000000000 Binary files a/core/res/res/drawable-xhdpi/dropdown_normal_holo_light.9.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/dropdown_pressed_holo_dark.9.png b/core/res/res/drawable-xhdpi/dropdown_pressed_holo_dark.9.png deleted file mode 100644 index bdee422dce77..000000000000 Binary files a/core/res/res/drawable-xhdpi/dropdown_pressed_holo_dark.9.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/dropdown_pressed_holo_light.9.png b/core/res/res/drawable-xhdpi/dropdown_pressed_holo_light.9.png deleted file mode 100644 index 12ea0548806a..000000000000 Binary files a/core/res/res/drawable-xhdpi/dropdown_pressed_holo_light.9.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/ic_jog_dial_answer.png b/core/res/res/drawable-xhdpi/ic_jog_dial_answer.png deleted file mode 100644 index eedb7fd76e36..000000000000 Binary files a/core/res/res/drawable-xhdpi/ic_jog_dial_answer.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/ic_jog_dial_answer_and_end.png b/core/res/res/drawable-xhdpi/ic_jog_dial_answer_and_end.png deleted file mode 100644 index 829973e1405b..000000000000 Binary files a/core/res/res/drawable-xhdpi/ic_jog_dial_answer_and_end.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/ic_jog_dial_answer_and_hold.png b/core/res/res/drawable-xhdpi/ic_jog_dial_answer_and_hold.png deleted file mode 100644 index e8336d06c3cb..000000000000 Binary files a/core/res/res/drawable-xhdpi/ic_jog_dial_answer_and_hold.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/ic_jog_dial_decline.png b/core/res/res/drawable-xhdpi/ic_jog_dial_decline.png deleted file mode 100644 index 7cab5f5ff5af..000000000000 Binary files a/core/res/res/drawable-xhdpi/ic_jog_dial_decline.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/ic_jog_dial_sound_off.png b/core/res/res/drawable-xhdpi/ic_jog_dial_sound_off.png deleted file mode 100644 index 65aa39bf6c14..000000000000 Binary files a/core/res/res/drawable-xhdpi/ic_jog_dial_sound_off.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/ic_jog_dial_sound_on.png b/core/res/res/drawable-xhdpi/ic_jog_dial_sound_on.png deleted file mode 100644 index ce8f3a7c5ef7..000000000000 Binary files a/core/res/res/drawable-xhdpi/ic_jog_dial_sound_on.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/ic_jog_dial_unlock.png b/core/res/res/drawable-xhdpi/ic_jog_dial_unlock.png deleted file mode 100644 index 5d6fb7b307d8..000000000000 Binary files a/core/res/res/drawable-xhdpi/ic_jog_dial_unlock.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/ic_jog_dial_vibrate_on.png b/core/res/res/drawable-xhdpi/ic_jog_dial_vibrate_on.png deleted file mode 100644 index 6fe8b7767d77..000000000000 Binary files a/core/res/res/drawable-xhdpi/ic_jog_dial_vibrate_on.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/ic_menu_moreoverflow_focused_holo_dark.png b/core/res/res/drawable-xhdpi/ic_menu_moreoverflow_focused_holo_dark.png deleted file mode 100644 index 62659faca384..000000000000 Binary files a/core/res/res/drawable-xhdpi/ic_menu_moreoverflow_focused_holo_dark.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/ic_menu_moreoverflow_focused_holo_light.png b/core/res/res/drawable-xhdpi/ic_menu_moreoverflow_focused_holo_light.png deleted file mode 100644 index 341edaf67309..000000000000 Binary files a/core/res/res/drawable-xhdpi/ic_menu_moreoverflow_focused_holo_light.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/stat_notify_missed_call.png b/core/res/res/drawable-xhdpi/stat_notify_missed_call.png index 8719eff5ae1a..b0f2b87538df 100644 Binary files a/core/res/res/drawable-xhdpi/stat_notify_missed_call.png and b/core/res/res/drawable-xhdpi/stat_notify_missed_call.png differ diff --git a/core/res/res/drawable-xhdpi/stat_sys_data_wimax_signal_3_fully.png b/core/res/res/drawable-xhdpi/stat_sys_data_wimax_signal_3_fully.png deleted file mode 100644 index ec6bc54d77e2..000000000000 Binary files a/core/res/res/drawable-xhdpi/stat_sys_data_wimax_signal_3_fully.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/stat_sys_data_wimax_signal_disconnected.png b/core/res/res/drawable-xhdpi/stat_sys_data_wimax_signal_disconnected.png deleted file mode 100644 index 9fd4f33bbf78..000000000000 Binary files a/core/res/res/drawable-xhdpi/stat_sys_data_wimax_signal_disconnected.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/stat_sys_r_signal_0_cdma.png b/core/res/res/drawable-xhdpi/stat_sys_r_signal_0_cdma.png deleted file mode 100644 index 99ce37895afc..000000000000 Binary files a/core/res/res/drawable-xhdpi/stat_sys_r_signal_0_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/stat_sys_r_signal_1_cdma.png b/core/res/res/drawable-xhdpi/stat_sys_r_signal_1_cdma.png deleted file mode 100644 index e4301142dc35..000000000000 Binary files a/core/res/res/drawable-xhdpi/stat_sys_r_signal_1_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/stat_sys_r_signal_2_cdma.png b/core/res/res/drawable-xhdpi/stat_sys_r_signal_2_cdma.png deleted file mode 100644 index 42418962e549..000000000000 Binary files a/core/res/res/drawable-xhdpi/stat_sys_r_signal_2_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/stat_sys_r_signal_3_cdma.png b/core/res/res/drawable-xhdpi/stat_sys_r_signal_3_cdma.png deleted file mode 100644 index 3195feeb84d8..000000000000 Binary files a/core/res/res/drawable-xhdpi/stat_sys_r_signal_3_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/stat_sys_r_signal_4_cdma.png b/core/res/res/drawable-xhdpi/stat_sys_r_signal_4_cdma.png deleted file mode 100644 index 3cb54634e0fc..000000000000 Binary files a/core/res/res/drawable-xhdpi/stat_sys_r_signal_4_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/stat_sys_ra_signal_0_cdma.png b/core/res/res/drawable-xhdpi/stat_sys_ra_signal_0_cdma.png deleted file mode 100644 index 5f9a46bd1dec..000000000000 Binary files a/core/res/res/drawable-xhdpi/stat_sys_ra_signal_0_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/stat_sys_ra_signal_1_cdma.png b/core/res/res/drawable-xhdpi/stat_sys_ra_signal_1_cdma.png deleted file mode 100644 index da5d09cf58ba..000000000000 Binary files a/core/res/res/drawable-xhdpi/stat_sys_ra_signal_1_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/stat_sys_ra_signal_2_cdma.png b/core/res/res/drawable-xhdpi/stat_sys_ra_signal_2_cdma.png deleted file mode 100644 index 8cd6e0842f28..000000000000 Binary files a/core/res/res/drawable-xhdpi/stat_sys_ra_signal_2_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/stat_sys_ra_signal_3_cdma.png b/core/res/res/drawable-xhdpi/stat_sys_ra_signal_3_cdma.png deleted file mode 100644 index 6c6868019764..000000000000 Binary files a/core/res/res/drawable-xhdpi/stat_sys_ra_signal_3_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/stat_sys_ra_signal_4_cdma.png b/core/res/res/drawable-xhdpi/stat_sys_ra_signal_4_cdma.png deleted file mode 100644 index 5cf6e9c61cef..000000000000 Binary files a/core/res/res/drawable-xhdpi/stat_sys_ra_signal_4_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/stat_sys_signal_0_cdma.png b/core/res/res/drawable-xhdpi/stat_sys_signal_0_cdma.png deleted file mode 100644 index 28815f14aa2a..000000000000 Binary files a/core/res/res/drawable-xhdpi/stat_sys_signal_0_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/stat_sys_signal_1_cdma.png b/core/res/res/drawable-xhdpi/stat_sys_signal_1_cdma.png deleted file mode 100644 index 1643c1011f8a..000000000000 Binary files a/core/res/res/drawable-xhdpi/stat_sys_signal_1_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/stat_sys_signal_2_cdma.png b/core/res/res/drawable-xhdpi/stat_sys_signal_2_cdma.png deleted file mode 100644 index 0f5a1478d359..000000000000 Binary files a/core/res/res/drawable-xhdpi/stat_sys_signal_2_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/stat_sys_signal_3_cdma.png b/core/res/res/drawable-xhdpi/stat_sys_signal_3_cdma.png deleted file mode 100644 index d37f761be94e..000000000000 Binary files a/core/res/res/drawable-xhdpi/stat_sys_signal_3_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/stat_sys_signal_4_cdma.png b/core/res/res/drawable-xhdpi/stat_sys_signal_4_cdma.png deleted file mode 100644 index f4b835f6484c..000000000000 Binary files a/core/res/res/drawable-xhdpi/stat_sys_signal_4_cdma.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/stat_sys_signal_evdo_0.png b/core/res/res/drawable-xhdpi/stat_sys_signal_evdo_0.png deleted file mode 100644 index dc5196c75d8e..000000000000 Binary files a/core/res/res/drawable-xhdpi/stat_sys_signal_evdo_0.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/stat_sys_signal_evdo_1.png b/core/res/res/drawable-xhdpi/stat_sys_signal_evdo_1.png deleted file mode 100644 index 5da3b3a5e1b1..000000000000 Binary files a/core/res/res/drawable-xhdpi/stat_sys_signal_evdo_1.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/stat_sys_signal_evdo_2.png b/core/res/res/drawable-xhdpi/stat_sys_signal_evdo_2.png deleted file mode 100644 index d17890de80d2..000000000000 Binary files a/core/res/res/drawable-xhdpi/stat_sys_signal_evdo_2.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/stat_sys_signal_evdo_3.png b/core/res/res/drawable-xhdpi/stat_sys_signal_evdo_3.png deleted file mode 100644 index 2dbe7599d456..000000000000 Binary files a/core/res/res/drawable-xhdpi/stat_sys_signal_evdo_3.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/stat_sys_signal_evdo_4.png b/core/res/res/drawable-xhdpi/stat_sys_signal_evdo_4.png deleted file mode 100644 index 796f9edc0232..000000000000 Binary files a/core/res/res/drawable-xhdpi/stat_sys_signal_evdo_4.png and /dev/null differ diff --git a/core/res/res/drawable-xhdpi/tab_selected_holo.9.png b/core/res/res/drawable-xhdpi/tab_selected_holo.9.png deleted file mode 100644 index e4229f26b277..000000000000 Binary files a/core/res/res/drawable-xhdpi/tab_selected_holo.9.png and /dev/null differ diff --git a/core/res/res/drawable-xxhdpi/ic_menu_moreoverflow_focused_holo_dark.png b/core/res/res/drawable-xxhdpi/ic_menu_moreoverflow_focused_holo_dark.png deleted file mode 100644 index 9cddee433dce..000000000000 Binary files a/core/res/res/drawable-xxhdpi/ic_menu_moreoverflow_focused_holo_dark.png and /dev/null differ diff --git a/core/res/res/drawable-xxhdpi/ic_menu_moreoverflow_focused_holo_light.png b/core/res/res/drawable-xxhdpi/ic_menu_moreoverflow_focused_holo_light.png deleted file mode 100644 index 826e724f7714..000000000000 Binary files a/core/res/res/drawable-xxhdpi/ic_menu_moreoverflow_focused_holo_light.png and /dev/null differ diff --git a/core/res/res/drawable-xxhdpi/stat_notify_missed_call.png b/core/res/res/drawable-xxhdpi/stat_notify_missed_call.png index 904df3baa20d..f8c6f9b14c67 100644 Binary files a/core/res/res/drawable-xxhdpi/stat_notify_missed_call.png and b/core/res/res/drawable-xxhdpi/stat_notify_missed_call.png differ diff --git a/core/res/res/drawable-xxhdpi/stat_sys_data_wimax_signal_3_fully.png b/core/res/res/drawable-xxhdpi/stat_sys_data_wimax_signal_3_fully.png deleted file mode 100644 index aeccbd63813e..000000000000 Binary files a/core/res/res/drawable-xxhdpi/stat_sys_data_wimax_signal_3_fully.png and /dev/null differ diff --git a/core/res/res/drawable-xxhdpi/stat_sys_data_wimax_signal_disconnected.png b/core/res/res/drawable-xxhdpi/stat_sys_data_wimax_signal_disconnected.png deleted file mode 100644 index 3cdc45d1041f..000000000000 Binary files a/core/res/res/drawable-xxhdpi/stat_sys_data_wimax_signal_disconnected.png and /dev/null differ diff --git a/core/res/res/drawable-xxhdpi/tab_selected_holo.9.png b/core/res/res/drawable-xxhdpi/tab_selected_holo.9.png deleted file mode 100644 index bee35cad65f6..000000000000 Binary files a/core/res/res/drawable-xxhdpi/tab_selected_holo.9.png and /dev/null differ diff --git a/core/res/res/drawable/btn_keyboard_key_ics.xml b/core/res/res/drawable/btn_keyboard_key_ics.xml deleted file mode 100644 index 7335cc2991b8..000000000000 --- a/core/res/res/drawable/btn_keyboard_key_ics.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/core/res/res/drawable/ic_audio_notification_mute_new.xml b/core/res/res/drawable/ic_audio_notification_mute_new.xml new file mode 100644 index 000000000000..0f79d4d27bd3 --- /dev/null +++ b/core/res/res/drawable/ic_audio_notification_mute_new.xml @@ -0,0 +1,50 @@ + + + + diff --git a/core/res/res/drawable/ic_audio_notification_new.xml b/core/res/res/drawable/ic_audio_notification_new.xml new file mode 100644 index 000000000000..98df869e4589 --- /dev/null +++ b/core/res/res/drawable/ic_audio_notification_new.xml @@ -0,0 +1,25 @@ + + + + diff --git a/core/res/res/drawable/progress_large.xml b/core/res/res/drawable/progress_large.xml index 4f016bcc2e83..44b410393182 100644 --- a/core/res/res/drawable/progress_large.xml +++ b/core/res/res/drawable/progress_large.xml @@ -21,5 +21,5 @@ android:drawable="@drawable/spinner_black_76" android:pivotX="50%" android:pivotY="50%" - android:framesCount="12" - android:frameDuration="100" /> + android:framesCount="48" + android:frameDuration="25" /> diff --git a/core/res/res/drawable/progress_large_white.xml b/core/res/res/drawable/progress_large_white.xml index c690ed4e0e9a..6c2388c680a3 100644 --- a/core/res/res/drawable/progress_large_white.xml +++ b/core/res/res/drawable/progress_large_white.xml @@ -21,5 +21,5 @@ android:drawable="@drawable/spinner_white_76" android:pivotX="50%" android:pivotY="50%" - android:framesCount="12" - android:frameDuration="100" /> + android:framesCount="48" + android:frameDuration="25" /> diff --git a/core/res/res/drawable/progress_medium.xml b/core/res/res/drawable/progress_medium.xml index eb1bd50d17d7..82ad686b6739 100644 --- a/core/res/res/drawable/progress_medium.xml +++ b/core/res/res/drawable/progress_medium.xml @@ -21,5 +21,5 @@ android:drawable="@drawable/spinner_black_48" android:pivotX="50%" android:pivotY="50%" - android:framesCount="12" - android:frameDuration="100" /> + android:framesCount="48" + android:frameDuration="25" /> diff --git a/core/res/res/drawable/progress_medium_white.xml b/core/res/res/drawable/progress_medium_white.xml index b4f9b318a902..886ee05bc9c7 100644 --- a/core/res/res/drawable/progress_medium_white.xml +++ b/core/res/res/drawable/progress_medium_white.xml @@ -21,5 +21,5 @@ android:drawable="@drawable/spinner_white_48" android:pivotX="50%" android:pivotY="50%" - android:framesCount="12" - android:frameDuration="100" /> + android:framesCount="48" + android:frameDuration="25" /> diff --git a/core/res/res/drawable/progress_small.xml b/core/res/res/drawable/progress_small.xml index e0ee5e47d830..1881da384892 100644 --- a/core/res/res/drawable/progress_small.xml +++ b/core/res/res/drawable/progress_small.xml @@ -21,5 +21,5 @@ android:drawable="@drawable/spinner_black_16" android:pivotX="50%" android:pivotY="50%" - android:framesCount="12" - android:frameDuration="100" /> + android:framesCount="48" + android:frameDuration="25" /> diff --git a/core/res/res/drawable/progress_small_titlebar.xml b/core/res/res/drawable/progress_small_titlebar.xml index 8cfba864b5b2..5bb5cf8749dc 100644 --- a/core/res/res/drawable/progress_small_titlebar.xml +++ b/core/res/res/drawable/progress_small_titlebar.xml @@ -21,5 +21,5 @@ android:drawable="@drawable/spinner_white_16" android:pivotX="50%" android:pivotY="50%" - android:framesCount="12" - android:frameDuration="100" /> + android:framesCount="48" + android:frameDuration="25" /> diff --git a/core/res/res/drawable/progress_small_white.xml b/core/res/res/drawable/progress_small_white.xml index 8cfba864b5b2..5bb5cf8749dc 100644 --- a/core/res/res/drawable/progress_small_white.xml +++ b/core/res/res/drawable/progress_small_white.xml @@ -21,5 +21,5 @@ android:drawable="@drawable/spinner_white_16" android:pivotX="50%" android:pivotY="50%" - android:framesCount="12" - android:frameDuration="100" /> + android:framesCount="48" + android:frameDuration="25" /> diff --git a/core/res/res/drawable/search_spinner.xml b/core/res/res/drawable/search_spinner.xml index 31a77c30cf2a..b8c8b09fa882 100644 --- a/core/res/res/drawable/search_spinner.xml +++ b/core/res/res/drawable/search_spinner.xml @@ -21,5 +21,5 @@ android:drawable="@drawable/spinner_black_20" android:pivotX="50%" android:pivotY="50%" - android:framesCount="12" - android:frameDuration="100" /> + android:framesCount="48" + android:frameDuration="25" /> diff --git a/core/res/res/drawable/tab_selected_holo.xml b/core/res/res/drawable/tab_selected_holo.xml new file mode 100644 index 000000000000..af20790beb5c --- /dev/null +++ b/core/res/res/drawable/tab_selected_holo.xml @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/core/res/res/layout/chooser_grid.xml b/core/res/res/layout/chooser_grid.xml index 7dee2af3abbd..13bc8129d543 100644 --- a/core/res/res/layout/chooser_grid.xml +++ b/core/res/res/layout/chooser_grid.xml @@ -31,7 +31,7 @@ android:layout_alwaysShow="true" android:elevation="8dp" android:paddingStart="16dp" - android:background="@color/white" > + android:background="@color/resolver_list_bg" > - - + + - + + - - - - \ No newline at end of file + android:layout_gravity="top|center_horizontal" + android:gravity="center" + android:textColor="?android:attr/textColorTertiary" + android:textAppearance="?android:attr/textAppearanceSmall" + /> + diff --git a/core/res/res/layout/global_actions_silent_mode.xml b/core/res/res/layout/global_actions_silent_mode.xml index a3586232a152..dbdb638a37df 100644 --- a/core/res/res/layout/global_actions_silent_mode.xml +++ b/core/res/res/layout/global_actions_silent_mode.xml @@ -17,26 +17,26 @@ - \ No newline at end of file + diff --git a/core/res/res/layout/resolver_different_item_header.xml b/core/res/res/layout/resolver_different_item_header.xml index 58891363e201..201c8c686fe0 100644 --- a/core/res/res/layout/resolver_different_item_header.xml +++ b/core/res/res/layout/resolver_different_item_header.xml @@ -29,6 +29,6 @@ android:paddingEnd="16dp" android:paddingTop="8dp" android:paddingBottom="8dp" - android:background="@color/white" + android:background="@color/resolver_list_bg" android:elevation="8dp" /> diff --git a/core/res/res/layout/resolver_list.xml b/core/res/res/layout/resolver_list.xml index 40c994196137..92540e19d182 100644 --- a/core/res/res/layout/resolver_list.xml +++ b/core/res/res/layout/resolver_list.xml @@ -30,7 +30,7 @@ android:layout_height="wrap_content" android:layout_alwaysShow="true" android:elevation="8dp" - android:background="@color/white"> + android:background="@color/resolver_list_bg">