Merge "Change the NetworkInfo for disconnected types." into lmp-dev
diff --git a/api/current.txt b/api/current.txt
index 5b8ba4d..de3723c 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -309,6 +309,7 @@
field public static final int addStatesFromChildren = 16842992; // 0x10100f0
field public static final int adjustViewBounds = 16843038; // 0x101011e
field public static final int advancedPrintOptionsActivity = 16843761; // 0x10103f1
+ field public static final int ageHint = 16843962; // 0x10104ba
field public static final int alertDialogIcon = 16843605; // 0x1010355
field public static final int alertDialogStyle = 16842845; // 0x101005d
field public static final int alertDialogTheme = 16843529; // 0x1010309
@@ -467,6 +468,7 @@
field public static final int controlX2 = 16843800; // 0x1010418
field public static final int controlY1 = 16843799; // 0x1010417
field public static final int controlY2 = 16843801; // 0x1010419
+ field public static final int country = 16843963; // 0x10104bb
field public static final int cropToPadding = 16843043; // 0x1010123
field public static final int cursorVisible = 16843090; // 0x1010152
field public static final int customNavigationLayout = 16843474; // 0x10102d2
@@ -3593,8 +3595,11 @@
}
public class ActivityManager {
+ method public int addAppTask(android.app.Activity, android.content.Intent, android.app.ActivityManager.TaskDescription, android.graphics.Bitmap);
method public boolean clearApplicationUserData();
method public void dumpPackageState(java.io.FileDescriptor, java.lang.String);
+ method public int getAppTaskThumbnailHeight();
+ method public int getAppTaskThumbnailWidth();
method public java.util.List<android.app.ActivityManager.AppTask> getAppTasks();
method public android.content.pm.ConfigurationInfo getDeviceConfigurationInfo();
method public int getLargeMemoryClass();
@@ -3628,6 +3633,7 @@
public static class ActivityManager.AppTask {
method public void finishAndRemoveTask();
method public android.app.ActivityManager.RecentTaskInfo getTaskInfo();
+ method public void setExcludeFromRecents(boolean);
}
public static class ActivityManager.MemoryInfo implements android.os.Parcelable {
@@ -5410,7 +5416,6 @@
method public java.lang.String[] getAccountTypesWithManagementDisabled();
method public java.util.List<android.content.ComponentName> getActiveAdmins();
method public android.os.Bundle getApplicationRestrictions(android.content.ComponentName, java.lang.String);
- method public boolean getBlockUninstall(android.content.ComponentName, java.lang.String);
method public boolean getCameraDisabled(android.content.ComponentName);
method public boolean getCrossProfileCallerIdDisabled(android.content.ComponentName);
method public java.util.List<java.lang.String> getCrossProfileWidgetProviders(android.content.ComponentName);
@@ -5431,10 +5436,13 @@
method public int getPasswordMinimumSymbols(android.content.ComponentName);
method public int getPasswordMinimumUpperCase(android.content.ComponentName);
method public int getPasswordQuality(android.content.ComponentName);
+ method public java.util.List<java.lang.String> getPermittedAccessibilityServices(android.content.ComponentName);
+ method public java.util.List<java.lang.String> getPermittedInputMethods(android.content.ComponentName);
method public boolean getScreenCaptureDisabled(android.content.ComponentName);
method public boolean getStorageEncryption(android.content.ComponentName);
method public int getStorageEncryptionStatus();
method public java.util.List<java.lang.String> getTrustAgentFeaturesEnabled(android.content.ComponentName, android.content.ComponentName);
+ method public boolean getUninstallBlocked(android.content.ComponentName, java.lang.String);
method public boolean hasCaCertInstalled(byte[]);
method public boolean hasGrantedPolicy(android.content.ComponentName, int);
method public boolean installCaCert(android.content.ComponentName, byte[]);
@@ -5453,8 +5461,6 @@
method public void setAccountManagementDisabled(android.content.ComponentName, java.lang.String, boolean);
method public boolean setApplicationHidden(android.content.ComponentName, java.lang.String, boolean);
method public void setApplicationRestrictions(android.content.ComponentName, java.lang.String, android.os.Bundle);
- method public int setApplicationsHidden(android.content.ComponentName, android.content.Intent, boolean);
- method public void setBlockUninstall(android.content.ComponentName, java.lang.String, boolean);
method public void setCameraDisabled(android.content.ComponentName, boolean);
method public void setCrossProfileCallerIdDisabled(android.content.ComponentName, boolean);
method public void setGlobalSetting(android.content.ComponentName, java.lang.String, java.lang.String);
@@ -5473,6 +5479,8 @@
method public void setPasswordMinimumSymbols(android.content.ComponentName, int);
method public void setPasswordMinimumUpperCase(android.content.ComponentName, int);
method public void setPasswordQuality(android.content.ComponentName, int);
+ method public boolean setPermittedAccessibilityServices(android.content.ComponentName, java.util.List<java.lang.String>);
+ method public boolean setPermittedInputMethods(android.content.ComponentName, java.util.List<java.lang.String>);
method public void setProfileEnabled(android.content.ComponentName);
method public void setProfileName(android.content.ComponentName, java.lang.String);
method public void setRecommendedGlobalProxy(android.content.ComponentName, android.net.ProxyInfo);
@@ -5481,6 +5489,7 @@
method public void setSecureSetting(android.content.ComponentName, java.lang.String, java.lang.String);
method public int setStorageEncryption(android.content.ComponentName, boolean);
method public void setTrustAgentFeaturesEnabled(android.content.ComponentName, android.content.ComponentName, java.util.List<java.lang.String>);
+ method public void setUninstallBlocked(android.content.ComponentName, java.lang.String, boolean);
method public boolean switchUser(android.content.ComponentName, android.os.UserHandle);
method public void uninstallAllUserCaCerts(android.content.ComponentName);
method public void uninstallCaCert(android.content.ComponentName, byte[]);
@@ -5495,23 +5504,23 @@
field public static final int ENCRYPTION_STATUS_UNSUPPORTED = 0; // 0x0
field public static final java.lang.String EXTRA_ADD_EXPLANATION = "android.app.extra.ADD_EXPLANATION";
field public static final java.lang.String EXTRA_DEVICE_ADMIN = "android.app.extra.DEVICE_ADMIN";
- field public static final java.lang.String EXTRA_PROVISIONING_DEFAULT_MANAGED_PROFILE_NAME = "android.app.extra.defaultManagedProfileName";
- field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_CHECKSUM = "android.app.extra.deviceAdminPackageChecksum";
- field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_COOKIE_HEADER = "android.app.extra.deviceAdminPackageDownloadCookieHeader";
- field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION = "android.app.extra.deviceAdminPackageDownloadLocation";
- field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME = "android.app.extra.deviceAdminPackageName";
- field public static final java.lang.String EXTRA_PROVISIONING_EMAIL_ADDRESS = "android.app.extra.ManagedProfileEmailAddress";
- field public static final java.lang.String EXTRA_PROVISIONING_LOCALE = "android.app.extra.locale";
- field public static final java.lang.String EXTRA_PROVISIONING_LOCAL_TIME = "android.app.extra.localTime";
- field public static final java.lang.String EXTRA_PROVISIONING_TIME_ZONE = "android.app.extra.timeZone";
- field public static final java.lang.String EXTRA_PROVISIONING_WIFI_HIDDEN = "android.app.extra.wifiHidden";
- field public static final java.lang.String EXTRA_PROVISIONING_WIFI_PAC_URL = "android.app.extra.wifiPacUrl";
- field public static final java.lang.String EXTRA_PROVISIONING_WIFI_PASSWORD = "android.app.extra.wifiPassword";
- field public static final java.lang.String EXTRA_PROVISIONING_WIFI_PROXY_BYPASS = "android.app.extra.wifiProxyBypassHosts";
- field public static final java.lang.String EXTRA_PROVISIONING_WIFI_PROXY_HOST = "android.app.extra.wifiProxyHost";
- field public static final java.lang.String EXTRA_PROVISIONING_WIFI_PROXY_PORT = "android.app.extra.wifiProxyPort";
- field public static final java.lang.String EXTRA_PROVISIONING_WIFI_SECURITY_TYPE = "android.app.extra.wifiSecurityType";
- field public static final java.lang.String EXTRA_PROVISIONING_WIFI_SSID = "android.app.extra.wifiSsid";
+ field public static final java.lang.String EXTRA_PROVISIONING_DEFAULT_MANAGED_PROFILE_NAME = "android.app.extra.DEFAULT_MANAGED_PROFILE_NAME";
+ field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_CHECKSUM = "android.app.extra.DEVICE_ADMIN_PACKAGE_CHECKSUM";
+ field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_COOKIE_HEADER = "android.app.extra.DEVICE_ADMIN_PACKAGE_DOWNLOAD_COOKIE_HEADER";
+ field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION = "android.app.extra.DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION";
+ field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME = "android.app.extra.DEVICE_ADMIN_PACKAGE_NAME";
+ field public static final java.lang.String EXTRA_PROVISIONING_EMAIL_ADDRESS = "android.app.extra.MANAGED_PROFILE_EMAIL_ADDRESS";
+ field public static final java.lang.String EXTRA_PROVISIONING_LOCALE = "android.app.extra.LOCALE";
+ field public static final java.lang.String EXTRA_PROVISIONING_LOCAL_TIME = "android.app.extra.LOCAL_TIME";
+ field public static final java.lang.String EXTRA_PROVISIONING_TIME_ZONE = "android.app.extra.TIME_ZONE";
+ field public static final java.lang.String EXTRA_PROVISIONING_WIFI_HIDDEN = "android.app.extra.WIFI_HIDDEN";
+ field public static final java.lang.String EXTRA_PROVISIONING_WIFI_PAC_URL = "android.app.extra.WIFI_PAC_URL";
+ field public static final java.lang.String EXTRA_PROVISIONING_WIFI_PASSWORD = "android.app.extra.WIFI_PASSWORD";
+ field public static final java.lang.String EXTRA_PROVISIONING_WIFI_PROXY_BYPASS = "android.app.extra.WIFI_PROXY_BYPASS_HOSTS";
+ field public static final java.lang.String EXTRA_PROVISIONING_WIFI_PROXY_HOST = "android.app.extra.WIFI_PROXY_HOST";
+ field public static final java.lang.String EXTRA_PROVISIONING_WIFI_PROXY_PORT = "android.app.extra.WIFI_PROXY_PORT";
+ field public static final java.lang.String EXTRA_PROVISIONING_WIFI_SECURITY_TYPE = "android.app.extra.WIFI_SECURITY_TYPE";
+ field public static final java.lang.String EXTRA_PROVISIONING_WIFI_SSID = "android.app.extra.WIFI_SSID";
field public static int FLAG_MANAGED_CAN_ACCESS_PARENT;
field public static int FLAG_PARENT_CAN_ACCESS_MANAGED;
field public static final int KEYGUARD_DISABLE_FEATURES_ALL = 2147483647; // 0x7fffffff
@@ -5522,6 +5531,7 @@
field public static final int KEYGUARD_DISABLE_TRUST_AGENTS = 16; // 0x10
field public static final int KEYGUARD_DISABLE_UNREDACTED_NOTIFICATIONS = 8; // 0x8
field public static final int KEYGUARD_DISABLE_WIDGETS_ALL = 1; // 0x1
+ field public static final java.lang.String MIME_TYPE_PROVISIONING_NFC = "application/com.android.managedprovisioning";
field public static final int PASSWORD_QUALITY_ALPHABETIC = 262144; // 0x40000
field public static final int PASSWORD_QUALITY_ALPHANUMERIC = 327680; // 0x50000
field public static final int PASSWORD_QUALITY_BIOMETRIC_WEAK = 32768; // 0x8000
@@ -5530,7 +5540,6 @@
field public static final int PASSWORD_QUALITY_NUMERIC_COMPLEX = 196608; // 0x30000
field public static final int PASSWORD_QUALITY_SOMETHING = 65536; // 0x10000
field public static final int PASSWORD_QUALITY_UNSPECIFIED = 0; // 0x0
- field public static final java.lang.String PROVISIONING_NFC_MIME_TYPE = "application/com.android.managedprovisioning";
field public static final int RESET_PASSWORD_REQUIRE_ENTRY = 1; // 0x1
field public static final int WIPE_EXTERNAL_STORAGE = 1; // 0x1
}
@@ -6320,7 +6329,6 @@
method public deprecated void abortReliableWrite(android.bluetooth.BluetoothDevice);
method public boolean beginReliableWrite();
method public void close();
- method public boolean configureMTU(int);
method public boolean connect();
method public void disconnect();
method public boolean discoverServices();
@@ -6334,14 +6342,15 @@
method public boolean readCharacteristic(android.bluetooth.BluetoothGattCharacteristic);
method public boolean readDescriptor(android.bluetooth.BluetoothGattDescriptor);
method public boolean readRemoteRssi();
- method public boolean requestConnectionParameterUpdate(int);
+ method public boolean requestConnectionPriority(int);
+ method public boolean requestMtu(int);
method public boolean setCharacteristicNotification(android.bluetooth.BluetoothGattCharacteristic, boolean);
method public boolean writeCharacteristic(android.bluetooth.BluetoothGattCharacteristic);
method public boolean writeDescriptor(android.bluetooth.BluetoothGattDescriptor);
- field public static final int GATT_CONNECTION_BALANCED = 0; // 0x0
+ field public static final int CONNECTION_PRIORITY_BALANCED = 0; // 0x0
+ field public static final int CONNECTION_PRIORITY_HIGH = 1; // 0x1
+ field public static final int CONNECTION_PRIORITY_LOW_POWER = 2; // 0x2
field public static final int GATT_CONNECTION_CONGESTED = 143; // 0x8f
- field public static final int GATT_CONNECTION_HIGH_PRIORITY = 1; // 0x1
- field public static final int GATT_CONNECTION_LOW_POWER = 2; // 0x2
field public static final int GATT_FAILURE = 257; // 0x101
field public static final int GATT_INSUFFICIENT_AUTHENTICATION = 5; // 0x5
field public static final int GATT_INSUFFICIENT_ENCRYPTION = 15; // 0xf
@@ -6358,11 +6367,11 @@
method public void onCharacteristicChanged(android.bluetooth.BluetoothGatt, android.bluetooth.BluetoothGattCharacteristic);
method public void onCharacteristicRead(android.bluetooth.BluetoothGatt, android.bluetooth.BluetoothGattCharacteristic, int);
method public void onCharacteristicWrite(android.bluetooth.BluetoothGatt, android.bluetooth.BluetoothGattCharacteristic, int);
- method public void onConfigureMTU(android.bluetooth.BluetoothGatt, int, int);
method public void onConnectionCongested(android.bluetooth.BluetoothGatt, boolean);
method public void onConnectionStateChange(android.bluetooth.BluetoothGatt, int, int);
method public void onDescriptorRead(android.bluetooth.BluetoothGatt, android.bluetooth.BluetoothGattDescriptor, int);
method public void onDescriptorWrite(android.bluetooth.BluetoothGatt, android.bluetooth.BluetoothGattDescriptor, int);
+ method public void onMtuChanged(android.bluetooth.BluetoothGatt, int, int);
method public void onReadRemoteRssi(android.bluetooth.BluetoothGatt, int, int);
method public void onReliableWriteCompleted(android.bluetooth.BluetoothGatt, int);
method public void onServicesDiscovered(android.bluetooth.BluetoothGatt, int);
@@ -12677,7 +12686,7 @@
method public T get(android.hardware.camera2.CameraCharacteristics.Key<T>);
method public java.util.List<android.hardware.camera2.CaptureRequest.Key<?>> getAvailableCaptureRequestKeys();
method public java.util.List<android.hardware.camera2.CaptureResult.Key<?>> getAvailableCaptureResultKeys();
- field public static final android.hardware.camera2.CameraCharacteristics.Key COLOR_CORRECTION_AVAILABLE_ABERRATION_CORRECTION_MODES;
+ field public static final android.hardware.camera2.CameraCharacteristics.Key COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES;
field public static final android.hardware.camera2.CameraCharacteristics.Key CONTROL_AE_AVAILABLE_ANTIBANDING_MODES;
field public static final android.hardware.camera2.CameraCharacteristics.Key CONTROL_AE_AVAILABLE_MODES;
field public static final android.hardware.camera2.CameraCharacteristics.Key CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES;
@@ -12791,9 +12800,9 @@
public abstract class CameraMetadata {
method public java.util.List<TKey> getKeys();
- field public static final int COLOR_CORRECTION_ABERRATION_CORRECTION_MODE_FAST = 1; // 0x1
- field public static final int COLOR_CORRECTION_ABERRATION_CORRECTION_MODE_HIGH_QUALITY = 2; // 0x2
- field public static final int COLOR_CORRECTION_ABERRATION_CORRECTION_MODE_OFF = 0; // 0x0
+ field public static final int COLOR_CORRECTION_ABERRATION_MODE_FAST = 1; // 0x1
+ field public static final int COLOR_CORRECTION_ABERRATION_MODE_HIGH_QUALITY = 2; // 0x2
+ field public static final int COLOR_CORRECTION_ABERRATION_MODE_OFF = 0; // 0x0
field public static final int COLOR_CORRECTION_MODE_FAST = 1; // 0x1
field public static final int COLOR_CORRECTION_MODE_HIGH_QUALITY = 2; // 0x2
field public static final int COLOR_CORRECTION_MODE_TRANSFORM_MATRIX = 0; // 0x0
@@ -12984,7 +12993,7 @@
method public java.lang.Object getTag();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.hardware.camera2.CaptureRequest.Key BLACK_LEVEL_LOCK;
- field public static final android.hardware.camera2.CaptureRequest.Key COLOR_CORRECTION_ABERRATION_CORRECTION_MODE;
+ field public static final android.hardware.camera2.CaptureRequest.Key COLOR_CORRECTION_ABERRATION_MODE;
field public static final android.hardware.camera2.CaptureRequest.Key COLOR_CORRECTION_GAINS;
field public static final android.hardware.camera2.CaptureRequest.Key COLOR_CORRECTION_MODE;
field public static final android.hardware.camera2.CaptureRequest.Key COLOR_CORRECTION_TRANSFORM;
@@ -13056,7 +13065,7 @@
method public android.hardware.camera2.CaptureRequest getRequest();
method public int getSequenceId();
field public static final android.hardware.camera2.CaptureResult.Key BLACK_LEVEL_LOCK;
- field public static final android.hardware.camera2.CaptureResult.Key COLOR_CORRECTION_ABERRATION_CORRECTION_MODE;
+ field public static final android.hardware.camera2.CaptureResult.Key COLOR_CORRECTION_ABERRATION_MODE;
field public static final android.hardware.camera2.CaptureResult.Key COLOR_CORRECTION_GAINS;
field public static final android.hardware.camera2.CaptureResult.Key COLOR_CORRECTION_MODE;
field public static final android.hardware.camera2.CaptureResult.Key COLOR_CORRECTION_TRANSFORM;
@@ -18707,7 +18716,6 @@
method public boolean invokeBeam(android.app.Activity);
method public boolean isEnabled();
method public boolean isNdefPushEnabled();
- method public boolean registerLockscreenDispatch(android.nfc.NfcAdapter.NfcLockscreenDispatch, java.lang.String[]);
method public void setBeamPushUris(android.net.Uri[], android.app.Activity);
method public void setBeamPushUrisCallback(android.nfc.NfcAdapter.CreateBeamUrisCallback, android.app.Activity);
method public void setNdefPushMessage(android.nfc.NdefMessage, android.app.Activity, android.app.Activity...);
@@ -18743,10 +18751,6 @@
method public abstract android.nfc.NdefMessage createNdefMessage(android.nfc.NfcEvent);
}
- public static abstract interface NfcAdapter.NfcLockscreenDispatch {
- method public abstract boolean onTagDetected(android.nfc.Tag);
- }
-
public static abstract interface NfcAdapter.OnNdefPushCompleteCallback {
method public abstract void onNdefPushComplete(android.nfc.NfcEvent);
}
@@ -31508,7 +31512,7 @@
field public static final java.lang.String CASE_GENITIVE = "android.genitive";
field public static final java.lang.String CASE_INSTRUMENTAL = "android.instrumental";
field public static final java.lang.String CASE_LOCATIVE = "android.locative";
- field public static final java.lang.String CASE_NOMINATIVE = "android.nomative";
+ field public static final java.lang.String CASE_NOMINATIVE = "android.nominative";
field public static final java.lang.String CASE_VOCATIVE = "android.vocative";
field public static final java.lang.String GENDER_FEMALE = "android.female";
field public static final java.lang.String GENDER_MALE = "android.male";
diff --git a/core/java/android/animation/Animator.java b/core/java/android/animation/Animator.java
index 5f80ed7..3720c81 100644
--- a/core/java/android/animation/Animator.java
+++ b/core/java/android/animation/Animator.java
@@ -370,6 +370,7 @@
* @hide
*/
public void reverse() {
+ throw new IllegalStateException("Reverse is not supported");
}
/**
diff --git a/core/java/android/animation/RevealAnimator.java b/core/java/android/animation/RevealAnimator.java
index e363a77..0f85f49 100644
--- a/core/java/android/animation/RevealAnimator.java
+++ b/core/java/android/animation/RevealAnimator.java
@@ -26,148 +26,21 @@
*
* @hide
*/
-public class RevealAnimator extends ValueAnimator {
+public class RevealAnimator extends RenderNodeAnimator {
private View mClipView;
- private int mX, mY;
- private float mStartRadius, mEndRadius;
- private float mDelta;
- private boolean mMayRunAsync;
-
- // If this is null, we are running on the UI thread driven by the base
- // ValueAnimator class. If this is not null, forward requests on to this
- // Animator instead.
- private RenderNodeAnimator mRtAnimator;
public RevealAnimator(View clipView, int x, int y,
float startRadius, float endRadius) {
+ super(x, y, startRadius, endRadius);
mClipView = clipView;
- mStartRadius = startRadius;
- mEndRadius = endRadius;
- mDelta = endRadius - startRadius;
- mX = x;
- mY = y;
- super.setValues(PropertyValuesHolder.ofFloat("radius", startRadius, endRadius));
+ setTarget(mClipView);
}
@Override
- void animateValue(float fraction) {
- super.animateValue(fraction);
- fraction = getAnimatedFraction();
- float radius = mStartRadius + (mDelta * fraction);
- mClipView.setRevealClip(true, mX, mY, radius);
- }
-
- @Override
- protected void endAnimation(AnimationHandler handler) {
+ protected void onFinished() {
mClipView.setRevealClip(false, 0, 0, 0);
- super.endAnimation(handler);
+ super.onFinished();
}
- @Override
- public void setAllowRunningAsynchronously(boolean mayRunAsync) {
- mMayRunAsync = mayRunAsync;
- }
-
- private boolean canRunAsync() {
- if (!mMayRunAsync) {
- return false;
- }
- if (mUpdateListeners != null && mUpdateListeners.size() > 0) {
- return false;
- }
- // TODO: Have RNA support this
- if (getRepeatCount() != 0) {
- return false;
- }
- return true;
- }
-
- @Override
- public void start() {
- if (mRtAnimator != null) {
- mRtAnimator.end();
- mRtAnimator = null;
- }
- if (canRunAsync()) {
- mRtAnimator = new RenderNodeAnimator(mX, mY, mStartRadius, mEndRadius);
- mRtAnimator.setDuration(getDuration());
- mRtAnimator.setInterpolator(getInterpolator());
- mRtAnimator.setTarget(mClipView);
- // TODO: Listeners
- mRtAnimator.start();
- } else {
- super.start();
- }
- }
-
- @Override
- public void cancel() {
- if (mRtAnimator != null) {
- mRtAnimator.cancel();
- } else {
- super.cancel();
- }
- }
-
- @Override
- public void end() {
- if (mRtAnimator != null) {
- mRtAnimator.end();
- } else {
- super.end();
- }
- }
-
- @Override
- public void resume() {
- if (mRtAnimator != null) {
- // TODO: Support? Reject?
- } else {
- super.resume();
- }
- }
-
- @Override
- public void pause() {
- if (mRtAnimator != null) {
- // TODO: see resume()
- } else {
- super.pause();
- }
- }
-
- @Override
- public boolean isRunning() {
- if (mRtAnimator != null) {
- return mRtAnimator.isRunning();
- } else {
- return super.isRunning();
- }
- }
-
- @Override
- public boolean isStarted() {
- if (mRtAnimator != null) {
- return mRtAnimator.isStarted();
- } else {
- return super.isStarted();
- }
- }
-
- @Override
- public void reverse() {
- if (mRtAnimator != null) {
- // TODO support
- } else {
- super.reverse();
- }
- }
-
- @Override
- public RevealAnimator clone() {
- RevealAnimator anim = (RevealAnimator) super.clone();
- anim.mRtAnimator = null;
- return anim;
- }
}
diff --git a/core/java/android/app/ActivityManager.java b/core/java/android/app/ActivityManager.java
index 4b022ff..b86621f 100644
--- a/core/java/android/app/ActivityManager.java
+++ b/core/java/android/app/ActivityManager.java
@@ -16,6 +16,11 @@
package android.app;
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.graphics.Canvas;
+import android.graphics.Matrix;
+import android.graphics.Point;
import android.os.BatteryStats;
import android.os.IBinder;
import android.os.ParcelFileDescriptor;
@@ -47,16 +52,13 @@
import android.os.UserHandle;
import android.text.TextUtils;
import android.util.DisplayMetrics;
-import android.util.Log;
import android.util.Slog;
import java.io.FileDescriptor;
import java.io.FileOutputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
-import java.util.HashMap;
import java.util.List;
-import java.util.Map;
/**
* Interact with the overall activities running in the system.
@@ -297,6 +299,8 @@
/** @hide Process is being cached for later use and is empty. */
public static final int PROCESS_STATE_CACHED_EMPTY = 13;
+ Point mAppTaskThumbnailSize;
+
/*package*/ ActivityManager(Context context, Handler handler) {
mContext = context;
mHandler = handler;
@@ -994,6 +998,103 @@
}
/**
+ * Return the current design width for {@link AppTask} thumbnails, for use
+ * with {@link #addAppTask}.
+ */
+ public int getAppTaskThumbnailWidth() {
+ synchronized (this) {
+ ensureAppTaskThumbnailSizeLocked();
+ return mAppTaskThumbnailSize.x;
+ }
+ }
+
+ /**
+ * Return the current design height for {@link AppTask} thumbnails, for use
+ * with {@link #addAppTask}.
+ */
+ public int getAppTaskThumbnailHeight() {
+ synchronized (this) {
+ ensureAppTaskThumbnailSizeLocked();
+ return mAppTaskThumbnailSize.y;
+ }
+ }
+
+ private void ensureAppTaskThumbnailSizeLocked() {
+ if (mAppTaskThumbnailSize == null) {
+ try {
+ mAppTaskThumbnailSize = ActivityManagerNative.getDefault().getAppTaskThumbnailSize();
+ } catch (RemoteException e) {
+ throw new IllegalStateException("System dead?", e);
+ }
+ }
+ }
+
+ /**
+ * Add a new {@link AppTask} for the calling application. This will create a new
+ * recents entry that is added to the <b>end</b> of all existing recents.
+ *
+ * @param activity The activity that is adding the entry. This is used to help determine
+ * the context that the new recents entry will be in.
+ * @param intent The Intent that describes the recents entry. This is the same Intent that
+ * you would have used to launch the activity for it. In generally you will want to set
+ * both {@link Intent#FLAG_ACTIVITY_NEW_DOCUMENT} and
+ * {@link Intent#FLAG_ACTIVITY_RETAIN_IN_RECENTS}; the latter is required since this recents
+ * entry will exist without an activity, so it doesn't make sense to not retain it when
+ * its activity disappears. The given Intent here also must have an explicit ComponentName
+ * set on it.
+ * @param description Optional additional description information.
+ * @param thumbnail Thumbnail to use for the recents entry. Should be the size given by
+ * {@link #getAppTaskThumbnailWidth()} and {@link #getAppTaskThumbnailHeight()}. If the
+ * bitmap is not that exact size, it will be recreated in your process, probably in a way
+ * you don't like, before the recents entry is added.
+ *
+ * @return Returns the task id of the newly added app task, or -1 if the add failed. The
+ * most likely cause of failure is that there is no more room for more tasks for your app.
+ */
+ public int addAppTask(@NonNull Activity activity, @NonNull Intent intent,
+ @Nullable TaskDescription description, @NonNull Bitmap thumbnail) {
+ Point size;
+ synchronized (this) {
+ ensureAppTaskThumbnailSizeLocked();
+ size = mAppTaskThumbnailSize;
+ }
+ final int tw = thumbnail.getWidth();
+ final int th = thumbnail.getHeight();
+ if (tw != size.x || th != size.y) {
+ Bitmap bm = Bitmap.createBitmap(size.x, size.y, thumbnail.getConfig());
+
+ // Use ScaleType.CENTER_CROP, except we leave the top edge at the top.
+ float scale;
+ float dx = 0, dy = 0;
+ if (tw * size.x > size.y * th) {
+ scale = (float) size.x / (float) th;
+ dx = (size.y - tw * scale) * 0.5f;
+ } else {
+ scale = (float) size.y / (float) tw;
+ dy = (size.x - th * scale) * 0.5f;
+ }
+ Matrix matrix = new Matrix();
+ matrix.setScale(scale, scale);
+ matrix.postTranslate((int) (dx + 0.5f), 0);
+
+ Canvas canvas = new Canvas(bm);
+ canvas.drawBitmap(thumbnail, matrix, null);
+ canvas.setBitmap(null);
+
+ thumbnail = bm;
+ }
+ if (description == null) {
+ description = new TaskDescription();
+ }
+ try {
+ return ActivityManagerNative.getDefault().addAppTask(activity.getActivityToken(),
+ intent, description, thumbnail);
+ } catch (RemoteException e) {
+ throw new IllegalStateException("System dead?", e);
+ }
+ }
+
+ /**
* Return a list of the tasks that are currently running, with
* the most recent being first and older ones after in order. Note that
* "running" does not mean any of the task's code is currently loaded or
@@ -2514,5 +2615,20 @@
return null;
}
}
+
+ /**
+ * Modify the {@link Intent#FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS} flag in the root
+ * Intent of this AppTask.
+ *
+ * @param exclude If true, {@link Intent#FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS} will
+ * be set; otherwise, it will be cleared.
+ */
+ public void setExcludeFromRecents(boolean exclude) {
+ try {
+ mAppTaskImpl.setExcludeFromRecents(exclude);
+ } catch (RemoteException e) {
+ Slog.e(TAG, "Invalid AppTask", e);
+ }
+ }
}
}
diff --git a/core/java/android/app/ActivityManagerNative.java b/core/java/android/app/ActivityManagerNative.java
index 1cb1047..3dafa4b 100644
--- a/core/java/android/app/ActivityManagerNative.java
+++ b/core/java/android/app/ActivityManagerNative.java
@@ -30,6 +30,8 @@
import android.content.pm.ParceledListSlice;
import android.content.pm.UserInfo;
import android.content.res.Configuration;
+import android.graphics.Bitmap;
+import android.graphics.Point;
import android.graphics.Rect;
import android.net.Uri;
import android.os.Binder;
@@ -564,6 +566,27 @@
return true;
}
+ case ADD_APP_TASK_TRANSACTION: {
+ data.enforceInterface(IActivityManager.descriptor);
+ IBinder activityToken = data.readStrongBinder();
+ Intent intent = Intent.CREATOR.createFromParcel(data);
+ ActivityManager.TaskDescription descr
+ = ActivityManager.TaskDescription.CREATOR.createFromParcel(data);
+ Bitmap thumbnail = Bitmap.CREATOR.createFromParcel(data);
+ int res = addAppTask(activityToken, intent, descr, thumbnail);
+ reply.writeNoException();
+ reply.writeInt(res);
+ return true;
+ }
+
+ case GET_APP_TASK_THUMBNAIL_SIZE_TRANSACTION: {
+ data.enforceInterface(IActivityManager.descriptor);
+ Point size = getAppTaskThumbnailSize();
+ reply.writeNoException();
+ size.writeToParcel(reply, 0);
+ return true;
+ }
+
case GET_TASKS_TRANSACTION: {
data.enforceInterface(IActivityManager.descriptor);
int maxNum = data.readInt();
@@ -2877,6 +2900,33 @@
reply.recycle();
return list;
}
+ public int addAppTask(IBinder activityToken, Intent intent,
+ ActivityManager.TaskDescription description, Bitmap thumbnail) throws RemoteException {
+ Parcel data = Parcel.obtain();
+ Parcel reply = Parcel.obtain();
+ data.writeInterfaceToken(IActivityManager.descriptor);
+ data.writeStrongBinder(activityToken);
+ intent.writeToParcel(data, 0);
+ description.writeToParcel(data, 0);
+ thumbnail.writeToParcel(data, 0);
+ mRemote.transact(ADD_APP_TASK_TRANSACTION, data, reply, 0);
+ reply.readException();
+ int res = reply.readInt();
+ data.recycle();
+ reply.recycle();
+ return res;
+ }
+ public Point getAppTaskThumbnailSize() throws RemoteException {
+ Parcel data = Parcel.obtain();
+ Parcel reply = Parcel.obtain();
+ data.writeInterfaceToken(IActivityManager.descriptor);
+ mRemote.transact(GET_APP_TASK_THUMBNAIL_SIZE_TRANSACTION, data, reply, 0);
+ reply.readException();
+ Point size = Point.CREATOR.createFromParcel(reply);
+ data.recycle();
+ reply.recycle();
+ return size;
+ }
public List getTasks(int maxNum, int flags) throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
diff --git a/core/java/android/app/ApplicationPackageManager.java b/core/java/android/app/ApplicationPackageManager.java
index b2812e3..9342ae5 100644
--- a/core/java/android/app/ApplicationPackageManager.java
+++ b/core/java/android/app/ApplicationPackageManager.java
@@ -749,10 +749,10 @@
putCachedIcon(name, dr);
return dr;
} catch (NameNotFoundException e) {
- Log.w("PackageManager", "Failure retrieving resources for"
+ Log.w("PackageManager", "Failure retrieving resources for "
+ appInfo.packageName);
} catch (Resources.NotFoundException e) {
- Log.w("PackageManager", "Failure retrieving resources for"
+ Log.w("PackageManager", "Failure retrieving resources for "
+ appInfo.packageName + ": " + e.getMessage());
} catch (RuntimeException e) {
// If an exception was thrown, fall through to return
@@ -1100,7 +1100,7 @@
putCachedString(name, text);
return text;
} catch (NameNotFoundException e) {
- Log.w("PackageManager", "Failure retrieving resources for"
+ Log.w("PackageManager", "Failure retrieving resources for "
+ appInfo.packageName);
} catch (RuntimeException e) {
// If an exception was thrown, fall through to return
diff --git a/core/java/android/app/IActivityManager.java b/core/java/android/app/IActivityManager.java
index 8e21899..70514d8 100644
--- a/core/java/android/app/IActivityManager.java
+++ b/core/java/android/app/IActivityManager.java
@@ -36,6 +36,7 @@
import android.content.pm.UserInfo;
import android.content.res.Configuration;
import android.graphics.Bitmap;
+import android.graphics.Point;
import android.graphics.Rect;
import android.net.Uri;
import android.os.Bundle;
@@ -119,6 +120,9 @@
public String getCallingPackage(IBinder token) throws RemoteException;
public ComponentName getCallingActivity(IBinder token) throws RemoteException;
public List<IAppTask> getAppTasks() throws RemoteException;
+ public int addAppTask(IBinder activityToken, Intent intent,
+ ActivityManager.TaskDescription description, Bitmap thumbnail) throws RemoteException;
+ public Point getAppTaskThumbnailSize() throws RemoteException;
public List<RunningTaskInfo> getTasks(int maxNum, int flags) throws RemoteException;
public List<ActivityManager.RecentTaskInfo> getRecentTasks(int maxNum,
int flags, int userId) throws RemoteException;
@@ -765,4 +769,6 @@
int NOTIFY_ENTER_ANIMATION_COMPLETE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+230;
int KEYGUARD_WAITING_FOR_ACTIVITY_DRAWN_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+231;
int START_ACTIVITY_AS_CALLER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+232;
+ int ADD_APP_TASK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+233;
+ int GET_APP_TASK_THUMBNAIL_SIZE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+234;
}
diff --git a/core/java/android/app/IAppTask.aidl b/core/java/android/app/IAppTask.aidl
index 268b4dd..4e38c36 100644
--- a/core/java/android/app/IAppTask.aidl
+++ b/core/java/android/app/IAppTask.aidl
@@ -22,4 +22,5 @@
interface IAppTask {
void finishAndRemoveTask();
ActivityManager.RecentTaskInfo getTaskInfo();
+ void setExcludeFromRecents(boolean exclude);
}
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index 70ba8ea..47967ba 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -40,6 +40,7 @@
import android.os.UserManager;
import android.text.TextUtils;
import android.util.Log;
+import android.util.MathUtils;
import android.util.TypedValue;
import android.view.Gravity;
import android.view.View;
@@ -1755,6 +1756,7 @@
*/
public static class Builder {
private static final int MAX_ACTION_BUTTONS = 3;
+ private static final float LARGE_TEXT_SCALE = 1.3f;
/**
* @hide
@@ -2577,28 +2579,14 @@
return bitmap;
}
- private RemoteViews applyStandardTemplate(int resId, boolean fitIn1U) {
- final boolean largeFontScale
- = mContext.getResources().getConfiguration().fontScale >= 1.25f;
-
+ private RemoteViews applyStandardTemplate(int resId) {
Bitmap profileIcon = getProfileBadge();
RemoteViews contentView = new BuilderRemoteViews(mContext.getPackageName(),
mOriginatingUserId, resId);
- if (largeFontScale) {
- // Make a little extra room for the bigger text.
- final int margin = (int) mContext.getResources()
- .getDimensionPixelSize(R.dimen.notification_large_font_vert_pad);
- contentView.setViewPadding(R.id.line1, 0, margin, 0, 0);
- contentView.setViewPadding(R.id.line3, 0, 0, 0, margin);
- }
-
boolean showLine3 = false;
boolean showLine2 = false;
- if (mPriority < PRIORITY_LOW) {
- // TODO: Low priority presentation
- }
if (profileIcon != null) {
contentView.setImageViewBitmap(R.id.profile_icon, profileIcon);
contentView.setViewVisibility(R.id.profile_icon, View.VISIBLE);
@@ -2666,15 +2654,12 @@
}
}
if (showLine2) {
- if (fitIn1U) {
- // need to shrink all the type to make sure everything fits
- final Resources res = mContext.getResources();
- final float subTextSize = res.getDimensionPixelSize(
- R.dimen.notification_subtext_size);
- contentView.setTextViewTextSize(R.id.text, TypedValue.COMPLEX_UNIT_PX, subTextSize);
- }
- // vertical centering
- contentView.setViewPadding(R.id.line1, 0, 0, 0, 0);
+
+ // need to shrink all the type to make sure everything fits
+ final Resources res = mContext.getResources();
+ final float subTextSize = res.getDimensionPixelSize(
+ R.dimen.notification_subtext_size);
+ contentView.setTextViewTextSize(R.id.text, TypedValue.COMPLEX_UNIT_PX, subTextSize);
}
if (mWhen != 0 && mShowWhen) {
@@ -2691,13 +2676,51 @@
contentView.setViewVisibility(R.id.time, View.GONE);
}
+ // Adjust padding depending on line count and font size.
+ contentView.setViewPadding(R.id.line1, 0, calculateTopPadding(mContext,
+ hasThreeLines(), mContext.getResources().getConfiguration().fontScale),
+ 0, 0);
+
contentView.setViewVisibility(R.id.line3, showLine3 ? View.VISIBLE : View.GONE);
contentView.setViewVisibility(R.id.overflow_divider, showLine3 ? View.VISIBLE : View.GONE);
return contentView;
}
+ /**
+ * Logic to find out whether the notification is going to have three lines in the contracted
+ * layout. This is used to adjust the top padding.
+ *
+ * @return true if the notification is going to have three lines; false if the notification
+ * is going to have one or two lines
+ */
+ private boolean hasThreeLines() {
+ boolean hasLine3 = mContentText != null || mContentInfo != null || mNumber > 0;
+ boolean hasLine2 = (mSubText != null && mContentText != null) ||
+ (mSubText == null && (mProgressMax != 0 || mProgressIndeterminate));
+ return hasLine2 && hasLine3;
+ }
+
+ /**
+ * @hide
+ */
+ public static int calculateTopPadding(Context ctx, boolean hasThreeLines,
+ float fontScale) {
+ int padding = ctx.getResources().getDimensionPixelSize(hasThreeLines
+ ? R.dimen.notification_top_pad_narrow
+ : R.dimen.notification_top_pad);
+ int largePadding = ctx.getResources().getDimensionPixelSize(hasThreeLines
+ ? R.dimen.notification_top_pad_large_text_narrow
+ : R.dimen.notification_top_pad_large_text);
+ float largeFactor = (MathUtils.constrain(fontScale, 1.0f, LARGE_TEXT_SCALE) - 1f)
+ / (LARGE_TEXT_SCALE - 1f);
+
+ // Linearly interpolate the padding between large and normal with the font scale ranging
+ // from 1f to LARGE_TEXT_SCALE
+ return Math.round((1 - largeFactor) * padding + largeFactor * largePadding);
+ }
+
private RemoteViews applyStandardTemplateWithActions(int layoutId) {
- RemoteViews big = applyStandardTemplate(layoutId, false);
+ RemoteViews big = applyStandardTemplate(layoutId);
int N = mActions.size();
if (N > 0) {
@@ -2717,7 +2740,7 @@
if (mContentView != null) {
return mContentView;
} else {
- return applyStandardTemplate(getBaseLayoutResource(), true); // no more special large_icon flavor
+ return applyStandardTemplate(getBaseLayoutResource());
}
}
@@ -2810,7 +2833,7 @@
*/
private void applyLargeIconBackground(RemoteViews contentView) {
contentView.setInt(R.id.icon, "setBackgroundResource",
- R.drawable.notification_icon_legacy_bg_inset);
+ R.drawable.notification_icon_legacy_bg);
contentView.setDrawableParameters(
R.id.icon,
@@ -2819,6 +2842,10 @@
resolveColor(),
PorterDuff.Mode.SRC_ATOP,
-1);
+
+ int padding = mContext.getResources().getDimensionPixelSize(
+ R.dimen.notification_large_icon_circle_padding);
+ contentView.setViewPadding(R.id.icon, padding, padding, padding, padding);
}
private void removeLargeIconBackground(RemoteViews contentView) {
@@ -3234,7 +3261,7 @@
}
private int getBigTextLayoutResource() {
- return getBigBaseLayoutResource();
+ return R.layout.notification_template_material_big_text;
}
private int getInboxLayoutResource() {
@@ -3328,6 +3355,19 @@
}
/**
+ * Changes the padding of the first line such that the big and small content view have the
+ * same top padding.
+ *
+ * @hide
+ */
+ protected void applyTopPadding(RemoteViews contentView) {
+ int topPadding = Builder.calculateTopPadding(mBuilder.mContext,
+ mBuilder.hasThreeLines(),
+ mBuilder.mContext.getResources().getConfiguration().fontScale);
+ contentView.setViewPadding(R.id.line1, 0, topPadding, 0, 0);
+ }
+
+ /**
* @hide
*/
public void addExtras(Bundle extras) {
@@ -3465,6 +3505,8 @@
contentView.setImageViewBitmap(R.id.big_picture, mPicture);
+ applyTopPadding(contentView);
+
return contentView;
}
@@ -3575,8 +3617,6 @@
}
private RemoteViews makeBigContentView() {
- // Remove the content text so line3 only shows if you have a summary
- final boolean hadThreeLines = (mBuilder.mContentText != null && mBuilder.mSubText != null);
// Nasty
CharSequence oldBuilderContentText = mBuilder.mContentText;
@@ -3586,15 +3626,12 @@
mBuilder.mContentText = oldBuilderContentText;
- if (hadThreeLines) {
- // vertical centering
- contentView.setViewPadding(R.id.line1, 0, 0, 0, 0);
- }
-
contentView.setTextViewText(R.id.big_text, mBuilder.processLegacyText(mBigText));
contentView.setViewVisibility(R.id.big_text, View.VISIBLE);
contentView.setViewVisibility(R.id.text2, View.GONE);
+ applyTopPadding(contentView);
+
return contentView;
}
@@ -3706,13 +3743,20 @@
contentView.setViewVisibility(rowId, View.GONE);
}
-
+ final boolean largeText =
+ mBuilder.mContext.getResources().getConfiguration().fontScale > 1f;
+ final float subTextSize = mBuilder.mContext.getResources().getDimensionPixelSize(
+ R.dimen.notification_subtext_size);
int i=0;
while (i < mTexts.size() && i < rowIds.length) {
CharSequence str = mTexts.get(i);
if (str != null && !str.equals("")) {
contentView.setViewVisibility(rowIds[i], View.VISIBLE);
contentView.setTextViewText(rowIds[i], mBuilder.processLegacyText(str));
+ if (largeText) {
+ contentView.setTextViewTextSize(rowIds[i], TypedValue.COMPLEX_UNIT_PX,
+ subTextSize);
+ }
}
i++;
}
@@ -3723,6 +3767,8 @@
contentView.setViewVisibility(R.id.inbox_more,
mTexts.size() > rowIds.length ? View.VISIBLE : View.GONE);
+ applyTopPadding(contentView);
+
return contentView;
}
@@ -3876,7 +3922,7 @@
private RemoteViews makeMediaContentView() {
RemoteViews view = mBuilder.applyStandardTemplate(
- R.layout.notification_template_material_media, true /* 1U */);
+ R.layout.notification_template_material_media);
final int numActions = mBuilder.mActions.size();
final int N = mActionsToShowInCompact == null
@@ -3901,7 +3947,7 @@
private RemoteViews makeMediaBigContentView() {
RemoteViews big = mBuilder.applyStandardTemplate(
- R.layout.notification_template_material_big_media, false);
+ R.layout.notification_template_material_big_media);
final int N = Math.min(mBuilder.mActions.size(), MAX_MEDIA_BUTTONS);
if (N > 0) {
diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java
index bc4d2c1..0dc8f66 100644
--- a/core/java/android/app/admin/DevicePolicyManager.java
+++ b/core/java/android/app/admin/DevicePolicyManager.java
@@ -55,7 +55,6 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
-import java.util.Set;
/**
* Public interface for managing policies enforced on a device. Most clients
@@ -124,10 +123,10 @@
* application that started provisioning. The package will be set as profile owner in that case.
*
* <p>This package is set as device owner when device owner provisioning is started by an Nfc
- * message containing an Nfc record with MIME type {@link #PROVISIONING_NFC_MIME_TYPE}.
+ * message containing an Nfc record with MIME type {@link #MIME_TYPE_PROVISIONING_NFC}.
*/
public static final String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME
- = "android.app.extra.deviceAdminPackageName";
+ = "android.app.extra.DEVICE_ADMIN_PACKAGE_NAME";
/**
* A String extra holding the default name of the profile that is created during managed profile
@@ -136,7 +135,7 @@
* <p>Use with {@link #ACTION_PROVISION_MANAGED_PROFILE}
*/
public static final String EXTRA_PROVISIONING_DEFAULT_MANAGED_PROFILE_NAME
- = "android.app.extra.defaultManagedProfileName";
+ = "android.app.extra.DEFAULT_MANAGED_PROFILE_NAME";
/**
* A String extra that, holds the email address of the account which a managed profile is
@@ -150,137 +149,137 @@
* It is usually used to avoid that the user has to enter their email address twice.
*/
public static final String EXTRA_PROVISIONING_EMAIL_ADDRESS
- = "android.app.extra.ManagedProfileEmailAddress";
+ = "android.app.extra.MANAGED_PROFILE_EMAIL_ADDRESS";
/**
* A String extra holding the time zone {@link android.app.AlarmManager} that the device
* will be set to.
*
- * <p>Use in an Nfc record with {@link #PROVISIONING_NFC_MIME_TYPE} that starts device owner
+ * <p>Use in an Nfc record with {@link #MIME_TYPE_PROVISIONING_NFC} that starts device owner
* provisioning via an Nfc bump.
*/
public static final String EXTRA_PROVISIONING_TIME_ZONE
- = "android.app.extra.timeZone";
+ = "android.app.extra.TIME_ZONE";
/**
- * A Long extra holding the local time {@link android.app.AlarmManager} that the device
- * will be set to.
+ * A Long extra holding the wall clock time (in milliseconds) to be set on the device's
+ * {@link android.app.AlarmManager}.
*
- * <p>Use in an Nfc record with {@link #PROVISIONING_NFC_MIME_TYPE} that starts device owner
+ * <p>Use in an Nfc record with {@link #MIME_TYPE_PROVISIONING_NFC} that starts device owner
* provisioning via an Nfc bump.
*/
public static final String EXTRA_PROVISIONING_LOCAL_TIME
- = "android.app.extra.localTime";
+ = "android.app.extra.LOCAL_TIME";
/**
* A String extra holding the {@link java.util.Locale} that the device will be set to.
* Format: xx_yy, where xx is the language code, and yy the country code.
*
- * <p>Use in an Nfc record with {@link #PROVISIONING_NFC_MIME_TYPE} that starts device owner
+ * <p>Use in an Nfc record with {@link #MIME_TYPE_PROVISIONING_NFC} that starts device owner
* provisioning via an Nfc bump.
*/
public static final String EXTRA_PROVISIONING_LOCALE
- = "android.app.extra.locale";
+ = "android.app.extra.LOCALE";
/**
* A String extra holding the ssid of the wifi network that should be used during nfc device
* owner provisioning for downloading the mobile device management application.
*
- * <p>Use in an Nfc record with {@link #PROVISIONING_NFC_MIME_TYPE} that starts device owner
+ * <p>Use in an Nfc record with {@link #MIME_TYPE_PROVISIONING_NFC} that starts device owner
* provisioning via an Nfc bump.
*/
public static final String EXTRA_PROVISIONING_WIFI_SSID
- = "android.app.extra.wifiSsid";
+ = "android.app.extra.WIFI_SSID";
/**
* A boolean extra indicating whether the wifi network in {@link #EXTRA_PROVISIONING_WIFI_SSID}
* is hidden or not.
*
- * <p>Use in an Nfc record with {@link #PROVISIONING_NFC_MIME_TYPE} that starts device owner
+ * <p>Use in an Nfc record with {@link #MIME_TYPE_PROVISIONING_NFC} that starts device owner
* provisioning via an Nfc bump.
*/
public static final String EXTRA_PROVISIONING_WIFI_HIDDEN
- = "android.app.extra.wifiHidden";
+ = "android.app.extra.WIFI_HIDDEN";
/**
* A String extra indicating the security type of the wifi network in
* {@link #EXTRA_PROVISIONING_WIFI_SSID}.
*
- * <p>Use in an Nfc record with {@link #PROVISIONING_NFC_MIME_TYPE} that starts device owner
+ * <p>Use in an Nfc record with {@link #MIME_TYPE_PROVISIONING_NFC} that starts device owner
* provisioning via an Nfc bump.
*/
public static final String EXTRA_PROVISIONING_WIFI_SECURITY_TYPE
- = "android.app.extra.wifiSecurityType";
+ = "android.app.extra.WIFI_SECURITY_TYPE";
/**
* A String extra holding the password of the wifi network in
* {@link #EXTRA_PROVISIONING_WIFI_SSID}.
*
- * <p>Use in an Nfc record with {@link #PROVISIONING_NFC_MIME_TYPE} that starts device owner
+ * <p>Use in an Nfc record with {@link #MIME_TYPE_PROVISIONING_NFC} that starts device owner
* provisioning via an Nfc bump.
*/
public static final String EXTRA_PROVISIONING_WIFI_PASSWORD
- = "android.app.extra.wifiPassword";
+ = "android.app.extra.WIFI_PASSWORD";
/**
* A String extra holding the proxy host for the wifi network in
* {@link #EXTRA_PROVISIONING_WIFI_SSID}.
*
- * <p>Use in an Nfc record with {@link #PROVISIONING_NFC_MIME_TYPE} that starts device owner
+ * <p>Use in an Nfc record with {@link #MIME_TYPE_PROVISIONING_NFC} that starts device owner
* provisioning via an Nfc bump.
*/
public static final String EXTRA_PROVISIONING_WIFI_PROXY_HOST
- = "android.app.extra.wifiProxyHost";
+ = "android.app.extra.WIFI_PROXY_HOST";
/**
* An int extra holding the proxy port for the wifi network in
* {@link #EXTRA_PROVISIONING_WIFI_SSID}.
*
- * <p>Use in an Nfc record with {@link #PROVISIONING_NFC_MIME_TYPE} that starts device owner
+ * <p>Use in an Nfc record with {@link #MIME_TYPE_PROVISIONING_NFC} that starts device owner
* provisioning via an Nfc bump.
*/
public static final String EXTRA_PROVISIONING_WIFI_PROXY_PORT
- = "android.app.extra.wifiProxyPort";
+ = "android.app.extra.WIFI_PROXY_PORT";
/**
* A String extra holding the proxy bypass for the wifi network in
* {@link #EXTRA_PROVISIONING_WIFI_SSID}.
*
- * <p>Use in an Nfc record with {@link #PROVISIONING_NFC_MIME_TYPE} that starts device owner
+ * <p>Use in an Nfc record with {@link #MIME_TYPE_PROVISIONING_NFC} that starts device owner
* provisioning via an Nfc bump.
*/
public static final String EXTRA_PROVISIONING_WIFI_PROXY_BYPASS
- = "android.app.extra.wifiProxyBypassHosts";
+ = "android.app.extra.WIFI_PROXY_BYPASS_HOSTS";
/**
* A String extra holding the proxy auto-config (PAC) URL for the wifi network in
* {@link #EXTRA_PROVISIONING_WIFI_SSID}.
*
- * <p>Use in an Nfc record with {@link #PROVISIONING_NFC_MIME_TYPE} that starts device owner
+ * <p>Use in an Nfc record with {@link #MIME_TYPE_PROVISIONING_NFC} that starts device owner
* provisioning via an Nfc bump.
*/
public static final String EXTRA_PROVISIONING_WIFI_PAC_URL
- = "android.app.extra.wifiPacUrl";
+ = "android.app.extra.WIFI_PAC_URL";
/**
* A String extra holding a url that specifies the download location of the device admin
* package. When not provided it is assumed that the device admin package is already installed.
*
- * <p>Use in an Nfc record with {@link #PROVISIONING_NFC_MIME_TYPE} that starts device owner
+ * <p>Use in an Nfc record with {@link #MIME_TYPE_PROVISIONING_NFC} that starts device owner
* provisioning via an Nfc bump.
*/
public static final String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION
- = "android.app.extra.deviceAdminPackageDownloadLocation";
+ = "android.app.extra.DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION";
/**
* A String extra holding a http cookie header which should be used in the http request to the
* url specified in {@link #EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION}.
*
- * <p>Use in an Nfc record with {@link #PROVISIONING_NFC_MIME_TYPE} that starts device owner
+ * <p>Use in an Nfc record with {@link #MIME_TYPE_PROVISIONING_NFC} that starts device owner
* provisioning via an Nfc bump.
*/
public static final String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_COOKIE_HEADER
- = "android.app.extra.deviceAdminPackageDownloadCookieHeader";
+ = "android.app.extra.DEVICE_ADMIN_PACKAGE_DOWNLOAD_COOKIE_HEADER";
/**
* A String extra holding the SHA-1 checksum of the file at download location specified in
@@ -288,11 +287,11 @@
* the file at the download location an error will be shown to the user and the user will be
* asked to factory reset the device.
*
- * <p>Use in an Nfc record with {@link #PROVISIONING_NFC_MIME_TYPE} that starts device owner
+ * <p>Use in an Nfc record with {@link #MIME_TYPE_PROVISIONING_NFC} that starts device owner
* provisioning via an Nfc bump.
*/
public static final String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_CHECKSUM
- = "android.app.extra.deviceAdminPackageChecksum";
+ = "android.app.extra.DEVICE_ADMIN_PACKAGE_CHECKSUM";
/**
* This MIME type is used for starting the Device Owner provisioning.
@@ -336,7 +335,7 @@
* <p>Input: Nothing.</p>
* <p>Output: Nothing</p>
*/
- public static final String PROVISIONING_NFC_MIME_TYPE
+ public static final String MIME_TYPE_PROVISIONING_NFC
= "application/com.android.managedprovisioning";
/**
@@ -1875,12 +1874,16 @@
}
/**
- * Called by a device/profile owner to set whether the screen capture is disabled.
+ * Called by a device/profile owner to set whether the screen capture is disabled. Disabling
+ * screen capture also prevents the content from being shown on display devices that do not have
+ * a secure video output. See {@link android.view.Display#FLAG_SECURE} for more details about
+ * secure surfaces and secure displays.
*
* <p>The calling device admin must be a device or profile owner. If it is not, a
* security exception will be thrown.
*
* @param admin Which {@link DeviceAdminReceiver} this request is associated with.
+ * @param disabled Whether or not screen capture should be disabled.
*/
public void setScreenCaptureDisabled(ComponentName admin, boolean disabled) {
if (mService != null) {
@@ -2157,6 +2160,7 @@
}
/** @hide */
+ @SystemApi
public String getDeviceOwner() {
if (mService != null) {
try {
@@ -2365,6 +2369,7 @@
* owner has been set for that user.
* @throws IllegalArgumentException if the userId is invalid.
*/
+ @SystemApi
public ComponentName getProfileOwner() throws IllegalArgumentException {
return getProfileOwnerAsUser(Process.myUserHandle().getIdentifier());
}
@@ -2643,6 +2648,161 @@
}
/**
+ * Called by a profile or device owner to set the permitted accessibility services. When
+ * set by a device owner or profile owner the restriction applies to all profiles of the
+ * user the device owner or profile owner is an admin for.
+ *
+ * By default the user can use any accessiblity service. When zero or more packages have
+ * been added, accessiblity services that are not in the list and not part of the system
+ * can not be enabled by the user.
+ *
+ * <p> Calling with a null value for the list disables the restriction so that all services
+ * can be used, calling with an empty list only allows the builtin system's services.
+ *
+ * <p> System accesibility services are always available to the user the list can't modify
+ * this.
+ *
+ * @param admin Which {@link DeviceAdminReceiver} this request is associated with.
+ * @param packageNames List of accessibility service package names.
+ *
+ * @return true if setting the restriction succeeded. It fail if there is
+ * one or more non-system accessibility services enabled, that are not in the list.
+ */
+ public boolean setPermittedAccessibilityServices(ComponentName admin,
+ List<String> packageNames) {
+ if (mService != null) {
+ try {
+ return mService.setPermittedAccessibilityServices(admin, packageNames);
+ } catch (RemoteException e) {
+ Log.w(TAG, "Failed talking with device policy service", e);
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Returns the list of permitted accessibility services set by this device or profile owner.
+ *
+ * <p>An empty list means no accessibility services except system services are allowed.
+ * Null means all accessibility services are allowed.
+ *
+ * @param admin Which {@link DeviceAdminReceiver} this request is associated with.
+ * @return List of accessiblity service package names.
+ */
+ public List<String> getPermittedAccessibilityServices(ComponentName admin) {
+ if (mService != null) {
+ try {
+ return mService.getPermittedAccessibilityServices(admin);
+ } catch (RemoteException e) {
+ Log.w(TAG, "Failed talking with device policy service", e);
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the list of accessibility services permitted by the device or profiles
+ * owners of this user.
+ *
+ * <p>Null means all accessibility services are allowed, if a non-null list is returned
+ * it will contain the intersection of the permitted lists for any device or profile
+ * owners that apply to this user. It will also include any system accessibility services.
+ *
+ * @param userId which user to check for.
+ * @return List of accessiblity service package names.
+ * @hide
+ */
+ @SystemApi
+ public List<String> getPermittedAccessibilityServices(int userId) {
+ if (mService != null) {
+ try {
+ return mService.getPermittedAccessibilityServicesForUser(userId);
+ } catch (RemoteException e) {
+ Log.w(TAG, "Failed talking with device policy service", e);
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Called by a profile or device owner to set the permitted input methods services. When
+ * set by a device owner or profile owner the restriction applies to all profiles of the
+ * user the device owner or profile owner is an admin for.
+ *
+ * By default the user can use any input method. When zero or more packages have
+ * been added, input method that are not in the list and not part of the system
+ * can not be enabled by the user.
+ *
+ * This method will fail if it is called for a admin that is not for the foreground user
+ * or a profile of the foreground user.
+ *
+ * <p> Calling with a null value for the list disables the restriction so that all input methods
+ * can be used, calling with an empty list disables all but the system's own input methods.
+ *
+ * <p> System input methods are always available to the user this method can't modify this.
+ *
+ * @param admin Which {@link DeviceAdminReceiver} this request is associated with.
+ * @param packageNames List of input method package names.
+ * @return true if setting the restriction succeeded. It will fail if there is
+ * one or more input method enabled, that are not in the list or user if the foreground
+ * user.
+ */
+ public boolean setPermittedInputMethods(ComponentName admin, List<String> packageNames) {
+ if (mService != null) {
+ try {
+ return mService.setPermittedInputMethods(admin, packageNames);
+ } catch (RemoteException e) {
+ Log.w(TAG, "Failed talking with device policy service", e);
+ }
+ }
+ return false;
+ }
+
+
+ /**
+ * Returns the list of permitted input methods set by this device or profile owner.
+ *
+ * <p>An empty list means no input methods except system input methods are allowed.
+ * Null means all input methods are allowed.
+ *
+ * @param admin Which {@link DeviceAdminReceiver} this request is associated with.
+ * @return List of input method package names.
+ */
+ public List<String> getPermittedInputMethods(ComponentName admin) {
+ if (mService != null) {
+ try {
+ return mService.getPermittedInputMethods(admin);
+ } catch (RemoteException e) {
+ Log.w(TAG, "Failed talking with device policy service", e);
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the list of input methods permitted by the device or profiles
+ * owners of the current user.
+ *
+ * <p>Null means all input methods are allowed, if a non-null list is returned
+ * it will contain the intersection of the permitted lists for any device or profile
+ * owners that apply to this user. It will also include any system input methods.
+ *
+ * @return List of input method package names.
+ * @hide
+ */
+ @SystemApi
+ public List<String> getPermittedInputMethodsForCurrentUser() {
+ if (mService != null) {
+ try {
+ return mService.getPermittedInputMethodsForCurrentUser();
+ } catch (RemoteException e) {
+ Log.w(TAG, "Failed talking with device policy service", e);
+ }
+ }
+ return null;
+ }
+
+ /**
* Called by a device owner to create a user with the specified name. The UserHandle returned
* by this method should not be persisted as user handles are recycled as users are removed and
* created. If you need to persist an identifier for this user, use
@@ -2823,28 +2983,6 @@
}
/**
- * Called by profile or device owner to hide or unhide currently installed packages. This
- * should only be called by a profile or device owner running within a managed profile.
- *
- * @param admin Which {@link DeviceAdminReceiver} this request is associated with.
- * @param intent An intent matching the app(s) to be updated. All apps that resolve for this
- * intent will be updated in the current profile.
- * @param hidden {@code true} if the packages should be hidden, {@code false} if they should
- * be unhidden.
- * @return int The number of activities that matched the intent and were updated.
- */
- public int setApplicationsHidden(ComponentName admin, Intent intent, boolean hidden) {
- if (mService != null) {
- try {
- return mService.setApplicationsHidden(admin, intent, hidden);
- } catch (RemoteException e) {
- Log.w(TAG, "Failed talking with device policy service", e);
- }
- }
- return 0;
- }
-
- /**
* Called by device or profile owner to determine if a package is hidden.
*
* @param admin Which {@link DeviceAdminReceiver} this request is associated with.
@@ -3110,12 +3248,13 @@
*
* @param admin Which {@link DeviceAdminReceiver} this request is associated with.
* @param packageName package to change.
- * @param blockUninstall true if the user shouldn't be able to uninstall the package.
+ * @param uninstallBlocked true if the user shouldn't be able to uninstall the package.
*/
- public void setBlockUninstall(ComponentName admin, String packageName, boolean blockUninstall) {
+ public void setUninstallBlocked(ComponentName admin, String packageName,
+ boolean uninstallBlocked) {
if (mService != null) {
try {
- mService.setBlockUninstall(admin, packageName, blockUninstall);
+ mService.setUninstallBlocked(admin, packageName, uninstallBlocked);
} catch (RemoteException re) {
Log.w(TAG, "Failed to call block uninstall on device policy service");
}
@@ -3130,10 +3269,10 @@
* @param packageName package to check.
* @return true if the user shouldn't be able to uninstall the package.
*/
- public boolean getBlockUninstall(ComponentName admin, String packageName) {
+ public boolean getUninstallBlocked(ComponentName admin, String packageName) {
if (mService != null) {
try {
- return mService.getBlockUninstall(admin, packageName);
+ return mService.getUninstallBlocked(admin, packageName);
} catch (RemoteException re) {
Log.w(TAG, "Failed to call block uninstall on device policy service");
}
diff --git a/core/java/android/app/admin/IDevicePolicyManager.aidl b/core/java/android/app/admin/IDevicePolicyManager.aidl
index 324b963..1e17bb6 100644
--- a/core/java/android/app/admin/IDevicePolicyManager.aidl
+++ b/core/java/android/app/admin/IDevicePolicyManager.aidl
@@ -24,6 +24,7 @@
import android.os.Bundle;
import android.os.RemoteCallback;
import android.os.UserHandle;
+import java.util.List;
/**
* Internal IPC interface to the device policy service.
@@ -137,8 +138,15 @@
void addCrossProfileIntentFilter(in ComponentName admin, in IntentFilter filter, int flags);
void clearCrossProfileIntentFilters(in ComponentName admin);
+ boolean setPermittedAccessibilityServices(in ComponentName admin,in List packageList);
+ List getPermittedAccessibilityServices(in ComponentName admin);
+ List getPermittedAccessibilityServicesForUser(int userId);
+
+ boolean setPermittedInputMethods(in ComponentName admin,in List packageList);
+ List getPermittedInputMethods(in ComponentName admin);
+ List getPermittedInputMethodsForCurrentUser();
+
boolean setApplicationHidden(in ComponentName admin, in String packageName, boolean hidden);
- int setApplicationsHidden(in ComponentName admin, in Intent intent, boolean hidden);
boolean isApplicationHidden(in ComponentName admin, in String packageName);
UserHandle createUser(in ComponentName who, in String name);
@@ -165,8 +173,8 @@
void notifyLockTaskModeChanged(boolean isEnabled, String pkg, int userId);
- void setBlockUninstall(in ComponentName admin, in String packageName, boolean blockUninstall);
- boolean getBlockUninstall(in ComponentName admin, in String packageName);
+ void setUninstallBlocked(in ComponentName admin, in String packageName, boolean uninstallBlocked);
+ boolean getUninstallBlocked(in ComponentName admin, in String packageName);
void setCrossProfileCallerIdDisabled(in ComponentName who, boolean disabled);
boolean getCrossProfileCallerIdDisabled(in ComponentName who);
diff --git a/core/java/android/app/job/JobInfo.java b/core/java/android/app/job/JobInfo.java
index 936e205..b7af544 100644
--- a/core/java/android/app/job/JobInfo.java
+++ b/core/java/android/app/job/JobInfo.java
@@ -434,6 +434,12 @@
* @return The job object to hand to the JobScheduler. This object is immutable.
*/
public JobInfo build() {
+ // Allow tasks with no constraints. What am I, a database?
+ if (!mHasEarlyConstraint && !mHasLateConstraint && !mRequiresCharging &&
+ !mRequiresDeviceIdle && mNetworkCapabilities == NetworkType.NONE) {
+ throw new IllegalArgumentException("You're trying to build a job with no " +
+ "constraints, this is not allowed.");
+ }
mExtras = new PersistableBundle(mExtras); // Make our own copy.
// Check that a deadline was not set on a periodic job.
if (mIsPeriodic && (mMaxExecutionDelayMillis != 0L)) {
diff --git a/core/java/android/app/job/JobScheduler.java b/core/java/android/app/job/JobScheduler.java
index 7fe192c..ca7022d 100644
--- a/core/java/android/app/job/JobScheduler.java
+++ b/core/java/android/app/job/JobScheduler.java
@@ -22,7 +22,13 @@
/**
* Class for scheduling various types of jobs with the scheduling framework on the device.
- *
+ * See {@link android.app.job.JobInfo} for more description of the types of jobs that can be run
+ * and how to construct them.
+ * The framework will be intelligent about when you receive your callbacks, and attempt to batch
+ * and defer them as much as possible. Typically if you don't specify a deadline on your job, it
+ * can be run at any moment depending on the current state of the JobScheduler's internal queue,
+ * however it might be deferred as long as until the next time the device is connected to a power
+ * source.
* <p>You do not
* instantiate this class directly; instead, retrieve it through
* {@link android.content.Context#getSystemService
diff --git a/core/java/android/bluetooth/BluetoothGatt.java b/core/java/android/bluetooth/BluetoothGatt.java
index 59d7956..d77a77b 100644
--- a/core/java/android/bluetooth/BluetoothGatt.java
+++ b/core/java/android/bluetooth/BluetoothGatt.java
@@ -96,19 +96,19 @@
* Bluetooth SIG. This is the default value if no connection parameter update
* is requested.
*/
- public static final int GATT_CONNECTION_BALANCED = 0;
+ public static final int CONNECTION_PRIORITY_BALANCED = 0;
/**
* Connection paramter update - Request a high priority, low latency connection.
* An application should only request high priority connection paramters to transfer
* large amounts of data over LE quickly. Once the transfer is complete, the application
- * should request {@link BluetoothGatt#GATT_CONNECTION_BALANCED} connectoin parameters
+ * should request {@link BluetoothGatt#CONNECTION_PRIORITY_BALANCED} connectoin parameters
* to reduce energy use.
*/
- public static final int GATT_CONNECTION_HIGH_PRIORITY = 1;
+ public static final int CONNECTION_PRIORITY_HIGH = 1;
/** Connection paramter update - Request low power, reduced data rate connection parameters. */
- public static final int GATT_CONNECTION_LOW_POWER = 2;
+ public static final int CONNECTION_PRIORITY_LOW_POWER = 2;
/**
* No authentication required.
@@ -601,7 +601,7 @@
return;
}
try {
- mCallback.onConfigureMTU(BluetoothGatt.this, mtu, status);
+ mCallback.onMtuChanged(BluetoothGatt.this, mtu, status);
} catch (Exception ex) {
Log.w(TAG, "Unhandled exception in callback", ex);
}
@@ -1239,20 +1239,20 @@
}
/**
- * Configure the MTU used for a given connection.
+ * Request an MTU size used for a given connection.
*
* <p>When performing a write request operation (write without response),
* the data sent is truncated to the MTU size. This function may be used
- * to request a larget MTU size to be able to send more data at once.
+ * to request a larger MTU size to be able to send more data at once.
*
- * <p>A {@link BluetoothGattCallback#onConfigureMTU} callback will indicate
+ * <p>A {@link BluetoothGattCallback#onMtuChanged} callback will indicate
* whether this operation was successful.
*
* <p>Requires {@link android.Manifest.permission#BLUETOOTH} permission.
*
* @return true, if the new MTU value has been requested successfully
*/
- public boolean configureMTU(int mtu) {
+ public boolean requestMtu(int mtu) {
if (DBG) Log.d(TAG, "configureMTU() - device: " + mDevice.getAddress()
+ " mtu: " + mtu);
if (mService == null || mClientIf == 0) return false;
@@ -1274,19 +1274,19 @@
* remote device.
*
* @param connectionPriority Request a specific connection priority. Must be one of
- * {@link BluetoothGatt#GATT_CONNECTION_BALANCED},
- * {@link BluetoothGatt#GATT_CONNECTION_HIGH_PRIORITY}
- * or {@link BluetoothGatt#GATT_CONNECTION_LOW_POWER}.
+ * {@link BluetoothGatt#CONNECTION_PRIORITY_BALANCED},
+ * {@link BluetoothGatt#CONNECTION_PRIORITY_HIGH}
+ * or {@link BluetoothGatt#CONNECTION_PRIORITY_LOW_POWER}.
* @throws IllegalArgumentException If the parameters are outside of their
* specified range.
*/
- public boolean requestConnectionParameterUpdate(int connectionPriority) {
- if (connectionPriority < GATT_CONNECTION_BALANCED ||
- connectionPriority > GATT_CONNECTION_LOW_POWER) {
+ public boolean requestConnectionPriority(int connectionPriority) {
+ if (connectionPriority < CONNECTION_PRIORITY_BALANCED ||
+ connectionPriority > CONNECTION_PRIORITY_LOW_POWER) {
throw new IllegalArgumentException("connectionPriority not within valid range");
}
- if (DBG) Log.d(TAG, "requestConnectionParameterUpdate() - params: " + connectionPriority);
+ if (DBG) Log.d(TAG, "requestConnectionPriority() - params: " + connectionPriority);
if (mService == null || mClientIf == 0) return false;
try {
diff --git a/core/java/android/bluetooth/BluetoothGattCallback.java b/core/java/android/bluetooth/BluetoothGattCallback.java
index 5817d68..19900ec 100644
--- a/core/java/android/bluetooth/BluetoothGattCallback.java
+++ b/core/java/android/bluetooth/BluetoothGattCallback.java
@@ -143,14 +143,14 @@
* Callback indicating the MTU for a given device connection has changed.
*
* This callback is triggered in response to the
- * {@link BluetoothGatt#configureMTU} function, or in response to a connection
+ * {@link BluetoothGatt#requestMtu} function, or in response to a connection
* event.
*
- * @param gatt GATT client invoked {@link BluetoothGatt#configureMTU}
+ * @param gatt GATT client invoked {@link BluetoothGatt#requestMtu}
* @param mtu The new MTU size
* @param status {@link BluetoothGatt#GATT_SUCCESS} if the MTU has been changed successfully
*/
- public void onConfigureMTU(BluetoothGatt gatt, int mtu, int status) {
+ public void onMtuChanged(BluetoothGatt gatt, int mtu, int status) {
}
/**
diff --git a/core/java/android/bluetooth/BluetoothGattServerCallback.java b/core/java/android/bluetooth/BluetoothGattServerCallback.java
index 3a1b38ee..b0ddc26 100644
--- a/core/java/android/bluetooth/BluetoothGattServerCallback.java
+++ b/core/java/android/bluetooth/BluetoothGattServerCallback.java
@@ -141,7 +141,7 @@
* notifications.
*
* @param device The remote device the notification has been sent to
- * @param status 0 if the operation was successful
+ * @param status {@link BluetoothGatt#GATT_SUCCESS} if the operation was successful
*/
public void onNotificationSent(BluetoothDevice device, int status) {
}
diff --git a/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java b/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
index f6315ac..3568f26 100644
--- a/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
+++ b/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
@@ -21,7 +21,6 @@
import android.bluetooth.BluetoothGattCallbackWrapper;
import android.bluetooth.BluetoothUuid;
import android.bluetooth.IBluetoothGatt;
-import android.bluetooth.IBluetoothGattCallback;
import android.bluetooth.IBluetoothManager;
import android.os.Handler;
import android.os.Looper;
@@ -30,7 +29,6 @@
import android.util.Log;
import java.util.HashMap;
-import java.util.List;
import java.util.Map;
import java.util.UUID;
@@ -108,41 +106,37 @@
public void startAdvertising(AdvertiseSettings settings,
AdvertiseData advertiseData, AdvertiseData scanResponse,
final AdvertiseCallback callback) {
- checkAdapterState();
- if (callback == null) {
- throw new IllegalArgumentException("callback cannot be null");
- }
- if (totalBytes(advertiseData) > MAX_ADVERTISING_DATA_BYTES ||
- totalBytes(scanResponse) > MAX_ADVERTISING_DATA_BYTES) {
- postCallbackFailure(callback, AdvertiseCallback.ADVERTISE_FAILED_DATA_TOO_LARGE);
- return;
- }
- if (mLeAdvertisers.containsKey(callback)) {
- postCallbackFailure(callback, AdvertiseCallback.ADVERTISE_FAILED_ALREADY_STARTED);
- return;
- }
- IBluetoothGatt gatt;
- try {
- gatt = mBluetoothManager.getBluetoothGatt();
- } catch (RemoteException e) {
- Log.e(TAG, "Failed to get Bluetooth gatt - ", e);
- postCallbackFailure(callback, AdvertiseCallback.ADVERTISE_FAILED_INTERNAL_ERROR);
- return;
- }
- if (!mBluetoothAdapter.isMultipleAdvertisementSupported()) {
- postCallbackFailure(callback, AdvertiseCallback.ADVERTISE_FAILED_FEATURE_UNSUPPORTED);
- return;
- }
- AdvertiseCallbackWrapper wrapper = new AdvertiseCallbackWrapper(callback, advertiseData,
- scanResponse, settings, gatt);
- UUID uuid = UUID.randomUUID();
- try {
- gatt.registerClient(new ParcelUuid(uuid), wrapper);
- if (wrapper.advertiseStarted()) {
- mLeAdvertisers.put(callback, wrapper);
+ synchronized (mLeAdvertisers) {
+ checkAdapterState();
+ if (callback == null) {
+ throw new IllegalArgumentException("callback cannot be null");
}
- } catch (RemoteException e) {
- Log.e(TAG, "Failed to stop advertising", e);
+ if (!mBluetoothAdapter.isMultipleAdvertisementSupported()) {
+ postStartFailure(callback,
+ AdvertiseCallback.ADVERTISE_FAILED_FEATURE_UNSUPPORTED);
+ return;
+ }
+ if (totalBytes(advertiseData) > MAX_ADVERTISING_DATA_BYTES ||
+ totalBytes(scanResponse) > MAX_ADVERTISING_DATA_BYTES) {
+ postStartFailure(callback, AdvertiseCallback.ADVERTISE_FAILED_DATA_TOO_LARGE);
+ return;
+ }
+ if (mLeAdvertisers.containsKey(callback)) {
+ postStartFailure(callback, AdvertiseCallback.ADVERTISE_FAILED_ALREADY_STARTED);
+ return;
+ }
+
+ IBluetoothGatt gatt;
+ try {
+ gatt = mBluetoothManager.getBluetoothGatt();
+ } catch (RemoteException e) {
+ Log.e(TAG, "Failed to get Bluetooth gatt - ", e);
+ postStartFailure(callback, AdvertiseCallback.ADVERTISE_FAILED_INTERNAL_ERROR);
+ return;
+ }
+ AdvertiseCallbackWrapper wrapper = new AdvertiseCallbackWrapper(callback, advertiseData,
+ scanResponse, settings, gatt);
+ wrapper.startRegisteration();
}
}
@@ -155,23 +149,14 @@
* @param callback {@link AdvertiseCallback} identifies the advertising instance to stop.
*/
public void stopAdvertising(final AdvertiseCallback callback) {
- checkAdapterState();
- if (callback == null) {
- throw new IllegalArgumentException("callback cannot be null");
- }
- AdvertiseCallbackWrapper wrapper = mLeAdvertisers.get(callback);
- if (wrapper == null)
- return;
- try {
- IBluetoothGatt gatt = mBluetoothManager.getBluetoothGatt();
- if (gatt != null)
- gatt.stopMultiAdvertising(wrapper.mClientIf);
-
- if (wrapper.advertiseStopped()) {
- mLeAdvertisers.remove(callback);
+ synchronized (mLeAdvertisers) {
+ checkAdapterState();
+ if (callback == null) {
+ throw new IllegalArgumentException("callback cannot be null");
}
- } catch (RemoteException e) {
- Log.e(TAG, "Failed to stop advertising", e);
+ AdvertiseCallbackWrapper wrapper = mLeAdvertisers.get(callback);
+ if (wrapper == null) return;
+ wrapper.stopAdvertising();
}
}
@@ -186,9 +171,7 @@
// Compute the size of the advertise data.
private int totalBytes(AdvertiseData data) {
- if (data == null) {
- return 0;
- }
+ if (data == null) return 0;
int size = FLAGS_FIELD_BYTES; // flags field is always set.
if (data.getServiceUuids() != null) {
int num16BitUuids = 0;
@@ -243,7 +226,7 @@
/**
* Bluetooth GATT interface callbacks for advertising.
*/
- private static class AdvertiseCallbackWrapper extends BluetoothGattCallbackWrapper {
+ private class AdvertiseCallbackWrapper extends BluetoothGattCallbackWrapper {
private static final int LE_CALLBACK_TIMEOUT_MILLIS = 2000;
private final AdvertiseCallback mAdvertiseCallback;
private final AdvertiseData mAdvertisement;
@@ -269,30 +252,40 @@
mClientIf = 0;
}
- public boolean advertiseStarted() {
- boolean started = false;
+ public void startRegisteration() {
synchronized (this) {
- if (mClientIf == -1) {
- return false;
- }
+ if (mClientIf == -1) return;
+
try {
+ UUID uuid = UUID.randomUUID();
+ mBluetoothGatt.registerClient(new ParcelUuid(uuid), this);
wait(LE_CALLBACK_TIMEOUT_MILLIS);
- } catch (InterruptedException e) {
- Log.e(TAG, "Callback reg wait interrupted: ", e);
+ } catch (InterruptedException | RemoteException e) {
+ Log.e(TAG, "Failed to start registeration", e);
}
- started = (mClientIf > 0 && mIsAdvertising);
+ if (mClientIf > 0 && mIsAdvertising) {
+ mLeAdvertisers.put(mAdvertiseCallback, this);
+ } else {
+ postStartFailure(mAdvertiseCallback,
+ AdvertiseCallback.ADVERTISE_FAILED_INTERNAL_ERROR);
+ }
}
- return started;
}
- public boolean advertiseStopped() {
+ public void stopAdvertising() {
synchronized (this) {
try {
+ mBluetoothGatt.stopMultiAdvertising(mClientIf);
wait(LE_CALLBACK_TIMEOUT_MILLIS);
- } catch (InterruptedException e) {
- Log.e(TAG, "Callback reg wait interrupted: " + e);
+ } catch (InterruptedException | RemoteException e) {
+ Log.e(TAG, "Failed to stop advertising", e);
}
- return !mIsAdvertising;
+ // Advertise callback should have been removed from LeAdvertisers when
+ // onMultiAdvertiseCallback was called. In case onMultiAdvertiseCallback is never
+ // invoked and wait timeout expires, remove callback here.
+ if (mLeAdvertisers.containsKey(mAdvertiseCallback)) {
+ mLeAdvertisers.remove(mAdvertiseCallback);
+ }
}
}
@@ -308,16 +301,14 @@
try {
mBluetoothGatt.startMultiAdvertising(mClientIf, mAdvertisement,
mScanResponse, mSettings);
+ return;
} catch (RemoteException e) {
- Log.e(TAG, "fail to start le advertise: " + e);
- mClientIf = -1;
- notifyAll();
+ Log.e(TAG, "failed to start advertising", e);
}
- } else {
- // registration failed
- mClientIf = -1;
- notifyAll();
}
+ // Registration failed.
+ mClientIf = -1;
+ notifyAll();
}
}
@@ -328,11 +319,11 @@
if (isStart) {
if (status == AdvertiseCallback.ADVERTISE_SUCCESS) {
// Start success
- mAdvertiseCallback.onStartSuccess(settings);
mIsAdvertising = true;
+ postStartSuccess(mAdvertiseCallback, settings);
} else {
// Start failure.
- mAdvertiseCallback.onStartFailure(status);
+ postStartFailure(mAdvertiseCallback, status);
}
} else {
// unregister client for stop.
@@ -340,6 +331,7 @@
mBluetoothGatt.unregisterClient(mClientIf);
mClientIf = -1;
mIsAdvertising = false;
+ mLeAdvertisers.remove(mAdvertiseCallback);
} catch (RemoteException e) {
Log.e(TAG, "remote exception when unregistering", e);
}
@@ -357,12 +349,23 @@
}
}
- private void postCallbackFailure(final AdvertiseCallback callback, final int error) {
+ private void postStartFailure(final AdvertiseCallback callback, final int error) {
mHandler.post(new Runnable() {
- @Override
+ @Override
public void run() {
callback.onStartFailure(error);
}
});
}
+
+ private void postStartSuccess(final AdvertiseCallback callback,
+ final AdvertiseSettings settings) {
+ mHandler.post(new Runnable() {
+
+ @Override
+ public void run() {
+ callback.onStartSuccess(settings);
+ }
+ });
+ }
}
diff --git a/core/java/android/content/res/Configuration.java b/core/java/android/content/res/Configuration.java
index a83bd4a..d19418b 100644
--- a/core/java/android/content/res/Configuration.java
+++ b/core/java/android/content/res/Configuration.java
@@ -1470,6 +1470,12 @@
case 320:
parts.add("xhdpi");
break;
+ case 480:
+ parts.add("xxhdpi");
+ break;
+ case 640:
+ parts.add("xxxhdpi");
+ break;
default:
parts.add(config.densityDpi + "dpi");
break;
@@ -1542,7 +1548,7 @@
break;
}
- parts.add("v" + Build.VERSION.SDK_INT);
+ parts.add("v" + Build.VERSION.RESOURCES_SDK_INT);
return TextUtils.join("-", parts);
}
}
diff --git a/core/java/android/hardware/camera2/CameraCharacteristics.java b/core/java/android/hardware/camera2/CameraCharacteristics.java
index 4e7f9dd..c525348 100644
--- a/core/java/android/hardware/camera2/CameraCharacteristics.java
+++ b/core/java/android/hardware/camera2/CameraCharacteristics.java
@@ -313,18 +313,18 @@
/**
* <p>The set of aberration correction modes supported by this camera device.</p>
- * <p>This metadata lists the valid modes for {@link CaptureRequest#COLOR_CORRECTION_ABERRATION_CORRECTION_MODE android.colorCorrection.aberrationCorrectionMode}.
+ * <p>This metadata lists the valid modes for {@link CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE android.colorCorrection.aberrationMode}.
* If no aberration correction modes are available for a device, this list will solely include
* OFF mode.</p>
* <p>For FULL capability device ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} <code>==</code> FULL), OFF must be
* included.</p>
*
- * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_CORRECTION_MODE
+ * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
* @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
*/
@PublicKey
- public static final Key<int[]> COLOR_CORRECTION_AVAILABLE_ABERRATION_CORRECTION_MODES =
- new Key<int[]>("android.colorCorrection.availableAberrationCorrectionModes", int[].class);
+ public static final Key<int[]> COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES =
+ new Key<int[]>("android.colorCorrection.availableAberrationModes", int[].class);
/**
* <p>The set of auto-exposure antibanding modes that are
diff --git a/core/java/android/hardware/camera2/CameraMetadata.java b/core/java/android/hardware/camera2/CameraMetadata.java
index 9bdfe8b..3c9b7b3 100644
--- a/core/java/android/hardware/camera2/CameraMetadata.java
+++ b/core/java/android/hardware/camera2/CameraMetadata.java
@@ -386,8 +386,8 @@
* </ul>
* </li>
* <li>Manual aberration correction control (if aberration correction is supported)<ul>
- * <li>{@link CaptureRequest#COLOR_CORRECTION_ABERRATION_CORRECTION_MODE android.colorCorrection.aberrationCorrectionMode}</li>
- * <li>{@link CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_CORRECTION_MODES android.colorCorrection.availableAberrationCorrectionModes}</li>
+ * <li>{@link CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE android.colorCorrection.aberrationMode}</li>
+ * <li>{@link CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES android.colorCorrection.availableAberrationModes}</li>
* </ul>
* </li>
* </ul>
@@ -396,8 +396,8 @@
* <p>A given camera device may also support additional post-processing
* controls, but this capability only covers the above list of controls.</p>
*
- * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_CORRECTION_MODE
- * @see CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_CORRECTION_MODES
+ * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
+ * @see CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES
* @see CaptureRequest#COLOR_CORRECTION_GAINS
* @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
* @see CaptureRequest#SHADING_MODE
@@ -739,28 +739,28 @@
public static final int COLOR_CORRECTION_MODE_HIGH_QUALITY = 2;
//
- // Enumeration values for CaptureRequest#COLOR_CORRECTION_ABERRATION_CORRECTION_MODE
+ // Enumeration values for CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
//
/**
* <p>No aberration correction is applied.</p>
- * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_CORRECTION_MODE
+ * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
*/
- public static final int COLOR_CORRECTION_ABERRATION_CORRECTION_MODE_OFF = 0;
+ public static final int COLOR_CORRECTION_ABERRATION_MODE_OFF = 0;
/**
* <p>Aberration correction will not slow down capture rate
* relative to sensor raw output.</p>
- * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_CORRECTION_MODE
+ * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
*/
- public static final int COLOR_CORRECTION_ABERRATION_CORRECTION_MODE_FAST = 1;
+ public static final int COLOR_CORRECTION_ABERRATION_MODE_FAST = 1;
/**
* <p>Aberration correction operates at improved quality but reduced
* capture rate (relative to sensor raw output).</p>
- * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_CORRECTION_MODE
+ * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
*/
- public static final int COLOR_CORRECTION_ABERRATION_CORRECTION_MODE_HIGH_QUALITY = 2;
+ public static final int COLOR_CORRECTION_ABERRATION_MODE_HIGH_QUALITY = 2;
//
// Enumeration values for CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
@@ -1213,7 +1213,8 @@
* image while recording video) use case.</p>
* <p>The camera device should take the highest-quality image
* possible (given the other settings) without disrupting the
- * frame rate of video recording. </p>
+ * frame rate of video recording.<br />
+ * </p>
* @see CaptureRequest#CONTROL_CAPTURE_INTENT
*/
public static final int CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT = 4;
diff --git a/core/java/android/hardware/camera2/CaptureRequest.java b/core/java/android/hardware/camera2/CaptureRequest.java
index 97077e6..bcdcd62 100644
--- a/core/java/android/hardware/camera2/CaptureRequest.java
+++ b/core/java/android/hardware/camera2/CaptureRequest.java
@@ -569,7 +569,7 @@
/**
* <p>Mode of operation for the chromatic aberration correction algorithm.</p>
* <p>This must be set to a valid mode from
- * {@link CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_CORRECTION_MODES android.colorCorrection.availableAberrationCorrectionModes}.</p>
+ * {@link CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES android.colorCorrection.availableAberrationModes}.</p>
* <p>Chromatic (color) aberration is caused by the fact that different wavelengths of light
* can not focus on the same point after exiting from the lens. This metadata defines
* the high level control of chromatic aberration correction algorithm, which aims to
@@ -581,14 +581,14 @@
* capture rate. FAST means the camera device will not slow down capture rate when
* applying aberration correction.</p>
*
- * @see CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_CORRECTION_MODES
- * @see #COLOR_CORRECTION_ABERRATION_CORRECTION_MODE_OFF
- * @see #COLOR_CORRECTION_ABERRATION_CORRECTION_MODE_FAST
- * @see #COLOR_CORRECTION_ABERRATION_CORRECTION_MODE_HIGH_QUALITY
+ * @see CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES
+ * @see #COLOR_CORRECTION_ABERRATION_MODE_OFF
+ * @see #COLOR_CORRECTION_ABERRATION_MODE_FAST
+ * @see #COLOR_CORRECTION_ABERRATION_MODE_HIGH_QUALITY
*/
@PublicKey
- public static final Key<Integer> COLOR_CORRECTION_ABERRATION_CORRECTION_MODE =
- new Key<Integer>("android.colorCorrection.aberrationCorrectionMode", int.class);
+ public static final Key<Integer> COLOR_CORRECTION_ABERRATION_MODE =
+ new Key<Integer>("android.colorCorrection.aberrationMode", int.class);
/**
* <p>The desired setting for the camera device's auto-exposure
diff --git a/core/java/android/hardware/camera2/CaptureResult.java b/core/java/android/hardware/camera2/CaptureResult.java
index 63dff55..f9c4df4 100644
--- a/core/java/android/hardware/camera2/CaptureResult.java
+++ b/core/java/android/hardware/camera2/CaptureResult.java
@@ -420,7 +420,7 @@
/**
* <p>Mode of operation for the chromatic aberration correction algorithm.</p>
* <p>This must be set to a valid mode from
- * {@link CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_CORRECTION_MODES android.colorCorrection.availableAberrationCorrectionModes}.</p>
+ * {@link CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES android.colorCorrection.availableAberrationModes}.</p>
* <p>Chromatic (color) aberration is caused by the fact that different wavelengths of light
* can not focus on the same point after exiting from the lens. This metadata defines
* the high level control of chromatic aberration correction algorithm, which aims to
@@ -432,14 +432,14 @@
* capture rate. FAST means the camera device will not slow down capture rate when
* applying aberration correction.</p>
*
- * @see CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_CORRECTION_MODES
- * @see #COLOR_CORRECTION_ABERRATION_CORRECTION_MODE_OFF
- * @see #COLOR_CORRECTION_ABERRATION_CORRECTION_MODE_FAST
- * @see #COLOR_CORRECTION_ABERRATION_CORRECTION_MODE_HIGH_QUALITY
+ * @see CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES
+ * @see #COLOR_CORRECTION_ABERRATION_MODE_OFF
+ * @see #COLOR_CORRECTION_ABERRATION_MODE_FAST
+ * @see #COLOR_CORRECTION_ABERRATION_MODE_HIGH_QUALITY
*/
@PublicKey
- public static final Key<Integer> COLOR_CORRECTION_ABERRATION_CORRECTION_MODE =
- new Key<Integer>("android.colorCorrection.aberrationCorrectionMode", int.class);
+ public static final Key<Integer> COLOR_CORRECTION_ABERRATION_MODE =
+ new Key<Integer>("android.colorCorrection.aberrationMode", int.class);
/**
* <p>The desired setting for the camera device's auto-exposure
diff --git a/core/java/android/nfc/INfcAdapter.aidl b/core/java/android/nfc/INfcAdapter.aidl
index 5815fa6..4039992 100644
--- a/core/java/android/nfc/INfcAdapter.aidl
+++ b/core/java/android/nfc/INfcAdapter.aidl
@@ -57,7 +57,6 @@
void setReaderMode (IBinder b, IAppCallback callback, int flags, in Bundle extras);
void setP2pModes(int initatorModes, int targetModes);
- void registerLockscreenDispatch(INfcLockscreenDispatch lockscreenDispatch, in int[] techList);
void addNfcUnlockHandler(INfcUnlockHandler unlockHandler, in int[] techList);
void removeNfcUnlockHandler(INfcUnlockHandler unlockHandler);
}
diff --git a/core/java/android/nfc/NfcAdapter.java b/core/java/android/nfc/NfcAdapter.java
index 6bd5a32..7cc8ca4 100644
--- a/core/java/android/nfc/NfcAdapter.java
+++ b/core/java/android/nfc/NfcAdapter.java
@@ -384,16 +384,6 @@
public Uri[] createBeamUris(NfcEvent event);
}
-
- /**
- * A callback to be invoked when an application has registered for receiving
- * tags at the lockscreen.
- */
- public interface NfcLockscreenDispatch {
- public boolean onTagDetected(Tag tag);
- }
-
-
/**
* A callback to be invoked when an application has registered as a
* handler to unlock the device given an NFC tag at the lockscreen.
@@ -1468,26 +1458,6 @@
}
}
- public boolean registerLockscreenDispatch(final NfcLockscreenDispatch lockscreenDispatch,
- String[] techList) {
- try {
- sService.registerLockscreenDispatch(new INfcLockscreenDispatch.Stub() {
- @Override
- public boolean onTagDetected(Tag tag) throws RemoteException {
- return lockscreenDispatch.onTagDetected(tag);
- }
- }, Tag.getTechCodesFromStrings(techList));
- } catch (RemoteException e) {
- attemptDeadServiceRecovery(e);
- return false;
- } catch (IllegalArgumentException e) {
- Log.e(TAG, "Unable to register LockscreenDispatch", e);
- return false;
- }
-
- return true;
- }
-
/**
* Registers a new NFC unlock handler with the NFC service.
*
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 52f1dd9..2241716 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -2674,6 +2674,9 @@
*/
public static final String[] CLONE_TO_MANAGED_PROFILE = {
DATE_FORMAT,
+ HAPTIC_FEEDBACK_ENABLED,
+ SOUND_EFFECTS_ENABLED,
+ TEXT_SHOW_PASSWORD,
TIME_12_24
};
@@ -4737,17 +4740,16 @@
/**
* List of TV inputs that are currently hidden. This is a string
- * containing the IDs of all hidden TV inputs. Each ID is separated by ':'.
- *
+ * containing the IDs of all hidden TV inputs. Each ID is encoded by
+ * {@link android.net.Uri#encode(String)} and separated by ':'.
* @hide
*/
public static final String TV_INPUT_HIDDEN_INPUTS = "tv_input_hidden_inputs";
/**
* List of custom TV input labels. This is a string containing <TV input id, custom name>
- * pairs. Each pair is separated by ':' and TV input id and custom name are separated by
- * ','.
- *
+ * pairs. TV input id and custom name are encoded by {@link android.net.Uri#encode(String)}
+ * and separated by ','. Each pair is separated by ':'.
* @hide
*/
public static final String TV_INPUT_CUSTOM_LABELS = "tv_input_custom_labels";
diff --git a/core/java/android/text/style/TtsSpan.java b/core/java/android/text/style/TtsSpan.java
index cb447fd..342a183 100644
--- a/core/java/android/text/style/TtsSpan.java
+++ b/core/java/android/text/style/TtsSpan.java
@@ -26,10 +26,14 @@
/**
* A span that supplies additional meta-data for the associated text intended
- * for text-to-speech engines. If the text is being processed by a
+ * for text-to-speech engines. If the text is being processed by a
* text-to-speech engine, the engine may use the data in this span in addition
* to or instead of its associated text.
*
+ * Each instance of a TtsSpan has a type, for example {@link #TYPE_DATE}
+ * or {@link #TYPE_MEASURE}. And a list of arguments, provided as
+ * key-value pairs in a bundle.
+ *
* The inner classes are there for convenience and provide builders for each
* TtsSpan type.
*/
@@ -39,7 +43,7 @@
/**
* This span type can be used to add morphosyntactic features to the text it
- * spans over, or synthesize a something else than the spanned text. Use
+ * spans over, or synthesize a something else than the spanned text. Use
* the argument {@link #ARG_TEXT} to set a different text.
* Accepts the arguments {@link #ARG_GENDER},
* {@link #ARG_ANIMACY}, {@link #ARG_MULTIPLICITY} and
@@ -48,7 +52,7 @@
public static final String TYPE_TEXT = "android.type.text";
/**
- * The text associated with this span is a cardinal. Must include the
+ * The text associated with this span is a cardinal. Must include the
* number to be synthesized with {@link #ARG_NUMBER}.
* Also accepts the arguments {@link #ARG_GENDER},
* {@link #ARG_ANIMACY}, {@link #ARG_MULTIPLICITY} and
@@ -108,12 +112,12 @@
public static final String TYPE_TIME = "android.type.time";
/**
- * The text associated with this span is a date. All arguments are optional,
- * but at least one has to be provided: {@link #ARG_WEEKDAY},
- * {@link #ARG_DAY}, {@link #ARG_MONTH} and {@link #ARG_YEAR}.
- * Also accepts the arguments {@link #ARG_GENDER},
- * {@link #ARG_ANIMACY}, {@link #ARG_MULTIPLICITY} and
- * {@link #ARG_CASE}.
+ * The text associated with this span is a date. At least one of the
+ * arguments {@link #ARG_MONTH} and {@link #ARG_YEAR} has to be provided.
+ * The argument {@link #ARG_DAY} is optional if {@link #ARG_MONTH} is set.
+ * The argument {@link #ARG_WEEKDAY} is optional if {@link #ARG_DAY} is set.
+ * Also accepts the arguments {@link #ARG_GENDER}, {@link #ARG_ANIMACY},
+ * {@link #ARG_MULTIPLICITY} and {@link #ARG_CASE}.
*/
public static final String TYPE_DATE = "android.type.date";
@@ -121,13 +125,11 @@
* The text associated with this span is a telephone number. The argument
* {@link #ARG_NUMBER_PARTS} is required. {@link #ARG_COUNTRY_CODE} and
* {@link #ARG_EXTENSION} are optional.
- * Also accepts the arguments {@link #ARG_GENDER},
- * {@link #ARG_ANIMACY}, {@link #ARG_MULTIPLICITY} and
- * {@link #ARG_CASE}.
+ * Also accepts the arguments {@link #ARG_GENDER}, {@link #ARG_ANIMACY},
+ * {@link #ARG_MULTIPLICITY} and {@link #ARG_CASE}.
*/
public static final String TYPE_TELEPHONE = "android.type.telephone";
-
/**
* The text associated with this span is a URI (can be used for URLs and
* email addresses). The full schema for URLs, which email addresses can
@@ -138,9 +140,8 @@
* {@link #ARG_PROTOCOL}, {@link #ARG_USERNAME}, {@link #ARG_PASSWORD},
* {@link #ARG_DOMAIN}, {@link #ARG_PORT}, {@link #ARG_PATH},
* {@link #ARG_QUERY_STRING} and {@link #ARG_FRAGMENT_ID}.
- * Also accepts the arguments {@link #ARG_GENDER},
- * {@link #ARG_ANIMACY}, {@link #ARG_MULTIPLICITY} and
- * {@link #ARG_CASE}.
+ * Also accepts the arguments {@link #ARG_GENDER}, {@link #ARG_ANIMACY},
+ * {@link #ARG_MULTIPLICITY} and {@link #ARG_CASE}.
*/
public static final String TYPE_ELECTRONIC = "android.type.electronic";
@@ -149,18 +150,16 @@
* with the same arguments as {@link #TYPE_DECIMAL}.
* {@link #ARG_CURRENCY} is used to set the currency. {@link #ARG_QUANTITY}
* is optional.
- * Also accepts the arguments {@link #ARG_GENDER},
- * {@link #ARG_ANIMACY}, {@link #ARG_MULTIPLICITY} and
- * {@link #ARG_CASE}.
+ * Also accepts the arguments {@link #ARG_GENDER}, {@link #ARG_ANIMACY},
+ * {@link #ARG_MULTIPLICITY} and {@link #ARG_CASE}.
*/
public static final String TYPE_MONEY = "android.type.money";
/**
* The text associated with this span is a series of digits that have to be
- * read sequentially. {@link #ARG_DIGITS} is required.
- * Also accepts the arguments {@link #ARG_GENDER},
- * {@link #ARG_ANIMACY}, {@link #ARG_MULTIPLICITY} and
- * {@link #ARG_CASE}.
+ * read sequentially. The digits can be set with {@link #ARG_DIGITS}.
+ * Also accepts the arguments {@link #ARG_GENDER}, {@link #ARG_ANIMACY},
+ * {@link #ARG_MULTIPLICITY} and {@link #ARG_CASE}.
*/
public static final String TYPE_DIGITS = "android.type.digits";
@@ -169,13 +168,12 @@
* be read verbatim. The engine will attempt to ready out any character like
* punctuation but excluding whitespace. {@link #ARG_VERBATIM} is required.
* Also accepts the arguments {@link #ARG_GENDER},
- * {@link #ARG_ANIMACY}, {@link #ARG_MULTIPLICITY} and
- * {@link #ARG_CASE}.
+ * {@link #ARG_ANIMACY}, {@link #ARG_MULTIPLICITY} and {@link #ARG_CASE}.
*/
public static final String TYPE_VERBATIM = "android.type.verbatim";
/**
- * String argument supplying gender information. Can be any of
+ * String argument supplying gender information. Can be any of
* {@link #GENDER_NEUTRAL}, {@link #GENDER_MALE} and
* {@link #GENDER_FEMALE}.
*/
@@ -186,7 +184,7 @@
public static final String GENDER_FEMALE = "android.female";
/**
- * String argument supplying animacy information. Can be
+ * String argument supplying animacy information. Can be
* {@link #ANIMACY_ANIMATE} or
* {@link #ANIMACY_INANIMATE}
*/
@@ -196,9 +194,8 @@
public static final String ANIMACY_INANIMATE = "android.inanimate";
/**
- * String argument supplying multiplicity information. Can be any of
- * {@link #MULTIPLICITY_SINGLE},
- * {@link #MULTIPLICITY_DUAL} and
+ * String argument supplying multiplicity information. Can be any of
+ * {@link #MULTIPLICITY_SINGLE}, {@link #MULTIPLICITY_DUAL} and
* {@link #MULTIPLICITY_PLURAL}
*/
public static final String ARG_MULTIPLICITY = "android.arg.multiplicity";
@@ -208,16 +205,14 @@
public static final String MULTIPLICITY_PLURAL = "android.plural";
/**
- * String argument supplying case information. Can be any of
- * {@link #CASE_NOMINATIVE}, {@link #CASE_ACCUSATIVE},
- * {@link #CASE_DATIVE}, {@link #CASE_ABLATIVE},
- * {@link #CASE_GENITIVE}, {@link #CASE_VOCATIVE},
- * {@link #CASE_LOCATIVE} and
- * {@link #CASE_INSTRUMENTAL}
+ * String argument supplying case information. Can be any of
+ * {@link #CASE_NOMINATIVE}, {@link #CASE_ACCUSATIVE}, {@link #CASE_DATIVE},
+ * {@link #CASE_ABLATIVE}, {@link #CASE_GENITIVE}, {@link #CASE_VOCATIVE},
+ * {@link #CASE_LOCATIVE} and {@link #CASE_INSTRUMENTAL}
*/
public static final String ARG_CASE = "android.arg.case";
- public static final String CASE_NOMINATIVE = "android.nomative";
+ public static final String CASE_NOMINATIVE = "android.nominative";
public static final String CASE_ACCUSATIVE = "android.accusative";
public static final String CASE_DATIVE = "android.dative";
public static final String CASE_ABLATIVE = "android.ablative";
@@ -227,14 +222,14 @@
public static final String CASE_INSTRUMENTAL = "android.instrumental";
/**
- * String supplying the text to be synthesized. The synthesizer is free
+ * String supplying the text to be synthesized. The synthesizer is free
* to decide how to interpret the text.
* Can be used with {@link #TYPE_TEXT}.
*/
public static final String ARG_TEXT = "android.arg.text";
/**
- * Argument used to specify a whole number. The value can be a string of
+ * Argument used to specify a whole number. The value can be a string of
* digits of any size optionally prefixed with a - or +.
* Can be used with {@link #TYPE_CARDINAL} and {@link #TYPE_ORDINAL}.
*/
@@ -293,7 +288,7 @@
* specified in English singular form. Prefixes may be used. Engines will do
* their best to pronounce them correctly in the language used. Engines are
* expected to at least support the most common ones like "meter", "second",
- * "degree celcius" and "degree fahrenheit" with some common prefixes like
+ * "degree celsius" and "degree fahrenheit" with some common prefixes like
* "milli" and "kilo".
* Can be used with {@link #TYPE_MEASURE}.
*/
@@ -589,8 +584,8 @@
/**
* Sets the gender information for this instance.
- * @param gender Can any of {@link TtsSpan#GENDER_NEUTRAL},
- * {@link TtsSpan#GENDER_MALE} and {@link TtsSpan#GENDER_FEMALE}.
+ * @param gender Can any of {@link #GENDER_NEUTRAL},
+ * {@link #GENDER_MALE} and {@link #GENDER_FEMALE}.
* @return This instance.
*/
public C setGender(String gender) {
@@ -599,8 +594,8 @@
/**
* Sets the animacy information for this instance.
- * @param animacy Can be any of {@link TtsSpan#ANIMACY_ANIMATE} and
- * {@link TtsSpan#ANIMACY_INANIMATE}.
+ * @param animacy Can be any of {@link #ANIMACY_ANIMATE} and
+ * {@link #ANIMACY_INANIMATE}.
* @return This instance.
*/
public C setAnimacy(String animacy) {
@@ -610,9 +605,8 @@
/**
* Sets the multiplicity information for this instance.
* @param multiplicity Can be any of
- * {@link TtsSpan#MULTIPLICITY_SINGLE},
- * {@link TtsSpan#MULTIPLICITY_DUAL} and
- * {@link TtsSpan#MULTIPLICITY_PLURAL}.
+ * {@link #MULTIPLICITY_SINGLE}, {@link #MULTIPLICITY_DUAL} and
+ * {@link #MULTIPLICITY_PLURAL}.
* @return This instance.
*/
public C setMultiplicity(String multiplicity) {
@@ -621,11 +615,11 @@
/**
* Sets the grammatical case information for this instance.
- * @param grammaticalCase Can be any of {@link TtsSpan#CASE_NOMINATIVE},
- * {@link TtsSpan#CASE_ACCUSATIVE}, {@link TtsSpan#CASE_DATIVE},
- * {@link TtsSpan#CASE_ABLATIVE}, {@link TtsSpan#CASE_GENITIVE},
- * {@link TtsSpan#CASE_VOCATIVE}, {@link TtsSpan#CASE_LOCATIVE} and
- * {@link TtsSpan#CASE_INSTRUMENTAL}.
+ * @param grammaticalCase Can be any of {@link #CASE_NOMINATIVE},
+ * {@link #CASE_ACCUSATIVE}, {@link #CASE_DATIVE},
+ * {@link #CASE_ABLATIVE}, {@link #CASE_GENITIVE},
+ * {@link #CASE_VOCATIVE}, {@link #CASE_LOCATIVE} and
+ * {@link #CASE_INSTRUMENTAL}.
* @return This instance.
*/
public C setCase(String grammaticalCase) {
@@ -634,20 +628,20 @@
}
/**
- * A builder for TtsSpans of type {@link TtsSpan #TYPE_TEXT}.
+ * A builder for TtsSpans of type {@link #TYPE_TEXT}.
*/
public static class TextBuilder extends SemioticClassBuilder<TextBuilder> {
/**
- * Creates a builder for a TtsSpan of type {@link TtsSpan#TYPE_TEXT}.
+ * Creates a builder for a TtsSpan of type {@link #TYPE_TEXT}.
*/
public TextBuilder() {
super(TtsSpan.TYPE_TEXT);
}
/**
- * Creates a TtsSpan of type {@link TtsSpan#TYPE_TEXT} and sets the
- * {@link TtsSpan#ARG_TEXT} argument.
+ * Creates a TtsSpan of type {@link #TYPE_TEXT} and sets the
+ * {@link #ARG_TEXT} argument.
* @param text The text to be synthesized.
* @see #setText(String)
*/
@@ -657,8 +651,7 @@
}
/**
- * Sets the {@link TtsSpan#ARG_TEXT} argument, the text to be
- * synthesized.
+ * Sets the {@link #ARG_TEXT} argument, the text to be synthesized.
* @param text The string that will be synthesized.
* @return This instance.
*/
@@ -668,22 +661,21 @@
}
/**
- * A builder for TtsSpans of type {@link TtsSpan #TYPE_CARDINAL}.
+ * A builder for TtsSpans of type {@link #TYPE_CARDINAL}.
*/
public static class CardinalBuilder
extends SemioticClassBuilder<CardinalBuilder> {
/**
- * Creates a builder for a TtsSpan of type
- * {@link TtsSpan#TYPE_CARDINAL}.
+ * Creates a builder for a TtsSpan of type {@link #TYPE_CARDINAL}.
*/
public CardinalBuilder() {
super(TtsSpan.TYPE_CARDINAL);
}
/**
- * Creates a TtsSpan of type {@link TtsSpan#TYPE_CARDINAL} and sets the
- * {@link TtsSpan#ARG_NUMBER} argument.
+ * Creates a TtsSpan of type {@link #TYPE_CARDINAL} and sets the
+ * {@link #ARG_NUMBER} argument.
* @param number The number to synthesize.
* @see #setNumber(long)
*/
@@ -693,8 +685,8 @@
}
/**
- * Creates a TtsSpan of type {@link TtsSpan#TYPE_CARDINAL} and sets the
- * {@link TtsSpan#ARG_NUMBER} argument.
+ * Creates a TtsSpan of type {@link #TYPE_CARDINAL} and sets the
+ * {@link #ARG_NUMBER} argument.
* @param number The number to synthesize.
* @see #setNumber(String)
*/
@@ -705,7 +697,7 @@
/**
* Convenience method that converts the number to a String and set it to
- * the value for {@link TtsSpan#ARG_NUMBER}.
+ * the value for {@link #ARG_NUMBER}.
* @param number The number that will be synthesized.
* @return This instance.
*/
@@ -714,7 +706,7 @@
}
/**
- * Sets the {@link TtsSpan#ARG_NUMBER} argument.
+ * Sets the {@link #ARG_NUMBER} argument.
* @param number A non-empty string of digits with an optional
* leading + or -.
* @return This instance.
@@ -725,21 +717,21 @@
}
/**
- * A builder for TtsSpans of type {@link TtsSpan#TYPE_ORDINAL}.
+ * A builder for TtsSpans of type {@link #TYPE_ORDINAL}.
*/
public static class OrdinalBuilder
extends SemioticClassBuilder<OrdinalBuilder> {
/**
- * Creates a builder for a TtsSpan of type {@link TtsSpan#TYPE_ORDINAL}.
+ * Creates a builder for a TtsSpan of type {@link #TYPE_ORDINAL}.
*/
public OrdinalBuilder() {
super(TtsSpan.TYPE_ORDINAL);
}
/**
- * Creates a TtsSpan of type {@link TtsSpan#TYPE_ORDINAL} and sets the
- * {@link TtsSpan#ARG_NUMBER} argument.
+ * Creates a TtsSpan of type {@link #TYPE_ORDINAL} and sets the
+ * {@link #ARG_NUMBER} argument.
* @param number The ordinal number to synthesize.
* @see #setNumber(long)
*/
@@ -749,8 +741,8 @@
}
/**
- * Creates a TtsSpan of type {@link TtsSpan#TYPE_ORDINAL} and sets the
- * {@link TtsSpan#ARG_NUMBER} argument.
+ * Creates a TtsSpan of type {@link #TYPE_ORDINAL} and sets the
+ * {@link #ARG_NUMBER} argument.
* @param number The number to synthesize.
* @see #setNumber(String)
*/
@@ -761,7 +753,7 @@
/**
* Convenience method that converts the number to a String and sets it
- * to the value for {@link TtsSpan#ARG_NUMBER}.
+ * to the value for {@link #ARG_NUMBER}.
* @param number The ordinal number that will be synthesized.
* @return This instance.
*/
@@ -770,7 +762,7 @@
}
/**
- * Sets the {@link TtsSpan#ARG_NUMBER} argument.
+ * Sets the {@link #ARG_NUMBER} argument.
* @param number A non-empty string of digits with an optional
* leading + or -.
* @return This instance.
@@ -781,22 +773,21 @@
}
/**
- * A builder for TtsSpans of type {@link TtsSpan#TYPE_DECIMAL}.
+ * A builder for TtsSpans of type {@link #TYPE_DECIMAL}.
*/
public static class DecimalBuilder
extends SemioticClassBuilder<DecimalBuilder> {
/**
- * Creates a builder for a TtsSpan of type {@link TtsSpan#TYPE_DECIMAL}.
+ * Creates a builder for a TtsSpan of type {@link #TYPE_DECIMAL}.
*/
public DecimalBuilder() {
super(TtsSpan.TYPE_DECIMAL);
}
/**
- * Creates a TtsSpan of type {@link TtsSpan#TYPE_DECIMAL} and sets the
- * {@link TtsSpan#ARG_INTEGER_PART} and
- * {@link TtsSpan#ARG_FRACTIONAL_PART} arguments.
+ * Creates a TtsSpan of type {@link #TYPE_DECIMAL} and sets the
+ * {@link #ARG_INTEGER_PART} and {@link #ARG_FRACTIONAL_PART} arguments.
* @see {@link #setArgumentsFromDouble(double, int, int)
*/
public DecimalBuilder(double number,
@@ -809,9 +800,8 @@
}
/**
- * Creates a TtsSpan of type {@link TtsSpan#TYPE_DECIMAL} and sets the
- * {@link TtsSpan#ARG_INTEGER_PART} and
- * {@link TtsSpan#ARG_FRACTIONAL_PART} arguments.
+ * Creates a TtsSpan of type {@link #TYPE_DECIMAL} and sets the
+ * {@link #ARG_INTEGER_PART} and {@link #ARG_FRACTIONAL_PART} arguments.
*/
public DecimalBuilder(String integerPart, String fractionalPart) {
this();
@@ -821,8 +811,8 @@
/**
* Convenience method takes a double and a maximum number of fractional
- * digits, it sets the {@link TtsSpan#ARG_INTEGER_PART} and
- * {@link TtsSpan#ARG_FRACTIONAL_PART} arguments.
+ * digits, it sets the {@link #ARG_INTEGER_PART} and
+ * {@link #ARG_FRACTIONAL_PART} arguments.
* @param number The number to be synthesized.
* @param minimumFractionDigits The minimum number of fraction digits
* that are pronounced.
@@ -856,7 +846,7 @@
/**
* Convenience method that converts the number to a String and sets it
- * to the value for {@link TtsSpan#ARG_INTEGER_PART}.
+ * to the value for {@link #ARG_INTEGER_PART}.
* @param integerPart The integer part of the decimal.
* @return This instance.
*/
@@ -865,7 +855,7 @@
}
/**
- * Sets the {@link TtsSpan#ARG_INTEGER_PART} argument.
+ * Sets the {@link #ARG_INTEGER_PART} argument.
* @param integerPart A non-empty string of digits with an optional
* leading + or -.
* @return This instance.
@@ -875,7 +865,7 @@
}
/**
- * Sets the {@link TtsSpan#ARG_FRACTIONAL_PART} argument.
+ * Sets the {@link #ARG_FRACTIONAL_PART} argument.
* @param fractionalPart A non-empty string of digits.
* @return This instance.
*/
@@ -886,23 +876,22 @@
}
/**
- * A builder for TtsSpans of type {@link TtsSpan#TYPE_FRACTION}.
+ * A builder for TtsSpans of type {@link #TYPE_FRACTION}.
*/
public static class FractionBuilder
extends SemioticClassBuilder<FractionBuilder> {
/**
- * Creates a builder for a TtsSpan of type
- * {@link TtsSpan#TYPE_FRACTION}.
+ * Creates a builder for a TtsSpan of type {@link #TYPE_FRACTION}.
*/
public FractionBuilder() {
super(TtsSpan.TYPE_FRACTION);
}
/**
- * Creates a TtsSpan of type {@link TtsSpan#TYPE_FRACTION} and sets the
- * {@link TtsSpan#ARG_INTEGER_PART}, {@link TtsSpan#ARG_NUMERATOR}, and
- * {@link TtsSpan#ARG_DENOMINATOR} arguments.
+ * Creates a TtsSpan of type {@link #TYPE_FRACTION} and sets the
+ * {@link #ARG_INTEGER_PART}, {@link #ARG_NUMERATOR}, and
+ * {@link #ARG_DENOMINATOR} arguments.
*/
public FractionBuilder(long integerPart,
long numerator,
@@ -913,10 +902,9 @@
setDenominator(denominator);
}
-
/**
* Convenience method that converts the integer to a String and sets the
- * argument {@link TtsSpan#ARG_NUMBER}.
+ * argument {@link #ARG_NUMBER}.
* @param integerPart The integer part.
* @return This instance.
*/
@@ -925,7 +913,7 @@
}
/**
- * Sets the {@link TtsSpan#ARG_INTEGER_PART} argument.
+ * Sets the {@link #ARG_INTEGER_PART} argument.
* @param integerPart A non-empty string of digits with an optional
* leading + or -.
* @return This instance.
@@ -936,7 +924,7 @@
/**
* Convenience method that converts the numerator to a String and sets
- * the argument {@link TtsSpan#ARG_NUMERATOR}.
+ * the argument {@link #ARG_NUMERATOR}.
* @param numerator The numerator.
* @return This instance.
*/
@@ -945,7 +933,7 @@
}
/**
- * Sets the {@link TtsSpan#ARG_NUMERATOR} argument.
+ * Sets the {@link #ARG_NUMERATOR} argument.
* @param numerator A non-empty string of digits with an optional
* leading + or -.
* @return This instance.
@@ -956,7 +944,7 @@
/**
* Convenience method that converts the denominator to a String and sets
- * the argument {@link TtsSpan#ARG_DENOMINATOR}.
+ * the argument {@link #ARG_DENOMINATOR}.
* @param denominator The denominator.
* @return This instance.
*/
@@ -965,7 +953,7 @@
}
/**
- * Sets the {@link TtsSpan#ARG_DENOMINATOR} argument.
+ * Sets the {@link #ARG_DENOMINATOR} argument.
* @param denominator A non-empty string of digits with an optional
* leading + or -.
* @return This instance.
@@ -976,13 +964,13 @@
}
/**
- * A builder for TtsSpans of type {@link TtsSpan #TYPE_MEASURE}.
+ * A builder for TtsSpans of type {@link #TYPE_MEASURE}.
*/
public static class MeasureBuilder
extends SemioticClassBuilder<MeasureBuilder> {
/**
- * Creates a builder for a TtsSpan of type {@link TtsSpan#TYPE_MEASURE}.
+ * Creates a builder for a TtsSpan of type {@link #TYPE_MEASURE}.
*/
public MeasureBuilder() {
super(TtsSpan.TYPE_MEASURE);
@@ -990,7 +978,7 @@
/**
* Convenience method that converts the number to a String and set it to
- * the value for {@link TtsSpan#ARG_NUMBER}.
+ * the value for {@link #ARG_NUMBER}.
* @param number The amount of the measure.
* @return This instance.
*/
@@ -999,7 +987,7 @@
}
/**
- * Sets the {@link TtsSpan#ARG_NUMBER} argument.
+ * Sets the {@link #ARG_NUMBER} argument.
* @param number A non-empty string of digits with an optional
* leading + or -.
* @return This instance.
@@ -1010,7 +998,7 @@
/**
* Convenience method that converts the integer part to a String and set
- * it to the value for {@link TtsSpan#ARG_INTEGER_PART}.
+ * it to the value for {@link #ARG_INTEGER_PART}.
* @param integerPart The integer part of a decimal or fraction.
* @return This instance.
*/
@@ -1019,7 +1007,7 @@
}
/**
- * Sets the {@link TtsSpan#ARG_INTEGER_PART} argument.
+ * Sets the {@link #ARG_INTEGER_PART} argument.
* @param integerPart The integer part of a decimal or fraction; a
* non-empty string of digits with an optional
* leading + or -.
@@ -1030,10 +1018,9 @@
}
/**
- * Sets the {@link TtsSpan#ARG_FRACTIONAL_PART} argument.
+ * Sets the {@link #ARG_FRACTIONAL_PART} argument.
* @param fractionalPart The fractional part of a decimal; a non-empty
- * string of digits with an optional
- * leading + or -.
+ * string of digits with an optional leading + or -.
* @return This instance.
*/
public MeasureBuilder setFractionalPart(String fractionalPart) {
@@ -1043,7 +1030,7 @@
/**
* Convenience method that converts the numerator to a String and set it
- * to the value for {@link TtsSpan#ARG_NUMERATOR}.
+ * to the value for {@link #ARG_NUMERATOR}.
* @param numerator The numerator of a fraction.
* @return This instance.
*/
@@ -1052,7 +1039,7 @@
}
/**
- * Sets the {@link TtsSpan#ARG_NUMERATOR} argument.
+ * Sets the {@link #ARG_NUMERATOR} argument.
* @param numerator The numerator of a fraction; a non-empty string of
* digits with an optional leading + or -.
* @return This instance.
@@ -1063,7 +1050,7 @@
/**
* Convenience method that converts the denominator to a String and set
- * it to the value for {@link TtsSpan#ARG_DENOMINATOR}.
+ * it to the value for {@link #ARG_DENOMINATOR}.
* @param denominator The denominator of a fraction.
* @return This instance.
*/
@@ -1072,7 +1059,7 @@
}
/**
- * Sets the {@link TtsSpan#ARG_DENOMINATOR} argument.
+ * Sets the {@link #ARG_DENOMINATOR} argument.
* @param denominator The denominator of a fraction; a non-empty string
* of digits with an optional leading + or -.
* @return This instance.
@@ -1082,7 +1069,7 @@
}
/**
- * Sets the {@link TtsSpan#ARG_UNIT} argument.
+ * Sets the {@link #ARG_UNIT} argument.
* @param unit The unit of the measure.
* @return This instance.
* @see {@link TtsSpan.ARG_UNIT}
@@ -1093,22 +1080,21 @@
}
/**
- * A builder for TtsSpans of type {@link TtsSpan #TYPE_TIME}.
+ * A builder for TtsSpans of type {@link #TYPE_TIME}.
*/
public static class TimeBuilder
extends SemioticClassBuilder<TimeBuilder> {
/**
- * Creates a builder for a TtsSpan of type {@link TtsSpan#TYPE_TIME}.
+ * Creates a builder for a TtsSpan of type {@link #TYPE_TIME}.
*/
public TimeBuilder() {
super(TtsSpan.TYPE_TIME);
}
/**
- * Creates a builder for a TtsSpan of type {@link TtsSpan#TYPE_TIME} and
- * sets the {@link TtsSpan#ARG_HOURS} and {@link TtsSpan#ARG_MINUTES}
- * arguments.
+ * Creates a builder for a TtsSpan of type {@link #TYPE_TIME} and
+ * sets the {@link #ARG_HOURS} and {@link #ARG_MINUTES} arguments.
*/
public TimeBuilder(int hours, int minutes) {
this();
@@ -1117,22 +1103,21 @@
}
/**
- * Sets the {@link TtsSpan#ARG_HOURS} argument.
- * @param hours The value to be set for hours. See
- * {@link TtsSpan#ARG_HOURS}.
+ * Sets the {@link #ARG_HOURS} argument.
+ * @param hours The value to be set for hours. See {@link #ARG_HOURS}.
* @return This instance.
- * @see {@link TtsSpan#ARG_HOURS}
+ * @see {@link #ARG_HOURS}
*/
public TimeBuilder setHours(int hours) {
return setIntArgument(TtsSpan.ARG_HOURS, hours);
}
/**
- * Sets the {@link TtsSpan#ARG_MINUTES} argument.
+ * Sets the {@link #ARG_MINUTES} argument.
* @param minutes The value to be set for minutes. See
- * {@link TtsSpan#ARG_MINUTES}.
+ * {@link #ARG_MINUTES}.
* @return This instance.
- * @see {@link TtsSpan#ARG_MINUTES}
+ * @see {@link #ARG_MINUTES}
*/
public TimeBuilder setMinutes(int minutes) {
return setIntArgument(TtsSpan.ARG_MINUTES, minutes);
@@ -1140,24 +1125,23 @@
}
/**
- * A builder for TtsSpans of type {@link TtsSpan #TYPE_DATE}.
+ * A builder for TtsSpans of type {@link #TYPE_DATE}.
*/
public static class DateBuilder
extends SemioticClassBuilder<DateBuilder> {
/**
- * Creates a builder for a TtsSpan of type {@link TtsSpan#TYPE_DATE}.
+ * Creates a builder for a TtsSpan of type {@link #TYPE_DATE}.
*/
public DateBuilder() {
super(TtsSpan.TYPE_DATE);
}
/**
- * Creates a builder for a TtsSpan of type {@link TtsSpan#TYPE_TIME} and
- * possibly sets the {@link TtsSpan#ARG_WEEKDAY},
- * {@link TtsSpan#ARG_DAY}, {@link TtsSpan#ARG_MONTH} and
- * {@link TtsSpan#ARG_YEAR} arguments. Pass null to any argument to
- * leave it unset.
+ * Creates a builder for a TtsSpan of type {@link #TYPE_TIME} and
+ * possibly sets the {@link #ARG_WEEKDAY}, {@link #ARG_DAY},
+ * {@link #ARG_MONTH} and {@link #ARG_YEAR} arguments. Pass null to any
+ * argument to leave it unset.
*/
public DateBuilder(Integer weekday,
Integer day,
@@ -1179,44 +1163,41 @@
}
/**
- * Sets the {@link TtsSpan#ARG_WEEKDAY} argument.
+ * Sets the {@link #ARG_WEEKDAY} argument.
* @param weekday The value to be set for weekday. See
- * {@link TtsSpan#ARG_WEEKDAY}.
+ * {@link #ARG_WEEKDAY}.
* @return This instance.
- * @see {@link TtsSpan#ARG_WEEKDAY}
+ * @see {@link #ARG_WEEKDAY}
*/
public DateBuilder setWeekday(int weekday) {
return setIntArgument(TtsSpan.ARG_WEEKDAY, weekday);
}
/**
- * Sets the {@link TtsSpan#ARG_DAY} argument.
- * @param day The value to be set for day. See
- * {@link TtsSpan#ARG_DAY}.
+ * Sets the {@link #ARG_DAY} argument.
+ * @param day The value to be set for day. See {@link #ARG_DAY}.
* @return This instance.
- * @see {@link TtsSpan#ARG_DAY}
+ * @see {@link #ARG_DAY}
*/
public DateBuilder setDay(int day) {
return setIntArgument(TtsSpan.ARG_DAY, day);
}
/**
- * Sets the {@link TtsSpan#ARG_MONTH} argument.
- * @param month The value to be set for month. See
- * {@link TtsSpan#ARG_MONTH}.
+ * Sets the {@link #ARG_MONTH} argument.
+ * @param month The value to be set for month. See {@link #ARG_MONTH}.
* @return This instance.
- * @see {@link TtsSpan#ARG_MONTH}
+ * @see {@link #ARG_MONTH}
*/
public DateBuilder setMonth(int month) {
return setIntArgument(TtsSpan.ARG_MONTH, month);
}
/**
- * Sets the {@link TtsSpan#ARG_YEAR} argument.
- * @param year The value to be set for year. See
- * {@link TtsSpan#ARG_YEAR}.
+ * Sets the {@link #ARG_YEAR} argument.
+ * @param year The value to be set for year. See {@link #ARG_YEAR}.
* @return This instance.
- * @see {@link TtsSpan#ARG_YEAR}
+ * @see {@link #ARG_YEAR}
*/
public DateBuilder setYear(int year) {
return setIntArgument(TtsSpan.ARG_YEAR, year);
@@ -1224,13 +1205,13 @@
}
/**
- * A builder for TtsSpans of type {@link TtsSpan #TYPE_MONEY}.
+ * A builder for TtsSpans of type {@link #TYPE_MONEY}.
*/
public static class MoneyBuilder
extends SemioticClassBuilder<MoneyBuilder> {
/**
- * Creates a TtsSpan of type {@link TtsSpan#TYPE_MONEY}.
+ * Creates a TtsSpan of type {@link #TYPE_MONEY}.
*/
public MoneyBuilder() {
super(TtsSpan.TYPE_MONEY);
@@ -1238,7 +1219,7 @@
/**
* Convenience method that converts the number to a String and set it to
- * the value for {@link TtsSpan#ARG_INTEGER_PART}.
+ * the value for {@link #ARG_INTEGER_PART}.
* @param integerPart The integer part of the amount.
* @return This instance.
*/
@@ -1247,7 +1228,7 @@
}
/**
- * Sets the {@link TtsSpan#ARG_INTEGER_PART} argument.
+ * Sets the {@link #ARG_INTEGER_PART} argument.
* @param integerPart A non-empty string of digits with an optional
* leading + or -.
* @return This instance.
@@ -1257,7 +1238,7 @@
}
/**
- * Sets the {@link TtsSpan#ARG_FRACTIONAL_PART} argument.
+ * Sets the {@link #ARG_FRACTIONAL_PART} argument.
* @param fractionalPart Can be a string of digits of any size.
* @return This instance.
*/
@@ -1266,7 +1247,7 @@
}
/**
- * Sets the {@link TtsSpan#ARG_CURRENCY} argument.
+ * Sets the {@link #ARG_CURRENCY} argument.
* @param currency Should be a ISO4217 currency code, e.g. "USD".
* @return This instance.
*/
@@ -1275,7 +1256,7 @@
}
/**
- * Sets the {@link TtsSpan#ARG_QUANTITY} argument.
+ * Sets the {@link #ARG_QUANTITY} argument.
* @param quantity
* @return This instance.
*/
@@ -1285,21 +1266,21 @@
}
/**
- * A builder for TtsSpans of type {@link TtsSpan #TYPE_TELEPHONE}.
+ * A builder for TtsSpans of type {@link #TYPE_TELEPHONE}.
*/
public static class TelephoneBuilder
extends SemioticClassBuilder<TelephoneBuilder> {
/**
- * Creates a TtsSpan of type {@link TtsSpan#TYPE_TELEPHONE}.
+ * Creates a TtsSpan of type {@link #TYPE_TELEPHONE}.
*/
public TelephoneBuilder() {
super(TtsSpan.TYPE_TELEPHONE);
}
/**
- * Creates a TtsSpan of type {@link TtsSpan#TYPE_TELEPHONE} and sets the
- * {@link TtsSpan#ARG_NUMBER_PARTS} argument.
+ * Creates a TtsSpan of type {@link #TYPE_TELEPHONE} and sets the
+ * {@link #ARG_NUMBER_PARTS} argument.
*/
public TelephoneBuilder(String numberParts) {
this();
@@ -1307,7 +1288,7 @@
}
/**
- * Sets the {@link TtsSpan#ARG_COUNTRY_CODE} argument.
+ * Sets the {@link #ARG_COUNTRY_CODE} argument.
* @param countryCode The country code can be a series of digits
* optionally prefixed with a "+".
* @return This instance.
@@ -1317,7 +1298,7 @@
}
/**
- * Sets the {@link TtsSpan#ARG_NUMBER_PARTS} argument.
+ * Sets the {@link #ARG_NUMBER_PARTS} argument.
* @param numberParts The main telephone number. Can be a series of
* digits and letters separated by spaces, "/", "-" or ".".
* @return This instance.
@@ -1327,7 +1308,7 @@
}
/**
- * Sets the {@link TtsSpan#ARG_EXTENSION} argument.
+ * Sets the {@link #ARG_EXTENSION} argument.
* @param extension The extension can be a series of digits.
* @return This instance.
*/
@@ -1337,20 +1318,20 @@
}
/**
- * A builder for TtsSpans of type {@link TtsSpan #TYPE_ELECTRONIC}.
+ * A builder for TtsSpans of type {@link #TYPE_ELECTRONIC}.
*/
public static class ElectronicBuilder
extends SemioticClassBuilder<ElectronicBuilder> {
/**
- * Creates a TtsSpan of type {@link TtsSpan#TYPE_ELECTRONIC}.
+ * Creates a TtsSpan of type {@link #TYPE_ELECTRONIC}.
*/
public ElectronicBuilder() {
super(TtsSpan.TYPE_ELECTRONIC);
}
/**
- * Sets the {@link TtsSpan#ARG_USERNAME} and {@link TtsSpan#ARG_DOMAIN}
+ * Sets the {@link #ARG_USERNAME} and {@link #ARG_DOMAIN}
* arguments, representing an email address.
* @param username The part before the @ in the email address.
* @param domain The part after the @ in the email address.
@@ -1362,7 +1343,7 @@
}
/**
- * Sets the {@link TtsSpan#ARG_PROTOCOL} argument.
+ * Sets the {@link #ARG_PROTOCOL} argument.
* @param protocol The protocol of the URI. Examples are "http" and
* "ftp".
* @return This instance.
@@ -1372,7 +1353,7 @@
}
/**
- * Sets the {@link TtsSpan#ARG_USERNAME} argument.
+ * Sets the {@link #ARG_USERNAME} argument.
* @return This instance.
*/
public ElectronicBuilder setUsername(String username) {
@@ -1380,7 +1361,7 @@
}
/**
- * Sets the {@link TtsSpan#ARG_PASSWORD} argument.
+ * Sets the {@link #ARG_PASSWORD} argument.
* @return This instance.
*/
public ElectronicBuilder setPassword(String password) {
@@ -1388,7 +1369,7 @@
}
/**
- * Sets the {@link TtsSpan#ARG_DOMAIN} argument.
+ * Sets the {@link #ARG_DOMAIN} argument.
* @param domain The domain, for example "source.android.com".
* @return This instance.
*/
@@ -1397,7 +1378,7 @@
}
/**
- * Sets the {@link TtsSpan#ARG_PORT} argument.
+ * Sets the {@link #ARG_PORT} argument.
* @return This instance.
*/
public ElectronicBuilder setPort(int port) {
@@ -1405,7 +1386,7 @@
}
/**
- * Sets the {@link TtsSpan#ARG_PATH} argument.
+ * Sets the {@link #ARG_PATH} argument.
* @param path For example "source/index.html".
* @return This instance.
*/
@@ -1414,7 +1395,7 @@
}
/**
- * Sets the {@link TtsSpan#ARG_QUERY_STRING} argument.
+ * Sets the {@link #ARG_QUERY_STRING} argument.
* @param queryString For example "arg=value&argtwo=value".
* @return This instance.
*/
@@ -1423,7 +1404,7 @@
}
/**
- * Sets the {@link TtsSpan#ARG_FRAGMENT_ID} argument.
+ * Sets the {@link #ARG_FRAGMENT_ID} argument.
* @return This instance.
*/
public ElectronicBuilder setFragmentId(String fragmentId) {
@@ -1432,22 +1413,21 @@
}
/**
- * A builder for TtsSpans of type {@link TtsSpan #TYPE_DIGITS}.
+ * A builder for TtsSpans of type {@link #TYPE_DIGITS}.
*/
public static class DigitsBuilder
extends SemioticClassBuilder<DigitsBuilder> {
/**
- * Creates a builder for a TtsSpan of type
- * {@link TtsSpan#TYPE_VERBATIM}.
+ * Creates a builder for a TtsSpan of type {@link #TYPE_DIGITS}.
*/
public DigitsBuilder() {
super(TtsSpan.TYPE_DIGITS);
}
/**
- * Creates a builder for a TtsSpan of type {@link TtsSpan#TYPE_DIGITS}
- * and sets the {@link TtsSpan#ARG_DIGITS} argument.
+ * Creates a builder for a TtsSpan of type {@link #TYPE_DIGITS}
+ * and sets the {@link #ARG_DIGITS} argument.
*/
public DigitsBuilder(String digits) {
this();
@@ -1455,7 +1435,7 @@
}
/**
- * Sets the {@link TtsSpan#ARG_DIGITS} argument.
+ * Sets the {@link #ARG_DIGITS} argument.
* @param digits A string of digits.
* @return This instance.
*/
@@ -1465,22 +1445,21 @@
}
/**
- * A builder for TtsSpans of type {@link TtsSpan #TYPE_VERBATIM}.
+ * A builder for TtsSpans of type {@link #TYPE_VERBATIM}.
*/
public static class VerbatimBuilder
extends SemioticClassBuilder<VerbatimBuilder> {
/**
- * Creates a builder for a TtsSpan of type
- * {@link TtsSpan#TYPE_VERBATIM}.
+ * Creates a builder for a TtsSpan of type {@link #TYPE_VERBATIM}.
*/
public VerbatimBuilder() {
super(TtsSpan.TYPE_VERBATIM);
}
/**
- * Creates a builder for a TtsSpan of type {@link TtsSpan#TYPE_VERBATIM}
- * and sets the {@link TtsSpan#ARG_VERBATIM} argument.
+ * Creates a builder for a TtsSpan of type {@link #TYPE_VERBATIM}
+ * and sets the {@link #ARG_VERBATIM} argument.
*/
public VerbatimBuilder(String verbatim) {
this();
@@ -1488,7 +1467,7 @@
}
/**
- * Sets the {@link TtsSpan#ARG_VERBATIM} argument.
+ * Sets the {@link #ARG_VERBATIM} argument.
* @param verbatim A string of characters that will be read verbatim,
* except whitespace.
* @return This instance.
diff --git a/core/java/android/view/RenderNodeAnimator.java b/core/java/android/view/RenderNodeAnimator.java
index c7f16e0..9433237 100644
--- a/core/java/android/view/RenderNodeAnimator.java
+++ b/core/java/android/view/RenderNodeAnimator.java
@@ -19,6 +19,7 @@
import android.animation.Animator;
import android.animation.TimeInterpolator;
import android.animation.ValueAnimator;
+import android.animation.Animator.AnimatorListener;
import android.graphics.Canvas;
import android.graphics.CanvasProperty;
import android.graphics.Paint;
@@ -93,6 +94,14 @@
private long mUnscaledDuration = 300;
private long mUnscaledStartDelay = 0;
+ // If this is true, we will run any start delays on the UI thread. This is
+ // the safe default, and is necessary to ensure start listeners fire at
+ // the correct time. Animators created by RippleDrawable (the
+ // CanvasProperty<> ones) do not have this expectation, and as such will
+ // set this to false so that the renderthread handles the startdelay instead
+ private final boolean mUiThreadHandlesDelay;
+ private long mStartDelay = 0;
+ private long mStartTime;
public static int mapViewPropertyToRenderProperty(int viewProperty) {
return sViewPropertyAnimatorMap.get(viewProperty);
@@ -101,6 +110,7 @@
public RenderNodeAnimator(int property, float finalValue) {
mRenderProperty = property;
mFinalValue = finalValue;
+ mUiThreadHandlesDelay = true;
init(nCreateAnimator(new WeakReference<RenderNodeAnimator>(this),
property, finalValue));
}
@@ -109,6 +119,7 @@
init(nCreateCanvasPropertyFloatAnimator(
new WeakReference<RenderNodeAnimator>(this),
property.getNativeContainer(), finalValue));
+ mUiThreadHandlesDelay = false;
}
/**
@@ -123,11 +134,13 @@
init(nCreateCanvasPropertyPaintAnimator(
new WeakReference<RenderNodeAnimator>(this),
property.getNativeContainer(), paintField, finalValue));
+ mUiThreadHandlesDelay = false;
}
public RenderNodeAnimator(int x, int y, float startRadius, float endRadius) {
init(nCreateRevealAnimator(new WeakReference<RenderNodeAnimator>(this),
x, y, startRadius, endRadius));
+ mUiThreadHandlesDelay = true;
}
private void init(long ptr) {
@@ -169,6 +182,16 @@
mStarted = true;
applyInterpolator();
+
+ if (mStartDelay <= 0 || !mUiThreadHandlesDelay) {
+ nSetStartDelay(mNativePtr.get(), mStartDelay);
+ doStart();
+ } else {
+ getHelper().addDelayedAnimation(this);
+ }
+ }
+
+ private void doStart() {
nStart(mNativePtr.get());
// Alpha is a special snowflake that has the canonical value stored
@@ -180,7 +203,7 @@
mViewTarget.mTransformationInfo.mAlpha = mFinalValue;
}
- final ArrayList<AnimatorListener> listeners = getListeners();
+ final ArrayList<AnimatorListener> listeners = cloneListeners();
final int numListeners = listeners == null ? 0 : listeners.size();
for (int i = 0; i < numListeners; i++) {
listeners.get(i).onAnimationStart(this);
@@ -195,9 +218,10 @@
@Override
public void cancel() {
if (!mFinished) {
+ getHelper().removeDelayedAnimation(this);
nEnd(mNativePtr.get());
- final ArrayList<AnimatorListener> listeners = getListeners();
+ final ArrayList<AnimatorListener> listeners = cloneListeners();
final int numListeners = listeners == null ? 0 : listeners.size();
for (int i = 0; i < numListeners; i++) {
listeners.get(i).onAnimationCancel(this);
@@ -258,7 +282,7 @@
throw new IllegalArgumentException("startDelay must be positive; " + startDelay);
}
mUnscaledStartDelay = startDelay;
- nSetStartDelay(mNativePtr.get(), (long) (startDelay * ValueAnimator.getDurationScale()));
+ mStartDelay = (long) (ValueAnimator.getDurationScale() * startDelay);
}
@Override
@@ -303,20 +327,105 @@
return mInterpolator;
}
- private void onFinished() {
+ protected void onFinished() {
mFinished = true;
- final ArrayList<AnimatorListener> listeners = getListeners();
+ final ArrayList<AnimatorListener> listeners = cloneListeners();
final int numListeners = listeners == null ? 0 : listeners.size();
for (int i = 0; i < numListeners; i++) {
listeners.get(i).onAnimationEnd(this);
}
}
+ @SuppressWarnings("unchecked")
+ private ArrayList<AnimatorListener> cloneListeners() {
+ ArrayList<AnimatorListener> listeners = getListeners();
+ if (listeners != null) {
+ listeners = (ArrayList<AnimatorListener>) listeners.clone();
+ }
+ return listeners;
+ }
+
long getNativeAnimator() {
return mNativePtr.get();
}
+ /**
+ * @return true if the animator was started, false if still delayed
+ */
+ private boolean processDelayed(long frameTimeMs) {
+ if (mStartTime == 0) {
+ mStartTime = frameTimeMs;
+ } else if ((frameTimeMs - mStartTime) >= mStartDelay) {
+ doStart();
+ return true;
+ }
+ return false;
+ }
+
+ private static DelayedAnimationHelper getHelper() {
+ DelayedAnimationHelper helper = sAnimationHelper.get();
+ if (helper == null) {
+ helper = new DelayedAnimationHelper();
+ sAnimationHelper.set(helper);
+ }
+ return helper;
+ }
+
+ private static ThreadLocal<DelayedAnimationHelper> sAnimationHelper =
+ new ThreadLocal<DelayedAnimationHelper>();
+
+ private static class DelayedAnimationHelper implements Runnable {
+
+ private ArrayList<RenderNodeAnimator> mDelayedAnims = new ArrayList<RenderNodeAnimator>();
+ private final Choreographer mChoreographer;
+ private boolean mCallbackScheduled;
+
+ public DelayedAnimationHelper() {
+ mChoreographer = Choreographer.getInstance();
+ }
+
+ public void addDelayedAnimation(RenderNodeAnimator animator) {
+ mDelayedAnims.add(animator);
+ scheduleCallback();
+ }
+
+ public void removeDelayedAnimation(RenderNodeAnimator animator) {
+ mDelayedAnims.remove(animator);
+ }
+
+ private void scheduleCallback() {
+ if (!mCallbackScheduled) {
+ mCallbackScheduled = true;
+ mChoreographer.postCallback(Choreographer.CALLBACK_ANIMATION, this, null);
+ }
+ }
+
+ @Override
+ public void run() {
+ long frameTimeMs = mChoreographer.getFrameTime();
+ mCallbackScheduled = false;
+
+ int end = 0;
+ for (int i = 0; i < mDelayedAnims.size(); i++) {
+ RenderNodeAnimator animator = mDelayedAnims.get(i);
+ if (!animator.processDelayed(frameTimeMs)) {
+ if (end != i) {
+ mDelayedAnims.set(end, animator);
+ }
+ end++;
+ }
+ }
+ while (mDelayedAnims.size() > end) {
+ mDelayedAnims.remove(mDelayedAnims.size() - 1);
+ }
+
+ if (mDelayedAnims.size() > 0) {
+ scheduleCallback();
+ }
+ }
+ }
+
// Called by native
private static void callOnFinished(WeakReference<RenderNodeAnimator> weakThis) {
RenderNodeAnimator animator = weakThis.get();
@@ -325,6 +434,11 @@
}
}
+ @Override
+ public Animator clone() {
+ throw new IllegalStateException("Cannot clone this animator");
+ }
+
private static native long nCreateAnimator(WeakReference<RenderNodeAnimator> weakThis,
int property, float finalValue);
private static native long nCreateCanvasPropertyFloatAnimator(WeakReference<RenderNodeAnimator> weakThis,
diff --git a/core/java/android/view/RenderNodeAnimatorCompat.java b/core/java/android/view/RenderNodeAnimatorCompat.java
deleted file mode 100644
index 8103f47..0000000
--- a/core/java/android/view/RenderNodeAnimatorCompat.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * Copyright (C) 2014 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.view;
-
-import android.animation.ValueAnimator;
-
-import java.util.ArrayList;
-
-/**
- * This class provides compatibility for things like start listeners &
- * start delays for use by ViewPropertyAnimator and ObjectAnimator
- * @hide
- */
-public class RenderNodeAnimatorCompat extends RenderNodeAnimator {
-
- private long mUnscaledStartDelay = 0;
- private long mStartDelay = 0;
- private long mStartTime;
- private boolean mCanceled;
- private boolean mStarted;
-
- public RenderNodeAnimatorCompat(int property, float finalValue) {
- super(property, finalValue);
- }
-
- @Override
- public void setStartDelay(long startDelay) {
- mUnscaledStartDelay = startDelay;
- mStartDelay = (long) (ValueAnimator.getDurationScale() * startDelay);
- }
-
- @Override
- public long getStartDelay() {
- return mUnscaledStartDelay;
- }
-
- @Override
- public void start() {
- mStarted = true;
- if (mStartDelay <= 0) {
- doStart();
- } else {
- getHelper().addDelayedAnimation(this);
- }
- }
-
- @Override
- public boolean isStarted() {
- return mStarted;
- }
-
- private void doStart() {
- if (!mCanceled) {
- super.start();
- }
- }
-
- @Override
- public void cancel() {
- mCanceled = true;
- super.cancel();
- }
-
- /**
- * @return true if the animator was started, false if still delayed
- */
- private boolean processDelayed(long frameTimeMs) {
- if (mCanceled) return true;
-
- if (mStartTime == 0) {
- mStartTime = frameTimeMs;
- } else if ((frameTimeMs - mStartTime) >= mStartDelay) {
- doStart();
- return true;
- }
- return false;
- }
-
- private static AnimationHelper getHelper() {
- AnimationHelper helper = sAnimationHelper.get();
- if (helper == null) {
- helper = new AnimationHelper();
- sAnimationHelper.set(helper);
- }
- return helper;
- }
-
- private static ThreadLocal<AnimationHelper> sAnimationHelper =
- new ThreadLocal<AnimationHelper>();
-
- private static class AnimationHelper implements Runnable {
-
- private ArrayList<RenderNodeAnimatorCompat> mDelayedAnims = new ArrayList<RenderNodeAnimatorCompat>();
- private final Choreographer mChoreographer;
- private boolean mCallbackScheduled;
-
- public AnimationHelper() {
- mChoreographer = Choreographer.getInstance();
- }
-
- public void addDelayedAnimation(RenderNodeAnimatorCompat animator) {
- mDelayedAnims.add(animator);
- scheduleCallback();
- }
-
- private void scheduleCallback() {
- if (!mCallbackScheduled) {
- mCallbackScheduled = true;
- mChoreographer.postCallback(Choreographer.CALLBACK_ANIMATION, this, null);
- }
- }
-
- @Override
- public void run() {
- long frameTimeMs = mChoreographer.getFrameTime();
- mCallbackScheduled = false;
-
- int end = 0;
- for (int i = 0; i < mDelayedAnims.size(); i++) {
- RenderNodeAnimatorCompat animator = mDelayedAnims.get(i);
- if (!animator.processDelayed(frameTimeMs)) {
- if (end != i) {
- mDelayedAnims.set(end, animator);
- }
- end++;
- }
- }
- while (mDelayedAnims.size() > end) {
- mDelayedAnims.remove(mDelayedAnims.size() - 1);
- }
-
- if (mDelayedAnims.size() > 0) {
- scheduleCallback();
- }
- }
- }
-}
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 243d7d7..551efe9 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -13090,6 +13090,10 @@
removeSendViewScrolledAccessibilityEventCallback();
stopNestedScroll();
+ // Anything that started animating right before detach should already
+ // be in its final state when re-attached.
+ jumpDrawablesToCurrentState();
+
destroyDrawingCache();
cleanupDraw();
diff --git a/core/java/android/view/ViewAnimationUtils.java b/core/java/android/view/ViewAnimationUtils.java
index ea3efb1..eeff90a 100644
--- a/core/java/android/view/ViewAnimationUtils.java
+++ b/core/java/android/view/ViewAnimationUtils.java
@@ -30,6 +30,9 @@
*
* Any shadow cast by the View will respect the circular clip from this animator.
*
+ * Note that the animation returned here is a one-shot animation. It cannot
+ * be re-used, and once started it cannot be paused or resumed.
+ *
* @param view The View will be clipped to the animating circle.
* @param centerX The x coordinate of the center of the animating circle.
* @param centerY The y coordinate of the center of the animating circle.
diff --git a/core/java/android/view/ViewPropertyAnimatorRT.java b/core/java/android/view/ViewPropertyAnimatorRT.java
index 20f5182..de96887 100644
--- a/core/java/android/view/ViewPropertyAnimatorRT.java
+++ b/core/java/android/view/ViewPropertyAnimatorRT.java
@@ -81,7 +81,7 @@
int property = RenderNodeAnimator.mapViewPropertyToRenderProperty(holder.mNameConstant);
final float finalValue = holder.mFromValue + holder.mDeltaValue;
- RenderNodeAnimator animator = new RenderNodeAnimatorCompat(property, finalValue);
+ RenderNodeAnimator animator = new RenderNodeAnimator(property, finalValue);
animator.setStartDelay(startDelay);
animator.setDuration(duration);
animator.setInterpolator(interpolator);
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index a82fa65..096fe88 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -2867,8 +2867,15 @@
}
/**
- * Gives the text a shadow of the specified radius and color, the specified
- * distance from its normal position.
+ * Gives the text a shadow of the specified blur radius and color, the specified
+ * distance from its drawn position.
+ * <p>
+ * The text shadow produced does not interact with the properties on view
+ * that are responsible for real time shadows,
+ * {@link View#getElevation() elevation} and
+ * {@link View#getTranslationZ() translationZ}.
+ *
+ * @see Paint#setShadowLayer(float, float, float, int)
*
* @attr ref android.R.styleable#TextView_shadowColor
* @attr ref android.R.styleable#TextView_shadowDx
diff --git a/core/java/com/android/internal/widget/LockPatternUtils.java b/core/java/com/android/internal/widget/LockPatternUtils.java
index ece3e9d..74b1fdd 100644
--- a/core/java/com/android/internal/widget/LockPatternUtils.java
+++ b/core/java/com/android/internal/widget/LockPatternUtils.java
@@ -1093,6 +1093,25 @@
*/
public void setVisiblePatternEnabled(boolean enabled) {
setBoolean(Settings.Secure.LOCK_PATTERN_VISIBLE, enabled);
+
+ // Update for crypto if owner
+ int userId = getCurrentOrCallingUserId();
+ if (userId != UserHandle.USER_OWNER) {
+ return;
+ }
+
+ IBinder service = ServiceManager.getService("mount");
+ if (service == null) {
+ Log.e(TAG, "Could not find the mount service to update the user info");
+ return;
+ }
+
+ IMountService mountService = IMountService.Stub.asInterface(service);
+ try {
+ mountService.setField("PatternVisible", enabled ? "1" : "0");
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error changing pattern visible state", e);
+ }
}
/**
diff --git a/core/res/res/color/switch_thumb_material_dark.xml b/core/res/res/color/switch_thumb_material_dark.xml
new file mode 100644
index 0000000..8fede70
--- /dev/null
+++ b/core/res/res/color/switch_thumb_material_dark.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_enabled="false" android:color="@color/switch_thumb_disabled_material_dark"/>
+ <item android:color="@color/switch_thumb_normal_material_dark"/>
+</selector>
diff --git a/core/res/res/color/switch_thumb_material_light.xml b/core/res/res/color/switch_thumb_material_light.xml
new file mode 100644
index 0000000..1a34b74
--- /dev/null
+++ b/core/res/res/color/switch_thumb_material_light.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_enabled="false" android:color="@color/switch_thumb_disabled_material_light"/>
+ <item android:color="@color/switch_thumb_normal_material_light"/>
+</selector>
diff --git a/core/res/res/drawable-hdpi/spinner_textfield_activated_mtrl_alpha.9.png b/core/res/res/drawable-hdpi/spinner_textfield_activated_mtrl_alpha.9.png
index 8af9ceb4..5e67395 100644
--- a/core/res/res/drawable-hdpi/spinner_textfield_activated_mtrl_alpha.9.png
+++ b/core/res/res/drawable-hdpi/spinner_textfield_activated_mtrl_alpha.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinner_textfield_default_mtrl_alpha.9.png b/core/res/res/drawable-hdpi/spinner_textfield_default_mtrl_alpha.9.png
index 81c78c6..9c2ee13 100644
--- a/core/res/res/drawable-hdpi/spinner_textfield_default_mtrl_alpha.9.png
+++ b/core/res/res/drawable-hdpi/spinner_textfield_default_mtrl_alpha.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/textfield_search_activated_mtrl_alpha.9.png b/core/res/res/drawable-hdpi/textfield_search_activated_mtrl_alpha.9.png
index 7bcebcd..ce577e5 100644
--- a/core/res/res/drawable-hdpi/textfield_search_activated_mtrl_alpha.9.png
+++ b/core/res/res/drawable-hdpi/textfield_search_activated_mtrl_alpha.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/textfield_search_default_mtrl_alpha.9.png b/core/res/res/drawable-hdpi/textfield_search_default_mtrl_alpha.9.png
index eb1d945..7c305ab 100644
--- a/core/res/res/drawable-hdpi/textfield_search_default_mtrl_alpha.9.png
+++ b/core/res/res/drawable-hdpi/textfield_search_default_mtrl_alpha.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/title_bar_shadow.9.png b/core/res/res/drawable-hdpi/title_bar_shadow.9.png
deleted file mode 100644
index e6dab63..0000000
--- a/core/res/res/drawable-hdpi/title_bar_shadow.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-mdpi/spinner_textfield_activated_mtrl_alpha.9.png b/core/res/res/drawable-mdpi/spinner_textfield_activated_mtrl_alpha.9.png
index 22992c0..cb8f78a 100644
--- a/core/res/res/drawable-mdpi/spinner_textfield_activated_mtrl_alpha.9.png
+++ b/core/res/res/drawable-mdpi/spinner_textfield_activated_mtrl_alpha.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/spinner_textfield_default_mtrl_alpha.9.png b/core/res/res/drawable-mdpi/spinner_textfield_default_mtrl_alpha.9.png
index f44a2c2..64d4c81 100644
--- a/core/res/res/drawable-mdpi/spinner_textfield_default_mtrl_alpha.9.png
+++ b/core/res/res/drawable-mdpi/spinner_textfield_default_mtrl_alpha.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/textfield_search_activated_mtrl_alpha.9.png b/core/res/res/drawable-mdpi/textfield_search_activated_mtrl_alpha.9.png
index ef4ebc0..d7faacf 100644
--- a/core/res/res/drawable-mdpi/textfield_search_activated_mtrl_alpha.9.png
+++ b/core/res/res/drawable-mdpi/textfield_search_activated_mtrl_alpha.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/textfield_search_default_mtrl_alpha.9.png b/core/res/res/drawable-mdpi/textfield_search_default_mtrl_alpha.9.png
index 9ddbcf5..0a36039 100644
--- a/core/res/res/drawable-mdpi/textfield_search_default_mtrl_alpha.9.png
+++ b/core/res/res/drawable-mdpi/textfield_search_default_mtrl_alpha.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/title_bar_shadow.9.png b/core/res/res/drawable-mdpi/title_bar_shadow.9.png
deleted file mode 100644
index dbcefee..0000000
--- a/core/res/res/drawable-mdpi/title_bar_shadow.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/spinner_textfield_activated_mtrl_alpha.9.png b/core/res/res/drawable-xhdpi/spinner_textfield_activated_mtrl_alpha.9.png
index 2d79d59..8e7862f 100644
--- a/core/res/res/drawable-xhdpi/spinner_textfield_activated_mtrl_alpha.9.png
+++ b/core/res/res/drawable-xhdpi/spinner_textfield_activated_mtrl_alpha.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/spinner_textfield_default_mtrl_alpha.9.png b/core/res/res/drawable-xhdpi/spinner_textfield_default_mtrl_alpha.9.png
index 36f9753..95cb83f 100644
--- a/core/res/res/drawable-xhdpi/spinner_textfield_default_mtrl_alpha.9.png
+++ b/core/res/res/drawable-xhdpi/spinner_textfield_default_mtrl_alpha.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/textfield_search_activated_mtrl_alpha.9.png b/core/res/res/drawable-xhdpi/textfield_search_activated_mtrl_alpha.9.png
index 1a2546f..33c1035 100644
--- a/core/res/res/drawable-xhdpi/textfield_search_activated_mtrl_alpha.9.png
+++ b/core/res/res/drawable-xhdpi/textfield_search_activated_mtrl_alpha.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/textfield_search_default_mtrl_alpha.9.png b/core/res/res/drawable-xhdpi/textfield_search_default_mtrl_alpha.9.png
index 500ec33..0226f84 100644
--- a/core/res/res/drawable-xhdpi/textfield_search_default_mtrl_alpha.9.png
+++ b/core/res/res/drawable-xhdpi/textfield_search_default_mtrl_alpha.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/title_bar_shadow.9.png b/core/res/res/drawable-xhdpi/title_bar_shadow.9.png
deleted file mode 100644
index 45b5456..0000000
--- a/core/res/res/drawable-xhdpi/title_bar_shadow.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/spinner_textfield_activated_mtrl_alpha.9.png b/core/res/res/drawable-xxhdpi/spinner_textfield_activated_mtrl_alpha.9.png
index 9c0b19e..eb495c6 100644
--- a/core/res/res/drawable-xxhdpi/spinner_textfield_activated_mtrl_alpha.9.png
+++ b/core/res/res/drawable-xxhdpi/spinner_textfield_activated_mtrl_alpha.9.png
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/spinner_textfield_default_mtrl_alpha.9.png b/core/res/res/drawable-xxhdpi/spinner_textfield_default_mtrl_alpha.9.png
index 0edb4b8..c2268af 100644
--- a/core/res/res/drawable-xxhdpi/spinner_textfield_default_mtrl_alpha.9.png
+++ b/core/res/res/drawable-xxhdpi/spinner_textfield_default_mtrl_alpha.9.png
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/textfield_search_activated_mtrl_alpha.9.png b/core/res/res/drawable-xxhdpi/textfield_search_activated_mtrl_alpha.9.png
index cd5b00f..b6efff3 100644
--- a/core/res/res/drawable-xxhdpi/textfield_search_activated_mtrl_alpha.9.png
+++ b/core/res/res/drawable-xxhdpi/textfield_search_activated_mtrl_alpha.9.png
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/textfield_search_default_mtrl_alpha.9.png b/core/res/res/drawable-xxhdpi/textfield_search_default_mtrl_alpha.9.png
index 5ee867c..2b253fb 100644
--- a/core/res/res/drawable-xxhdpi/textfield_search_default_mtrl_alpha.9.png
+++ b/core/res/res/drawable-xxhdpi/textfield_search_default_mtrl_alpha.9.png
Binary files differ
diff --git a/core/res/res/drawable-xxxhdpi/spinner_textfield_activated_mtrl_alpha.9.png b/core/res/res/drawable-xxxhdpi/spinner_textfield_activated_mtrl_alpha.9.png
index 78c5ebd..fbcd7d4 100644
--- a/core/res/res/drawable-xxxhdpi/spinner_textfield_activated_mtrl_alpha.9.png
+++ b/core/res/res/drawable-xxxhdpi/spinner_textfield_activated_mtrl_alpha.9.png
Binary files differ
diff --git a/core/res/res/drawable-xxxhdpi/spinner_textfield_default_mtrl_alpha.9.png b/core/res/res/drawable-xxxhdpi/spinner_textfield_default_mtrl_alpha.9.png
index 36974b7..ebc9bf7 100644
--- a/core/res/res/drawable-xxxhdpi/spinner_textfield_default_mtrl_alpha.9.png
+++ b/core/res/res/drawable-xxxhdpi/spinner_textfield_default_mtrl_alpha.9.png
Binary files differ
diff --git a/core/res/res/drawable/btn_borderless_material.xml b/core/res/res/drawable/btn_borderless_material.xml
index 47cc455..016f0ff 100644
--- a/core/res/res/drawable/btn_borderless_material.xml
+++ b/core/res/res/drawable/btn_borderless_material.xml
@@ -15,10 +15,7 @@
-->
<inset xmlns:android="http://schemas.android.com/apk/res/android"
- android:insetLeft="@dimen/control_inset_material"
- android:insetTop="@dimen/control_inset_material"
- android:insetBottom="@dimen/control_inset_material"
- android:insetRight="@dimen/control_inset_material">
+ android:inset="@dimen/control_inset_material">
<ripple android:color="?attr/colorControlHighlight">
<item android:id="@id/mask"
android:drawable="@drawable/btn_default_mtrl_shape" />
diff --git a/core/res/res/drawable/btn_default_material.xml b/core/res/res/drawable/btn_default_material.xml
index b04d4fb..d00a348 100644
--- a/core/res/res/drawable/btn_default_material.xml
+++ b/core/res/res/drawable/btn_default_material.xml
@@ -15,10 +15,7 @@
-->
<inset xmlns:android="http://schemas.android.com/apk/res/android"
- android:insetLeft="@dimen/control_inset_material"
- android:insetTop="@dimen/control_inset_material"
- android:insetBottom="@dimen/control_inset_material"
- android:insetRight="@dimen/control_inset_material">
+ android:inset="@dimen/control_inset_material">
<ripple android:color="?attr/colorControlHighlight">
<item android:drawable="@drawable/btn_default_mtrl_shape" />
</ripple>
diff --git a/core/res/res/drawable/btn_toggle_material.xml b/core/res/res/drawable/btn_toggle_material.xml
index a9951e7..9726782 100644
--- a/core/res/res/drawable/btn_toggle_material.xml
+++ b/core/res/res/drawable/btn_toggle_material.xml
@@ -15,10 +15,7 @@
-->
<inset xmlns:android="http://schemas.android.com/apk/res/android"
- android:insetLeft="@dimen/control_inset_material"
- android:insetTop="@dimen/control_inset_material"
- android:insetBottom="@dimen/control_inset_material"
- android:insetRight="@dimen/control_inset_material">
+ android:inset="@dimen/control_inset_material">
<layer-list android:paddingMode="stack">
<item>
<ripple android:color="?attr/colorControlHighlight">
diff --git a/core/res/res/drawable/edit_text_material.xml b/core/res/res/drawable/edit_text_material.xml
index eaf5e45..bbc7301 100644
--- a/core/res/res/drawable/edit_text_material.xml
+++ b/core/res/res/drawable/edit_text_material.xml
@@ -15,10 +15,7 @@
-->
<inset xmlns:android="http://schemas.android.com/apk/res/android"
- android:insetLeft="@dimen/control_inset_material"
- android:insetTop="@dimen/control_inset_material"
- android:insetBottom="@dimen/control_inset_material"
- android:insetRight="@dimen/control_inset_material">
+ android:inset="@dimen/control_inset_material">
<ripple android:color="?attr/colorControlActivated">
<item>
<selector>
diff --git a/core/res/res/drawable/spinner_textfield_background_material.xml b/core/res/res/drawable/spinner_textfield_background_material.xml
index f818baf..5bdff4a 100644
--- a/core/res/res/drawable/spinner_textfield_background_material.xml
+++ b/core/res/res/drawable/spinner_textfield_background_material.xml
@@ -14,18 +14,20 @@
limitations under the License.
-->
-<selector xmlns:android="http://schemas.android.com/apk/res/android"
- android:autoMirrored="true">
- <item android:state_checked="true">
- <nine-patch android:src="@drawable/spinner_textfield_activated_mtrl_alpha"
- android:tint="?attr/colorControlActivated" />
- </item>
- <item android:state_pressed="true">
- <nine-patch android:src="@drawable/spinner_textfield_activated_mtrl_alpha"
- android:tint="?attr/colorControlActivated" />
- </item>
- <item>
- <nine-patch android:src="@drawable/spinner_textfield_default_mtrl_alpha"
- android:tint="?attr/colorControlNormal" />
- </item>
-</selector>
+<inset xmlns:android="http://schemas.android.com/apk/res/android"
+ android:inset="@dimen/control_inset_material">
+ <selector android:autoMirrored="true">
+ <item android:state_checked="true">
+ <nine-patch android:src="@drawable/spinner_textfield_activated_mtrl_alpha"
+ android:tint="?attr/colorControlActivated" />
+ </item>
+ <item android:state_pressed="true">
+ <nine-patch android:src="@drawable/spinner_textfield_activated_mtrl_alpha"
+ android:tint="?attr/colorControlActivated" />
+ </item>
+ <item>
+ <nine-patch android:src="@drawable/spinner_textfield_default_mtrl_alpha"
+ android:tint="?attr/colorControlNormal" />
+ </item>
+ </selector>
+</inset>
diff --git a/core/res/res/drawable/switch_thumb_material_anim.xml b/core/res/res/drawable/switch_thumb_material_anim.xml
index 30bc8882..0d4d78e 100644
--- a/core/res/res/drawable/switch_thumb_material_anim.xml
+++ b/core/res/res/drawable/switch_thumb_material_anim.xml
@@ -16,22 +16,12 @@
<animated-selector xmlns:android="http://schemas.android.com/apk/res/android"
android:constantSize="true">
- <item
- android:state_enabled="false"
- android:state_checked="true">
- <nine-patch
- android:src="@drawable/btn_switch_to_on_mtrl_00012"
- android:gravity="center"
- android:tintMode="multiply"
- android:tint="?attr/colorControlActivated"
- android:alpha="?attr/disabledAlpha" />
- </item>
- <item android:state_enabled="false">
+ <item android:state_enabled="false" android:id="@+id/off">
<nine-patch
android:src="@drawable/btn_switch_to_on_mtrl_00001"
android:gravity="center"
android:tintMode="multiply"
- android:tint="?attr/colorButtonNormal" />
+ android:tint="?attr/colorSwitchThumbNormal" />
</item>
<item
android:state_checked="true"
@@ -47,29 +37,29 @@
android:src="@drawable/btn_switch_to_on_mtrl_00001"
android:gravity="center"
android:tintMode="multiply"
- android:tint="?attr/colorButtonNormal" />
+ android:tint="?attr/colorSwitchThumbNormal" />
</item>
<transition
android:fromId="@+id/off"
android:toId="@+id/on">
<animation-list>
<item android:duration="15">
- <nine-patch android:src="@drawable/btn_switch_to_on_mtrl_00001" android:gravity="center" android:tintMode="multiply" android:tint="?attr/colorButtonNormal" />
+ <nine-patch android:src="@drawable/btn_switch_to_on_mtrl_00001" android:gravity="center" android:tintMode="multiply" android:tint="?attr/colorSwitchThumbNormal" />
</item>
<item android:duration="15">
- <nine-patch android:src="@drawable/btn_switch_to_on_mtrl_00002" android:gravity="center" android:tintMode="multiply" android:tint="?attr/colorButtonNormal" />
+ <nine-patch android:src="@drawable/btn_switch_to_on_mtrl_00002" android:gravity="center" android:tintMode="multiply" android:tint="?attr/colorSwitchThumbNormal" />
</item>
<item android:duration="15">
- <nine-patch android:src="@drawable/btn_switch_to_on_mtrl_00003" android:gravity="center" android:tintMode="multiply" android:tint="?attr/colorButtonNormal" />
+ <nine-patch android:src="@drawable/btn_switch_to_on_mtrl_00003" android:gravity="center" android:tintMode="multiply" android:tint="?attr/colorSwitchThumbNormal" />
</item>
<item android:duration="15">
- <nine-patch android:src="@drawable/btn_switch_to_on_mtrl_00004" android:gravity="center" android:tintMode="multiply" android:tint="?attr/colorButtonNormal" />
+ <nine-patch android:src="@drawable/btn_switch_to_on_mtrl_00004" android:gravity="center" android:tintMode="multiply" android:tint="?attr/colorSwitchThumbNormal" />
</item>
<item android:duration="15">
- <nine-patch android:src="@drawable/btn_switch_to_on_mtrl_00005" android:gravity="center" android:tintMode="multiply" android:tint="?attr/colorButtonNormal" />
+ <nine-patch android:src="@drawable/btn_switch_to_on_mtrl_00005" android:gravity="center" android:tintMode="multiply" android:tint="?attr/colorSwitchThumbNormal" />
</item>
<item android:duration="15">
- <nine-patch android:src="@drawable/btn_switch_to_on_mtrl_00006" android:gravity="center" android:tintMode="multiply" android:tint="?attr/colorButtonNormal" />
+ <nine-patch android:src="@drawable/btn_switch_to_on_mtrl_00006" android:gravity="center" android:tintMode="multiply" android:tint="?attr/colorSwitchThumbNormal" />
</item>
<item android:duration="15">
<nine-patch android:src="@drawable/btn_switch_to_on_mtrl_00007" android:gravity="center" android:tintMode="multiply" android:tint="?attr/colorControlActivated" />
@@ -112,22 +102,22 @@
<nine-patch android:src="@drawable/btn_switch_to_off_mtrl_00006" android:gravity="center" android:tintMode="multiply" android:tint="?attr/colorControlActivated" />
</item>
<item android:duration="15">
- <nine-patch android:src="@drawable/btn_switch_to_off_mtrl_00007" android:gravity="center" android:tintMode="multiply" android:tint="?attr/colorButtonNormal" />
+ <nine-patch android:src="@drawable/btn_switch_to_off_mtrl_00007" android:gravity="center" android:tintMode="multiply" android:tint="?attr/colorSwitchThumbNormal" />
</item>
<item android:duration="15">
- <nine-patch android:src="@drawable/btn_switch_to_off_mtrl_00008" android:gravity="center" android:tintMode="multiply" android:tint="?attr/colorButtonNormal" />
+ <nine-patch android:src="@drawable/btn_switch_to_off_mtrl_00008" android:gravity="center" android:tintMode="multiply" android:tint="?attr/colorSwitchThumbNormal" />
</item>
<item android:duration="15">
- <nine-patch android:src="@drawable/btn_switch_to_off_mtrl_00009" android:gravity="center" android:tintMode="multiply" android:tint="?attr/colorButtonNormal" />
+ <nine-patch android:src="@drawable/btn_switch_to_off_mtrl_00009" android:gravity="center" android:tintMode="multiply" android:tint="?attr/colorSwitchThumbNormal" />
</item>
<item android:duration="15">
- <nine-patch android:src="@drawable/btn_switch_to_off_mtrl_00010" android:gravity="center" android:tintMode="multiply" android:tint="?attr/colorButtonNormal" />
+ <nine-patch android:src="@drawable/btn_switch_to_off_mtrl_00010" android:gravity="center" android:tintMode="multiply" android:tint="?attr/colorSwitchThumbNormal" />
</item>
<item android:duration="15">
- <nine-patch android:src="@drawable/btn_switch_to_off_mtrl_00011" android:gravity="center" android:tintMode="multiply" android:tint="?attr/colorButtonNormal" />
+ <nine-patch android:src="@drawable/btn_switch_to_off_mtrl_00011" android:gravity="center" android:tintMode="multiply" android:tint="?attr/colorSwitchThumbNormal" />
</item>
<item android:duration="15">
- <nine-patch android:src="@drawable/btn_switch_to_off_mtrl_00012" android:gravity="center" android:tintMode="multiply" android:tint="?attr/colorButtonNormal" />
+ <nine-patch android:src="@drawable/btn_switch_to_off_mtrl_00012" android:gravity="center" android:tintMode="multiply" android:tint="?attr/colorSwitchThumbNormal" />
</item>
</animation-list>
</transition>
diff --git a/core/res/res/drawable/switch_track_material.xml b/core/res/res/drawable/switch_track_material.xml
index 0728055..1ec2f88 100644
--- a/core/res/res/drawable/switch_track_material.xml
+++ b/core/res/res/drawable/switch_track_material.xml
@@ -15,10 +15,10 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_enabled="false" android:state_checked="true">
+ <item android:state_enabled="false">
<nine-patch android:src="@drawable/switch_track_mtrl_alpha"
- android:tint="?attr/colorControlActivated"
- android:alpha="0.2" />
+ android:tint="?attr/colorForeground"
+ android:alpha="0.1" />
</item>
<item android:state_checked="true">
<nine-patch android:src="@drawable/switch_track_mtrl_alpha"
@@ -27,7 +27,7 @@
</item>
<item>
<nine-patch android:src="@drawable/switch_track_mtrl_alpha"
- android:tint="?attr/colorButtonNormal"
+ android:tint="?attr/colorForeground"
android:alpha="0.3" />
</item>
</selector>
diff --git a/core/res/res/drawable/notification_icon_legacy_bg_inset.xml b/core/res/res/drawable/title_bar_shadow.xml
similarity index 69%
rename from core/res/res/drawable/notification_icon_legacy_bg_inset.xml
rename to core/res/res/drawable/title_bar_shadow.xml
index 96c5573..37b0b8f 100644
--- a/core/res/res/drawable/notification_icon_legacy_bg_inset.xml
+++ b/core/res/res/drawable/title_bar_shadow.xml
@@ -14,8 +14,12 @@
~ See the License for the specific language governing permissions and
~ limitations under the License
-->
-
-<inset xmlns:android="http://schemas.android.com/apk/res/android"
- android:drawable="@drawable/notification_icon_legacy_bg" android:insetBottom="8dp"
- android:insetLeft="8dp" android:insetRight="8dp" android:insetTop="8dp"
- android:visible="true"/>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+ <gradient
+ android:startColor="#44000000"
+ android:centerColor="#1C000000"
+ android:endColor="#00000000"
+ android:centerY="0.3"
+ android:centerX="0.5"
+ android:angle="270"/>
+</shape>
\ No newline at end of file
diff --git a/core/res/res/layout/notification_material_action.xml b/core/res/res/layout/notification_material_action.xml
index 8f8c4fb..637d941 100644
--- a/core/res/res/layout/notification_material_action.xml
+++ b/core/res/res/layout/notification_material_action.xml
@@ -25,8 +25,8 @@
android:gravity="start|center_vertical"
android:drawablePadding="8dp"
android:paddingStart="8dp"
- android:textColor="#555555"
- android:textSize="@dimen/notification_text_size"
+ android:textColor="@color/secondary_text_material_light"
+ android:textSize="13sp"
android:singleLine="true"
android:ellipsize="end"
/>
diff --git a/core/res/res/layout/notification_material_action_list.xml b/core/res/res/layout/notification_material_action_list.xml
index ec4919b..2a36949 100644
--- a/core/res/res/layout/notification_material_action_list.xml
+++ b/core/res/res/layout/notification_material_action_list.xml
@@ -22,9 +22,6 @@
android:orientation="horizontal"
android:visibility="gone"
android:layout_marginBottom="8dp"
- android:showDividers="middle"
- android:divider="@drawable/list_divider_holo_light"
- android:dividerPadding="12dp"
>
<!-- actions will be added here -->
</LinearLayout>
diff --git a/core/res/res/layout/notification_template_icon_group.xml b/core/res/res/layout/notification_template_icon_group.xml
index 2ad6f9e..fa66163 100644
--- a/core/res/res/layout/notification_template_icon_group.xml
+++ b/core/res/res/layout/notification_template_icon_group.xml
@@ -23,20 +23,23 @@
android:id="@+id/icon_group"
>
<ImageView android:id="@+id/icon"
- android:layout_width="@dimen/notification_large_icon_width"
- android:layout_height="@dimen/notification_large_icon_height"
- android:padding="8dp"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_marginTop="12dp"
+ android:layout_marginBottom="12dp"
+ android:layout_marginStart="12dp"
+ android:layout_marginEnd="12dp"
android:scaleType="centerInside"
/>
<ImageView android:id="@+id/right_icon"
- android:layout_width="24dp"
- android:layout_height="24dp"
- android:padding="4dp"
+ android:layout_width="16dp"
+ android:layout_height="16dp"
+ android:padding="3dp"
android:layout_gravity="end|bottom"
android:scaleType="centerInside"
android:visibility="gone"
- android:layout_marginEnd="3dp"
- android:layout_marginBottom="3dp"
+ android:layout_marginEnd="8dp"
+ android:layout_marginBottom="8dp"
/>
</FrameLayout>
diff --git a/core/res/res/layout/notification_template_material_base.xml b/core/res/res/layout/notification_template_material_base.xml
index 5e51db9..674d7b8 100644
--- a/core/res/res/layout/notification_template_material_base.xml
+++ b/core/res/res/layout/notification_template_material_base.xml
@@ -31,25 +31,12 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="top"
- android:layout_marginEnd="8dp"
android:layout_marginStart="@dimen/notification_large_icon_width"
android:minHeight="@dimen/notification_large_icon_height"
android:orientation="vertical"
>
- <include layout="@layout/notification_template_part_line1"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- />
- <include layout="@layout/notification_template_part_line2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- />
- <include layout="@layout/notification_template_part_line3"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- />
+ <include layout="@layout/notification_template_part_line1" />
+ <include layout="@layout/notification_template_part_line2" />
+ <include layout="@layout/notification_template_part_line3" />
</LinearLayout>
</FrameLayout>
diff --git a/core/res/res/layout/notification_template_material_big_base.xml b/core/res/res/layout/notification_template_material_big_base.xml
index 2243a09..3d8a527 100644
--- a/core/res/res/layout/notification_template_material_big_base.xml
+++ b/core/res/res/layout/notification_template_material_big_base.xml
@@ -31,7 +31,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="top"
- android:layout_marginEnd="8dp"
android:layout_marginStart="@dimen/notification_large_icon_width"
android:minHeight="@dimen/notification_large_icon_height"
android:orientation="vertical"
@@ -42,22 +41,26 @@
android:textAppearance="@style/TextAppearance.StatusBar.Material.EventContent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:minHeight="@dimen/notification_large_icon_height"
- android:layout_weight="1"
+ android:layout_marginEnd="8dp"
android:singleLine="false"
android:visibility="gone"
/>
- <include layout="@layout/notification_template_part_line3" />
+ <include
+ layout="@layout/notification_template_part_line3"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginEnd="8dp"
+ />
<ImageView
android:layout_width="match_parent"
android:layout_height="1dp"
+ android:layout_marginTop="10dp"
android:id="@+id/action_divider"
android:visibility="gone"
- android:background="@drawable/list_divider_holo_light" />
+ android:background="@drawable/notification_template_divider" />
<include
layout="@layout/notification_material_action_list"
- android:layout_marginLeft="-8dp"
- android:layout_marginRight="-8dp"
+ android:layout_marginStart="-8dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
diff --git a/core/res/res/layout/notification_template_material_big_text.xml b/core/res/res/layout/notification_template_material_big_text.xml
new file mode 100644
index 0000000..36f8701
--- /dev/null
+++ b/core/res/res/layout/notification_template_material_big_text.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2014 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License
+ -->
+
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:internal="http://schemas.android.com/apk/prv/res/android"
+ android:id="@+id/status_bar_latest_event_content"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ internal:layout_minHeight="65dp"
+ internal:layout_maxHeight="unbounded"
+ >
+ <include layout="@layout/notification_template_icon_group"
+ android:layout_width="@dimen/notification_large_icon_width"
+ android:layout_height="@dimen/notification_large_icon_height"
+ />
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="top"
+ android:layout_marginStart="@dimen/notification_large_icon_width"
+ android:minHeight="@dimen/notification_large_icon_height"
+ android:orientation="vertical"
+ >
+ <include layout="@layout/notification_template_part_line1" />
+ <include layout="@layout/notification_template_part_line2" />
+ <TextView android:id="@+id/big_text"
+ android:textAppearance="@style/TextAppearance.StatusBar.Material.EventContent"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginEnd="8dp"
+ android:layout_marginBottom="10dp"
+ android:visibility="gone"
+ />
+ <ImageView
+ android:layout_width="match_parent"
+ android:layout_height="1dp"
+ android:id="@+id/action_divider"
+ android:visibility="gone"
+ android:background="@drawable/notification_template_divider" />
+ <include
+ layout="@layout/notification_material_action_list"
+ android:layout_marginStart="-8dp"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ />
+ <ImageView
+ android:layout_width="match_parent"
+ android:layout_height="1dip"
+ android:id="@+id/overflow_divider"
+ android:visibility="visible"
+ android:background="@drawable/notification_template_divider" />
+ <include
+ layout="@layout/notification_template_part_line3"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginEnd="8dp"
+ android:layout_marginTop="8dp"
+ android:layout_marginBottom="10dp" />
+ </LinearLayout>
+</FrameLayout>
diff --git a/core/res/res/layout/notification_template_material_inbox.xml b/core/res/res/layout/notification_template_material_inbox.xml
index 6133791..ef6cbd0 100644
--- a/core/res/res/layout/notification_template_material_inbox.xml
+++ b/core/res/res/layout/notification_template_material_inbox.xml
@@ -113,7 +113,7 @@
<FrameLayout
android:id="@+id/inbox_end_pad"
android:layout_width="match_parent"
- android:layout_height="8dip"
+ android:layout_height="10dp"
android:visibility="gone"
android:layout_weight="0"
/>
@@ -122,7 +122,7 @@
android:layout_height="1dip"
android:id="@+id/action_divider"
android:visibility="gone"
- android:background="@drawable/list_divider_holo_light" />
+ android:background="@drawable/notification_template_divider" />
<include
layout="@layout/notification_material_action_list"
android:layout_width="match_parent"
@@ -136,7 +136,13 @@
android:layout_height="1dip"
android:id="@+id/overflow_divider"
android:visibility="visible"
- android:background="@drawable/list_divider_holo_light" />
- <include layout="@layout/notification_template_part_line3" />
+ android:background="@drawable/notification_template_divider" />
+ <include
+ layout="@layout/notification_template_part_line3"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginEnd="8dp"
+ android:layout_marginTop="8dp"
+ android:layout_marginBottom="10dp" />
</LinearLayout>
</FrameLayout>
diff --git a/core/res/res/layout/notification_template_part_line1.xml b/core/res/res/layout/notification_template_part_line1.xml
index d652959..c6ea6bf 100644
--- a/core/res/res/layout/notification_template_part_line1.xml
+++ b/core/res/res/layout/notification_template_part_line1.xml
@@ -19,9 +19,8 @@
android:id="@+id/line1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:layout_marginEnd="8dp"
android:orientation="horizontal"
- android:paddingTop="@dimen/notification_vert_pad"
- android:layout_weight="0"
>
<TextView android:id="@+id/title"
android:textAppearance="@style/TextAppearance.StatusBar.Material.EventContent.Title"
diff --git a/core/res/res/layout/notification_template_part_line2.xml b/core/res/res/layout/notification_template_part_line2.xml
index 1e19df1..d3f202f 100644
--- a/core/res/res/layout/notification_template_part_line2.xml
+++ b/core/res/res/layout/notification_template_part_line2.xml
@@ -21,8 +21,9 @@
android:textAppearance="@style/TextAppearance.StatusBar.Material.EventContent.Line2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="-2dp"
- android:layout_marginBottom="-2dp"
+ android:layout_marginEnd="8dp"
+ android:layout_marginTop="-1dp"
+ android:layout_marginBottom="-1dp"
android:singleLine="true"
android:fadingEdge="horizontal"
android:ellipsize="marquee"
@@ -32,7 +33,8 @@
<ProgressBar
android:id="@android:id/progress"
android:layout_width="match_parent"
- android:layout_height="8dp"
+ android:layout_height="15dp"
+ android:layout_marginEnd="8dp"
android:visibility="gone"
android:layout_weight="0"
style="@style/Widget.Material.Light.ProgressBar.Horizontal"
diff --git a/core/res/res/layout/notification_template_part_line3.xml b/core/res/res/layout/notification_template_part_line3.xml
index 2c8c704c..dd2779d 100644
--- a/core/res/res/layout/notification_template_part_line3.xml
+++ b/core/res/res/layout/notification_template_part_line3.xml
@@ -19,10 +19,9 @@
android:id="@+id/line3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:layout_marginEnd="8dp"
android:orientation="horizontal"
- android:layout_weight="0"
android:gravity="center_vertical"
- android:paddingBottom="@dimen/notification_vert_pad"
>
<TextView android:id="@+id/text"
android:textAppearance="@style/TextAppearance.StatusBar.Material.EventContent"
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index 08aaa6a..e7a833b 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -1005,6 +1005,9 @@
<!-- The color applied to framework buttons in their normal state. -->
<attr name="colorButtonNormal" format="color" />
+ <!-- The color applied to framework switch thumbs in their normal state. -->
+ <attr name="colorSwitchThumbNormal" format="color" />
+
<!-- ================== -->
<!-- Hardware rendering -->
<!-- ================== -->
@@ -3799,13 +3802,17 @@
<attr name="textColorLink" />
<!-- Present the text in ALL CAPS. This may use a small-caps form when available. -->
<attr name="textAllCaps" format="boolean" />
- <!-- Place a shadow of the specified color behind the text. -->
+ <!-- Place a blurred shadow of text underneath the text, drawn with the
+ specified color. The text shadow produced does not interact with
+ properties on View that are responsible for real time shadows,
+ {@link android.R.styleable#View_elevation elevation} and
+ {@link android.R.styleable#View_translationZ translationZ}. -->
<attr name="shadowColor" format="color" />
- <!-- Horizontal offset of the shadow. -->
+ <!-- Horizontal offset of the text shadow. -->
<attr name="shadowDx" format="float" />
- <!-- Vertical offset of the shadow. -->
+ <!-- Vertical offset of the text shadow. -->
<attr name="shadowDy" format="float" />
- <!-- Radius of the shadow. -->
+ <!-- Blur radius of the text shadow. -->
<attr name="shadowRadius" format="float" />
<!-- Elegant text height, especially for less compacted complex script text. -->
<attr name="elegantTextHeight" format="boolean" />
@@ -3946,13 +3953,17 @@
<!-- Set an input filter to constrain the text length to the
specified number. -->
<attr name="maxLength" format="integer" min="0" />
- <!-- Place a shadow of the specified color behind the text. -->
+ <!-- Place a blurred shadow of text underneath the text, drawn with the
+ specified color. The text shadow produced does not interact with
+ properties on View that are responsible for real time shadows,
+ {@link android.R.styleable#View_elevation elevation} and
+ {@link android.R.styleable#View_translationZ translationZ}. -->
<attr name="shadowColor" />
- <!-- Horizontal offset of the shadow. -->
+ <!-- Horizontal offset of the text shadow. -->
<attr name="shadowDx" />
- <!-- Vertical offset of the shadow. -->
+ <!-- Vertical offset of the text shadow. -->
<attr name="shadowDy" />
- <!-- Radius of the shadow. -->
+ <!-- Blur radius of the text shadow. -->
<attr name="shadowRadius" />
<attr name="autoLink" />
<!-- If set to false, keeps the movement method from being set
@@ -7292,7 +7303,7 @@
<attr name="colorPrimary" />
</declare-styleable>
- <!-- Use <code>tv-input</code> as the root tag of the XML resource that describes an
+ <!-- Use <code>tv-input</code> as the root tag of the XML resource that describes a
{@link android.media.tv.TvInputService}, which is referenced from its
{@link android.media.tv.TvInputService#SERVICE_META_DATA} meta-data entry.
Described here are the attributes that can be included in that tag. -->
@@ -7307,6 +7318,36 @@
<attr name="tvContentRatingDescription" format="reference" />
</declare-styleable>
+ <!-- Attributes that can be used with <code>rating-system-definition</code> tags inside of the
+ XML resource that describes TV content rating of a
+ {@link android.media.tv.TvInputService}, which is referenced from
+ {@link android.R.attr#tvContentRatingDescription}. -->
+ <declare-styleable name="RatingSystemDefinition">
+ <!-- The unique name of the content rating system. -->
+ <attr name="name" />
+ <!-- The title of the content rating system which is shown to the user. -->
+ <attr name="title" />
+ <!-- The short description of the content rating system. -->
+ <attr name="description" />
+ <!-- The country associated with the content rating system. -->
+ <attr name="country" format="string" />
+ </declare-styleable>
+
+ <!-- Attributes that can be used with <code>rating-definition</code> tags inside of the XML
+ resource that describes TV content rating of a {@link android.media.tv.TvInputService},
+ which is referenced from {@link android.R.attr#tvContentRatingDescription}. -->
+ <declare-styleable name="RatingDefinition">
+ <!-- The unique name of the content rating. -->
+ <attr name="name" />
+ <!-- The title of the content rating which is shown to the user. -->
+ <attr name="title" />
+ <!-- The short description of the content rating. -->
+ <attr name="description" />
+ <!-- The age associated with the content rating. The content of this rating is suitable for
+ people of this age or above. -->
+ <attr name="ageHint" format="integer" />
+ </declare-styleable>
+
<declare-styleable name="ResolverDrawerLayout">
<attr name="maxWidth" />
<attr name="maxCollapsedHeight" format="dimension" />
diff --git a/core/res/res/values/colors.xml b/core/res/res/values/colors.xml
index d538352..0360460 100644
--- a/core/res/res/values/colors.xml
+++ b/core/res/res/values/colors.xml
@@ -127,6 +127,7 @@
<drawable name="notification_template_icon_bg">#3333B5E5</drawable>
<drawable name="notification_template_icon_low_bg">#0cffffff</drawable>
+ <drawable name="notification_template_divider">#29000000</drawable>
<color name="notification_icon_bg_color">#ff9e9e9e</color>
<color name="notification_action_legacy_color_filter">#ff555555</color>
diff --git a/core/res/res/values/colors_material.xml b/core/res/res/values/colors_material.xml
index ccbb8bc..2348951 100644
--- a/core/res/res/values/colors_material.xml
+++ b/core/res/res/values/colors_material.xml
@@ -25,6 +25,11 @@
<color name="button_material_dark">#ff5a595b</color>
<color name="button_material_light">#ffd6d7d7</color>
+ <color name="switch_thumb_normal_material_dark">#ffbdbdbd</color>
+ <color name="switch_thumb_normal_material_light">#fff1f1f1</color>
+ <color name="switch_thumb_disabled_material_dark">#ff616161</color>
+ <color name="switch_thumb_disabled_material_light">#ffbdbdbd</color>
+
<color name="bright_foreground_material_dark">@color/white</color>
<color name="bright_foreground_material_light">@color/black</color>
<!-- White 50% -->
diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml
index e58bc6f..6022bdc 100644
--- a/core/res/res/values/dimens.xml
+++ b/core/res/res/values/dimens.xml
@@ -215,17 +215,26 @@
<dimen name="action_bar_stacked_tab_max_width">180dp</dimen>
<!-- Size of notification text (see TextAppearance.StatusBar.EventContent) -->
- <dimen name="notification_text_size">13sp</dimen>
+ <dimen name="notification_text_size">14sp</dimen>
<!-- Size of notification text titles (see TextAppearance.StatusBar.EventContent.Title) -->
<dimen name="notification_title_text_size">16sp</dimen>
<!-- Size of smaller notification text (see TextAppearance.StatusBar.EventContent.Line2, Info, Time) -->
<dimen name="notification_subtext_size">12sp</dimen>
- <!-- 8dp at the top/bottom of the notification view -->
- <dimen name="notification_vert_pad">10dp</dimen>
+ <!-- Top padding for notifications in the standard layout. -->
+ <dimen name="notification_top_pad">10dp</dimen>
- <!-- Replacement for @dimen/notification_vert_pad when the text is large -->
- <dimen name="notification_large_font_vert_pad">3dp</dimen>
+ <!-- Top padding for notifications when narrow (i.e. it has 3 lines) -->
+ <dimen name="notification_top_pad_narrow">4dp</dimen>
+
+ <!-- Top padding for notification when text is large -->
+ <dimen name="notification_top_pad_large_text">5dp</dimen>
+
+ <!-- Top padding for notification when text is large and narrow (i.e. it has 3 lines -->
+ <dimen name="notification_top_pad_large_text_narrow">-4dp</dimen>
+
+ <!-- Padding for notification icon when drawn with circle around it -->
+ <dimen name="notification_large_icon_circle_padding">11dp</dimen>
<!-- Keyguard dimensions -->
<!-- TEMP -->
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index ed66c65..4f0c5eb 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -2273,6 +2273,8 @@
<public type="attr" name="letterSpacing" />
<public type="attr" name="fontFeatureSettings" />
<public type="attr" name="outlineProvider" />
+ <public type="attr" name="ageHint" />
+ <public type="attr" name="country" />
<public-padding type="dimen" name="l_resource_pad" end="0x01050010" />
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 78ba738..b198329 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -3958,9 +3958,9 @@
<string name="permission_request_notification_with_subtitle">Permission requested\nfor account <xliff:g id="account" example="foo@gmail.com">%s</xliff:g>.</string>
<!-- Message to show when an intent automatically switches users into the personal profile. -->
- <string name="forward_intent_to_owner">You\'re using this app in your personal space</string>
+ <string name="forward_intent_to_owner">You\'re using this app in your personal profile</string>
<!-- Message to show when an intent automatically switches users into a work profile. -->
- <string name="forward_intent_to_work">You\'re using this app in your work space</string>
+ <string name="forward_intent_to_work">You\'re using this app in your work profile</string>
<!-- Label to show for a service that is running because it is an input method. -->
<string name="input_method_binding_label">Input method</string>
@@ -4859,667 +4859,12 @@
<!-- Exting lock-to-app indication. -->
<string name="lock_to_app_exit">Screen unpinned</string>
- <!-- Lock-to-app checkbox for lock on exit -->
- <string name="lock_to_app_use_screen_lock">Ask for %1$s before unpinning</string>
-
<!-- Lock-to-app unlock pin string -->
- <string name="lock_to_app_unlock_pin">PIN</string>
+ <string name="lock_to_app_unlock_pin">Ask for PIN before unpinning</string>
<!-- Lock-to-app unlock pattern string -->
- <string name="lock_to_app_unlock_pattern">unlock pattern</string>
+ <string name="lock_to_app_unlock_pattern">Ask for unlock pattern before unpinning</string>
<!-- Lock-to-app unlock password string -->
- <string name="lock_to_app_unlock_password">password</string>
-
- <!-- Range specific TV content rating system strings for AM TV -->
- <string name="display_name_amtvrs" translatable="false">AM-TV-RS</string>
- <string name="description_amtvrs" translatable="false">Range specific TV content rating system strings for Armenia</string>
- <string name="display_name_amtvrs_y" translatable="false">Y</string>
- <string name="display_name_amtvrs_y7" translatable="false">Y7</string>
- <string name="display_name_amtvrs_ga" translatable="false">GA</string>
- <string name="display_name_amtvrs_tw" translatable="false">TW</string>
- <string name="display_name_amtvrs_t" translatable="false">T</string>
- <string name="display_name_amtvrs_a" translatable="false">A</string>
- <string name="description_amtvrs_y" translatable="false">Suitable for ages 2-11</string>
- <string name="description_amtvrs_y7" translatable="false">Suitable for ages 7-16</string>
- <string name="description_amtvrs_ga" translatable="false">Suitable for general audiences</string>
- <string name="description_amtvrs_tw" translatable="false">Suitable for teens ages 9 and up</string>
- <string name="description_amtvrs_t" translatable="false">Suitable for teens ages 12 and up</string>
- <string name="description_amtvrs_a" translatable="false">Suitable only for adults ages 18 and up</string>
-
- <!-- Age specific TV content rating system strings for AM TV -->
- <string name="display_name_amtvas" translatable="false">AM-TV-AS</string>
- <string name="description_amtvas" translatable="false">Age specific TV content rating system strings for Armenia</string>
- <string name="display_name_amtvas_ec" translatable="false">EC</string>
- <string name="display_name_amtvas_e" translatable="false">E</string>
- <string name="display_name_amtvas_e9" translatable="false">E9</string>
- <string name="display_name_amtvas_t" translatable="false">T</string>
- <string name="display_name_amtvas_m" translatable="false">M</string>
- <string name="display_name_amtvas_ao" translatable="false">AO</string>
- <string name="description_amtvas_ec" translatable="false">Suitable for ages 2 and up</string>
- <string name="description_amtvas_e" translatable="false">Suitable for ages 5 and up</string>
- <string name="description_amtvas_e9" translatable="false">Suitable for ages 9 and up</string>
- <string name="description_amtvas_t" translatable="false">Suitable for ages 12 and up</string>
- <string name="description_amtvas_m" translatable="false">Suitable for ages 16 and up</string>
- <string name="description_amtvas_ao" translatable="false">Suitable for ages 17 and up</string>
-
- <!-- TV content rating system strings for AR TV -->
- <string name="display_name_artv" translatable="false">AR-TV</string>
- <string name="display_name_artv_all" translatable="false">Apto para todo público</string>
- <string name="display_name_artv_13" translatable="false">Apto para mayores de 13 años</string>
- <string name="display_name_artv_16" translatable="false">Apto para mayores de 16 años</string>
- <string name="display_name_artv_18" translatable="false">Apto para mayores de 18 años</string>
- <string name="description_artv_all" translatable="false">Suitable for all audiences. Programs may contain mild violence, language and mature situations</string>
- <string name="description_artv_13" translatable="false">Suitable for ages 13 and up. Programs may contain mild to moderate language and mild violence and sexual references</string>
- <string name="description_artv_16" translatable="false">Suitable for ages 16 and up. Programs may contain more intensive violence and coarse language, partial nudity and moderate sexual references</string>
- <string name="description_artv_18" translatable="false">Suitable for mature audiences only. Programs contain strong violence, coarse language and explicit sexual references</string>
-
- <!-- TV content rating system strings for AU TV -->
- <string name="display_name_autv" translatable="false">Australian TV Classification</string>
- <string name="display_name_autv_ctc" translatable="false">CTC</string>
- <string name="display_name_autv_g" translatable="false">G</string>
- <string name="display_name_autv_pg" translatable="false">PG</string>
- <string name="display_name_autv_m" translatable="false">M</string>
- <string name="display_name_autv_ma15" translatable="false">MA 15+</string>
- <string name="display_name_autv_r18" translatable="false">R 18+</string>
- <string name="display_name_autv_x18" translatable="false">X 18+</string>
- <string name="description_autv_ctc" translatable="false">This has advertising approval, but is not yet classified</string>
- <string name="description_autv_g" translatable="false">The content is very mild in impact, and suitable for everyone</string>
- <string name="description_autv_pg" translatable="false">The content is mild in impact, but it may contain content that children find confusing or upsetting and may require the guidance or parents and guardians</string>
- <string name="description_autv_m" translatable="false">The content is moderate in impact, and it is recommended for teenagers aged 15 years and over</string>
- <string name="description_autv_ma15" translatable="false">The content is strong in impact, and it is legally restricted to persons 15 years and over</string>
- <string name="description_autv_r18" translatable="false">The content is high in impact, and it is restricted to adults</string>
- <string name="description_autv_x18" translatable="false">The content is restricted to adults. This classification is a special and legally restricted category which contains only sexually explicit content</string>
-
- <!-- TV content rating system strings for BG TV -->
- <string name="display_name_bgtv" translatable="false">BG-TV</string>
- <string name="display_name_bgtv_a" translatable="false">A</string>
- <string name="display_name_bgtv_b" translatable="false">B</string>
- <string name="display_name_bgtv_c" translatable="false">C</string>
- <string name="display_name_bgtv_d" translatable="false">D</string>
- <string name="display_name_bgtv_x" translatable="false">X</string>
- <string name="description_bgtv_a" translatable="false">Recommended to children. When the film confirms the ideals of humanism or popularizes the national and world cultures or contributes to upbringing children</string>
- <string name="description_bgtv_b" translatable="false">No restrictive recommendations from the Committee. When the film is in no way contrary to the universal rules of morality in this country, has no restrictive recommendations from the Committee and does not fall in rating A</string>
- <string name="description_bgtv_c" translatable="false">No persons under the age of 12 are admitted unless accompanied by an adult. When the film contains certain erotic scenes or scenes with drinking, taking drugs or stimulants or a few scenes of violence</string>
- <string name="description_bgtv_d" translatable="false">No persons under the age of 16 are admitted. When the film contains quite a number of erotic scenes or scenes with drinking, taking drugs or stimulants or a considerable number of scenes showing violence</string>
- <string name="description_bgtv_x" translatable="false">No persons under the age of 18 are admitted. When the film is naturalistically erotic or shows violence in an ostentatious manner</string>
-
- <!-- TV content rating system strings for BR TV -->
- <string name="display_name_brtv" translatable="false">Brazil Content Rating</string>
- <string name="display_name_brtv_l" translatable="false">Livre</string>
- <string name="display_name_brtv_10" translatable="false">10 anos</string>
- <string name="display_name_brtv_12" translatable="false">12 anos</string>
- <string name="display_name_brtv_14" translatable="false">14 anos</string>
- <string name="display_name_brtv_16" translatable="false">16 anos</string>
- <string name="display_name_brtv_18" translatable="false">18 anos</string>
- <string name="description_brtv_l" translatable="false">Content is suitable for all audiences</string>
- <string name="description_brtv_10" translatable="false">Content suitable for viewers over the age of 10</string>
- <string name="description_brtv_12" translatable="false">Content suitable for viewers over the age of 12</string>
- <string name="description_brtv_14" translatable="false">Content suitable for viewers over the age of 14</string>
- <string name="description_brtv_16" translatable="false">Content suitable for viewers over the age of 16</string>
- <string name="description_brtv_18" translatable="false">Content suitable for viewers over the age of 18</string>
-
- <!-- TV content rating system strings for CA TV -->
- <string name="display_name_catv" translatable="false">Canadian TV Classification System</string>
- <string name="display_name_catv_exempt" translatable="false">Exempt</string>
- <string name="display_name_catv_c" translatable="false">C</string>
- <string name="display_name_catv_c8" translatable="false">C8</string>
- <string name="display_name_catv_g" translatable="false">G</string>
- <string name="display_name_catv_pg" translatable="false">PG</string>
- <string name="display_name_catv_14" translatable="false">14+</string>
- <string name="display_name_catv_18" translatable="false">18+</string>
- <string name="description_catv_exempt" translatable="false">Shows which are exempt from ratings (such as news and sports programming) will not display an on-screen rating at all</string>
- <string name="description_catv_c" translatable="false">Programming suitable for children ages of 2-7 years. No profanity or sexual content of any level allowed. Contains little violence</string>
- <string name="description_catv_c8" translatable="false">Suitable for children ages 8+. Low level violence and fantasy horror is allowed. No foul language is allowed, but occasional "socially offensive and discriminatory" language is allowed if in the context of the story. No sexual content of any level allowed</string>
- <string name="description_catv_g" translatable="false">Suitable for general audiences. Programming suitable for the entire family with mild violence, and mild profanity and/or censored language</string>
- <string name="description_catv_pg" translatable="false">Parental guidance. Moderate violence and moderate profanity is allowed, as is brief nudity and sexual references if important to the context of the story</string>
- <string name="description_catv_14" translatable="false">Programming intended for viewers ages 14 and older. May contain strong violence and strong profanity, and depictions of sexual activity as long as they are within the context of a story</string>
- <string name="description_catv_18" translatable="false">Programming intended for viewers ages 18 and older. May contain explicit violence and sexual activity</string>
-
- <!-- TV content rating system strings for CH TV -->
- <string name="display_name_chtv" translatable="false">CH-TV</string>
- <string name="display_name_chtv_all" translatable="false">All ages</string>
- <string name="display_name_chtv_red" translatable="false">Red rectangle</string>
- <string name="description_chtv_all" translatable="false">This program is suitable for all ages</string>
- <string name="description_chtv_red" translatable="false">This program contains scenes that may hurt sensitive people, therefore the red symbol will be displayed</string>
-
- <!-- TV content rating system strings for CL TV -->
- <string name="display_name_cltv" translatable="false">CL-TV</string>
- <string name="display_name_cltv_i" translatable="false">I</string>
- <string name="display_name_cltv_i7" translatable="false">I7</string>
- <string name="display_name_cltv_i10" translatable="false">I10</string>
- <string name="display_name_cltv_i12" translatable="false">I12</string>
- <string name="display_name_cltv_f" translatable="false">F</string>
- <string name="display_name_cltv_r" translatable="false">R</string>
- <string name="display_name_cltv_a" translatable="false">A</string>
- <string name="description_cltv_i" translatable="false">Programs suitable for all children</string>
- <string name="description_cltv_i7" translatable="false">Programs recommended for children ages 7 or older</string>
- <string name="description_cltv_i10" translatable="false">Programs recommended for children ages 10 or older</string>
- <string name="description_cltv_i12" translatable="false">Programs recommended for children and teens ages 12 or older</string>
- <string name="description_cltv_f" translatable="false">Programs suitable for a general audience, with content appropriate for all ages</string>
- <string name="description_cltv_r" translatable="false">Programs may content not suitable for children not accompanied by an adult</string>
- <string name="description_cltv_a" translatable="false">Programs suitable for adult audiences only (ages 18 or older), may contain coarse language, and sexual or explicit situations</string>
-
- <!-- TV content rating system strings for DE TV -->
- <string name="display_name_detv" translatable="false">DE-TV</string>
- <string name="display_name_detv_all" translatable="false">ab 0 Jahren</string>
- <string name="display_name_detv_12" translatable="false">ab 12 Jahren</string>
- <string name="display_name_detv_16" translatable="false">ab 16 Jahren</string>
- <string name="display_name_detv_18" translatable="false">ab 18 Jahren</string>
- <string name="description_detv_all" translatable="false">The program is suitable for all ages</string>
- <string name="description_detv_12" translatable="false">The program is not suitable for viewers under the age of 12</string>
- <string name="description_detv_16" translatable="false">The program is not suitable for viewers under the age of 16</string>
- <string name="description_detv_18" translatable="false">The program is not suitable for viewers under the age of 18</string>
-
- <!-- TV content rating system strings for DK TV -->
- <string name="display_name_dktv" translatable="false">DK-TV</string>
- <string name="display_name_dktv_g" translatable="false">Green symbol</string>
- <string name="display_name_dktv_y" translatable="false">Yellow symbol</string>
- <string name="display_name_dktv_r" translatable="false">Red symbol</string>
- <string name="display_name_dktv_b" translatable="false">Blue symbol</string>
- <string name="description_dktv_g" translatable="false">programs suitable for all ages</string>
- <string name="description_dktv_y" translatable="false">programs suitable children accompanied by an adult</string>
- <string name="description_dktv_r" translatable="false">programs containing material with more intensive content </string>
- <string name="description_dktv_b" translatable="false">programs containing explicit content and strictly for adults only</string>
-
- <!-- TV content rating system strings for ES TV -->
- <string name="display_name_estv" translatable="false">ES-TV</string>
- <string name="display_name_estv_tp" translatable="false">TP</string>
- <string name="display_name_estv_i" translatable="false">I</string>
- <string name="display_name_estv_7" translatable="false">+7</string>
- <string name="display_name_estv_7i" translatable="false">7I</string>
- <string name="display_name_estv_12" translatable="false">12</string>
- <string name="display_name_estv_16" translatable="false">16</string>
- <string name="display_name_estv_18" translatable="false">18</string>
- <string name="description_estv_tp" translatable="false">Recommended for all ages</string>
- <string name="description_estv_i" translatable="false">Specially recommended for preschoolers and kids</string>
- <string name="description_estv_7" translatable="false">Recommended for people older than 7 years old</string>
- <string name="description_estv_7i" translatable="false">Recommended for kids older than 7 years old</string>
- <string name="description_estv_12" translatable="false">Recommended for people older than 12 years old</string>
- <string name="description_estv_16" translatable="false">Recommended for people older than 16 years old</string>
- <string name="description_estv_18" translatable="false">Recommended for people older than 18 years old</string>
-
- <!-- TV content rating system strings for FI TV -->
- <string name="display_name_fitv" translatable="false">FI-TV</string>
- <string name="display_name_fitv_s" translatable="false">S</string>
- <string name="display_name_fitv_k7" translatable="false">K7</string>
- <string name="display_name_fitv_k12" translatable="false">K12</string>
- <string name="display_name_fitv_k16" translatable="false">K16</string>
- <string name="display_name_fitv_k18" translatable="false">K18</string>
- <string name="description_fitv_s" translatable="false">Allowed at all times</string>
- <string name="description_fitv_k7" translatable="false">Not recommended for children under 7</string>
- <string name="description_fitv_k12" translatable="false">Not recommended for children under 12</string>
- <string name="description_fitv_k16" translatable="false">Not recommended for children under 16</string>
- <string name="description_fitv_k18" translatable="false">Not recommended for children under 18</string>
-
- <!-- TV content rating system strings for FR TV -->
- <string name="display_name_frtv" translatable="false">FR-TV</string>
- <string name="display_name_frtv_all" translatable="false">Les programmes tous publics</string>
- <string name="display_name_frtv_10" translatable="false">Déconseillé aux -10 ans</string>
- <string name="display_name_frtv_12" translatable="false">Déconseillé aux -12 ans</string>
- <string name="display_name_frtv_16" translatable="false">Déconseillé aux -16 ans</string>
- <string name="display_name_frtv_18" translatable="false">Déconseillé aux -18 ans</string>
- <string name="description_frtv_all" translatable="false">Appropriate for all ages</string>
- <string name="description_frtv_10" translatable="false">Not recommended for children under 10</string>
- <string name="description_frtv_12" translatable="false">Not recommended for children under 12</string>
- <string name="description_frtv_16" translatable="false">Not recommended for children under 16</string>
- <string name="description_frtv_18" translatable="false">Not recommended for persons under 18</string>
-
- <!-- TV content rating system strings for GR TV -->
- <string name="display_name_grtv" translatable="false">GR-TV</string>
- <string name="display_name_grtv_all" translatable="false">White rhombus in green background</string>
- <string name="display_name_grtv_10" translatable="false">White circle in blue background</string>
- <string name="display_name_grtv_12" translatable="false">White triangle in orange background</string>
- <string name="display_name_grtv_15" translatable="false">White square in purple background</string>
- <string name="display_name_grtv_18" translatable="false">White X in red background</string>
- <string name="description_grtv_all" translatable="false">Suitable for all ages</string>
- <string name="description_grtv_10" translatable="false">Parental consent suggested</string>
- <string name="description_grtv_12" translatable="false">Required parental consent</string>
- <string name="description_grtv_15" translatable="false">Suitable for minors over the age of 15</string>
- <string name="description_grtv_18" translatable="false">Suitable only for adults profanity before midnight is punishable by fine, except when used in the context of the program</string>
-
- <!-- TV content rating system strings for HK TV -->
- <string name="display_name_hktv" translatable="false">HK-TV</string>
- <string name="display_name_hktv_g" translatable="false">G</string>
- <string name="display_name_hktv_pg" translatable="false">PG</string>
- <string name="display_name_hktv_m" translatable="false">M</string>
- <string name="description_hktv_g" translatable="false">For general audiences</string>
- <string name="description_hktv_pg" translatable="false">Programs are unsuitable for children, parental guidance is recommended</string>
- <string name="description_hktv_m" translatable="false">Programs are recommended only for adult viewers above the age of 18</string>
-
- <!-- TV content rating system strings for HU TV -->
- <string name="display_name_hutv" translatable="false">HU-TV</string>
- <string name="display_name_hutv_u" translatable="false">Unrated</string>
- <string name="display_name_hutv_cf" translatable="false">Children Friendly</string>
- <string name="display_name_hutv_6" translatable="false">6</string>
- <string name="display_name_hutv_12" translatable="false">12</string>
- <string name="display_name_hutv_16" translatable="false">16</string>
- <string name="display_name_hutv_18" translatable="false">18</string>
- <string name="description_hutv_u" translatable="false">Programs can be viewed by any age</string>
- <string name="description_hutv_cf" translatable="false">Programs recommended for children. It is an optional rating, there is no obligation for broadcasters to indicate it</string>
- <string name="description_hutv_6" translatable="false">Programs not recommended for children below the age of 6, may not contain any violence or sexual content</string>
- <string name="description_hutv_12" translatable="false">Programs not recommended for children below the age of 12, may contain light sexual content or explicit language</string>
- <string name="description_hutv_16" translatable="false">Programs not recommended for teens and children below the age of 16, may contain more intensive violence and sexual content</string>
- <string name="description_hutv_18" translatable="false">The program is recommended only for adult viewers (for ages 18 and up), may contain explicit violence and explicit sexual content</string>
-
- <!-- TV content rating system strings for ID TV -->
- <string name="display_name_idtv" translatable="false">ID-TV</string>
- <string name="display_name_idtv_p" translatable="false">P</string>
- <string name="display_name_idtv_a" translatable="false">A</string>
- <string name="display_name_idtv_a_bo" translatable="false">A-BO</string>
- <string name="display_name_idtv_su" translatable="false">SU</string>
- <string name="display_name_idtv_bo" translatable="false">BO</string>
- <string name="display_name_idtv_r" translatable="false">R</string>
- <string name="display_name_idtv_r_bo" translatable="false">R-BO</string>
- <string name="display_name_idtv_d" translatable="false">D</string>
- <string name="description_idtv_p" translatable="false">Suitable for children from ages 2 through 11</string>
- <string name="description_idtv_a" translatable="false">Suitable for teens and children from ages 7 through 16</string>
- <string name="description_idtv_a_bo" translatable="false">Suitable for children ages 5 through 10, with parental guidance or permission</string>
- <string name="description_idtv_su" translatable="false">Suitable for general audiences</string>
- <string name="description_idtv_bo" translatable="false">Parental guidance suggested for ages 5 and under</string>
- <string name="description_idtv_r" translatable="false">Suitable for teens from ages 13 through 17</string>
- <string name="description_idtv_r_bo" translatable="false">Suitable for teens with parental guidance or permission</string>
- <string name="description_idtv_d" translatable="false">Suitable for viewers over 18 and older only</string>
-
- <!-- TV content rating system strings for IE TV -->
- <string name="display_name_ietv" translatable="false">RTÉ programme classifications</string>
- <string name="display_name_ietv_ga" translatable="false">GA</string>
- <string name="display_name_ietv_ch" translatable="false">Ch</string>
- <string name="display_name_ietv_ya" translatable="false">YA</string>
- <string name="display_name_ietv_ps" translatable="false">PS</string>
- <string name="display_name_ietv_ma" translatable="false">MA</string>
- <string name="description_ietv_ga" translatable="false">Suitable for all ages</string>
- <string name="description_ietv_ch" translatable="false">Suitable for children ages 5 to 10, may contain comedic violence or action fantasy violence</string>
- <string name="description_ietv_ya" translatable="false">Suitable for adolescent audiences, may contain thematic elements that would appeal to teenagers</string>
- <string name="description_ietv_ps" translatable="false">Suitable for more mature viewers, more mature themes may be present</string>
- <string name="description_ietv_ma" translatable="false">Most restrictive classification, allowing for heavy subject matter and coarse language</string>
-
- <!-- TV content rating system strings for IL TV -->
- <string name="display_name_iltv" translatable="false">IL-TV</string>
- <string name="display_name_iltv_g" translatable="false">G</string>
- <string name="display_name_iltv_12" translatable="false">12+</string>
- <string name="display_name_iltv_15" translatable="false">15+</string>
- <string name="display_name_iltv_18" translatable="false">18+</string>
- <string name="display_name_iltv_e" translatable="false">E</string>
- <string name="description_iltv_g" translatable="false">General audience; anyone, regardless of age, can view the program, usually news and children\'s programming</string>
- <string name="description_iltv_12" translatable="false">Suitable for teens and children ages 12 and over, no child under 12 are permitted to view the program</string>
- <string name="description_iltv_15" translatable="false">Suitable for teens ages 15 and over, no child under 15 may view the programme</string>
- <string name="description_iltv_18" translatable="false">Suitable for adults only, no minors may view the programme</string>
- <string name="description_iltv_e" translatable="false">Exempt from classification</string>
-
- <!-- TV content rating system strings for IN TV -->
- <string name="display_name_intv" translatable="false">IN-TV</string>
- <string name="display_name_intv_u" translatable="false">U</string>
- <string name="display_name_intv_u/a" translatable="false">U/A</string>
- <string name="display_name_intv_a" translatable="false">A</string>
- <string name="display_name_intv_s" translatable="false">S</string>
- <string name="description_intv_u" translatable="false">Unrestricted public exhibition</string>
- <string name="description_intv_u/a" translatable="false">Unrestricted public exhibition, but with a caution regarding parental guidance to those under 12 years of age</string>
- <string name="description_intv_a" translatable="false">Public exhibition restricted to adults 18 years of age and older only</string>
- <string name="description_intv_s" translatable="false">Public exhibition restricted to members of any profession or any class of persons</string>
-
- <!-- TV content rating system strings for IS TV -->
- <string name="display_name_istv" translatable="false">IS-TV</string>
- <string name="display_name_istv_l" translatable="false">L</string>
- <string name="display_name_istv_7" translatable="false">7</string>
- <string name="display_name_istv_10" translatable="false">10</string>
- <string name="display_name_istv_12" translatable="false">12</string>
- <string name="display_name_istv_14" translatable="false">14</string>
- <string name="display_name_istv_16" translatable="false">16</string>
- <string name="display_name_istv_18" translatable="false">18</string>
- <string name="description_istv_l" translatable="false">Programs suitable for all ages</string>
- <string name="description_istv_7" translatable="false">Programs suitable for ages 7 and older</string>
- <string name="description_istv_10" translatable="false">Programs suitable for ages 10 and older</string>
- <string name="description_istv_12" translatable="false">Programs suitable for ages 12 and older</string>
- <string name="description_istv_14" translatable="false">Programs suitable for ages 14 and older</string>
- <string name="description_istv_16" translatable="false">Programs suitable for ages 16 and older</string>
- <string name="description_istv_18" translatable="false">Programs suitable for ages 18 and older</string>
-
- <!-- TV content rating system strings for KR TV -->
- <string name="display_name_krtv" translatable="false">KR-TV</string>
- <string name="display_name_krtv_all" translatable="false">모든연령시청가</string>
- <string name="display_name_krtv_7" translatable="false">7세이상시청가</string>
- <string name="display_name_krtv_12" translatable="false">12세이상시청가</string>
- <string name="display_name_krtv_15" translatable="false">15세이상시청가</string>
- <string name="display_name_krtv_19" translatable="false">19세이상시청가</string>
- <string name="description_krtv_all" translatable="false">Appropriate for all ages</string>
- <string name="description_krtv_7" translatable="false">May contain material inappropriate for children younger than 7, and parental discretion should be used</string>
- <string name="description_krtv_12" translatable="false">May deemed inappropriate for those younger than 12, and parental discretion should be used</string>
- <string name="description_krtv_15" translatable="false">May be inappropriate for children under 15, and that parental discretion should be used</string>
- <string name="description_krtv_19" translatable="false">For adults only</string>
-
- <!-- TV content rating system strings for MV TV -->
- <string name="display_name_mvtv" translatable="false">MV-TV</string>
- <string name="display_name_mvtv_y" translatable="false">Y</string>
- <string name="display_name_mvtv_g" translatable="false">G</string>
- <string name="display_name_mvtv_pg" translatable="false">PG</string>
- <string name="display_name_mvtv_pg-12" translatable="false">PG-12</string>
- <string name="display_name_mvtv_12" translatable="false">12+</string>
- <string name="display_name_mvtv_15" translatable="false">15+</string>
- <string name="display_name_mvtv_18" translatable="false">18+</string>
- <string name="display_name_mvtv_21" translatable="false">21+</string>
- <string name="display_name_mvtv_x" translatable="false">X</string>
- <string name="description_mvtv_y" translatable="false">Young children</string>
- <string name="description_mvtv_g" translatable="false">General viewing for all ages</string>
- <string name="description_mvtv_pg" translatable="false">Parental guidance is required unaccompanied children</string>
- <string name="description_mvtv_pg-12" translatable="false">Parental guidance is required for children under the age of 12</string>
- <string name="description_mvtv_12" translatable="false">Teens and children aged 12 and older may watch, otherwise restricted</string>
- <string name="description_mvtv_15" translatable="false">Restricted to viewers aged 15 and above</string>
- <string name="description_mvtv_18" translatable="false">Restricted to viewers aged 18 and above</string>
- <string name="description_mvtv_21" translatable="false">Restricted to viewers aged 21 and above</string>
- <string name="description_mvtv_x" translatable="false">Most restrictive classification, only adults ages 25 and above may view</string>
-
- <!-- TV content rating system strings for MX TV -->
- <string name="display_name_mxtv" translatable="false">MX-TV</string>
- <string name="display_name_mxtv_a" translatable="false">A</string>
- <string name="display_name_mxtv_b" translatable="false">B</string>
- <string name="display_name_mxtv_b-15" translatable="false">B-15</string>
- <string name="display_name_mxtv_c" translatable="false">C</string>
- <string name="display_name_mxtv_d" translatable="false">D</string>
- <string name="display_name_mxtv_rc" translatable="false">RC</string>
- <string name="description_mxtv_a" translatable="false">Appropriate for all ages, parental guidance is recommended for children under 7 years</string>
- <string name="description_mxtv_b" translatable="false">Designed for ages 12 and older, may contain some sexual situations, mild violence, and mild language</string>
- <string name="description_mxtv_b-15" translatable="false">Designed for ages 15 and up, slightly more intensive than the \'A\' and \'B\' ratings</string>
- <string name="description_mxtv_c" translatable="false">Designed to be viewed by adults aged 18 or older only, generally more intensive content </string>
- <string name="description_mxtv_d" translatable="false">Designed to be viewed only by mature adults (at least 21 years of age and over), contains extreme content matter</string>
- <string name="description_mxtv_rc" translatable="false">Banned from public television in Mexico</string>
-
- <!-- TV content rating system strings for MY TV -->
- <string name="display_name_mytv" translatable="false">MY-TV</string>
- <string name="display_name_mytv_u" translatable="false">U</string>
- <string name="display_name_mytv_p13" translatable="false">P13</string>
- <string name="display_name_mytv_18" translatable="false">18</string>
- <string name="description_mytv_u" translatable="false">General viewing for all ages, can be broadcast anytime</string>
- <string name="description_mytv_p13" translatable="false">For viewers ages 13 and above, children under 13 needs parental guidance, can be broadcast anytime, but some elements may only be broadcast at night</string>
- <string name="description_mytv_18" translatable="false">For viewers ages 18 and above only</string>
-
- <!-- TV content rating system strings for NL TV -->
- <string name="display_name_nltv" translatable="false">NICAM</string>
- <string name="display_name_nltv_v" translatable="false">Geweld</string>
- <string name="display_name_nltv_f" translatable="false">Angst</string>
- <string name="display_name_nltv_s" translatable="false">Seks</string>
- <string name="display_name_nltv_d" translatable="false">Discriminatie</string>
- <string name="display_name_nltv_da" translatable="false">Drugs- en/of alcoholmisbruik</string>
- <string name="display_name_nltv_l" translatable="false">Grof taalgebruik</string>
- <string name="display_name_nltv_al" translatable="false">Alle leeftijden</string>
- <string name="display_name_nltv_6" translatable="false">Let op met kinderen tot 6 jaar</string>
- <string name="display_name_nltv_9" translatable="false">Let op met kinderen tot 9 jaar</string>
- <string name="display_name_nltv_12" translatable="false">Let op met kinderen tot 12 jaar</string>
- <string name="display_name_nltv_16" translatable="false">Let op met kinderen tot 16 jaar</string>
- <string name="description_nltv_v" translatable="false">Violence\nApplicable to NL_TV_AL, NL_TV_6, NL_TV_9, NL_TV_12, NL_TV_16</string>
- <string name="description_nltv_f" translatable="false">Scary or Disturbing ContentViolence\nApplicable to NL_TV_AL, NL_TV_6, NL_TV_9, NL_TV_12, NL_TV_16</string>
- <string name="description_nltv_s" translatable="false">Sexual Content\nApplicable to NL_TV_AL, NL_TV_6, NL_TV_9, NL_TV_12, NL_TV_16</string>
- <string name="description_nltv_d" translatable="false">Discrimination\nApplicable to NL_TV_AL, NL_TV_6, NL_TV_9, NL_TV_12, NL_TV_16</string>
- <string name="description_nltv_da" translatable="false">Drug and/or Alcohol abuse\nApplicable to NL_TV_AL, NL_TV_6, NL_TV_9, NL_TV_12, NL_TV_16</string>
- <string name="description_nltv_l" translatable="false">Bad Language\nApplicable to NL_TV_AL, NL_TV_6, NL_TV_9, NL_TV_12, NL_TV_16</string>
- <string name="description_nltv_al" translatable="false">All Ages</string>
- <string name="description_nltv_6" translatable="false">Parental advisory for children under 6</string>
- <string name="description_nltv_9" translatable="false">Parental advisory for children under 9</string>
- <string name="description_nltv_12" translatable="false">Parental advisory for children under 12</string>
- <string name="description_nltv_16" translatable="false">Parental advisory for children under 16</string>
-
- <!-- TV content rating system strings for NZF(Free) TV -->
- <string name="display_name_nzftv" translatable="false">NZ-Free-TV</string>
- <string name="description_nzftv" translatable="false">TV content rating system for free-to-air channels in New Zealand</string>
- <string name="display_name_nzftv_g" translatable="false">G</string>
- <string name="display_name_nzftv_pgr" translatable="false">PGR</string>
- <string name="display_name_nzftv_ao" translatable="false">AO</string>
- <string name="description_nzftv_g" translatable="false">These exclude material likely to harm children under 14 and can screen at any time. Programmes may not necessarily be designed for younger viewers, but must not contain material likely to cause them undue distress or discomfort</string>
- <string name="description_nzftv_pgr" translatable="false">Programmes more suited to more mature viewers. These are not necessarily unsuitable for children, but viewer discretion is advised, and parents and guardians are encouraged to supervise younger viewers</string>
- <string name="description_nzftv_ao" translatable="false">Contain material of an adult nature handled in such a way that it is unsuitable for children</string>
-
- <!-- TV content rating system strings for NZP(Pay) TV -->
- <string name="display_name_nzptv" translatable="false">NZ-Pay-TV</string>
- <string name="description_nzptv" translatable="false">TV content rating system for Pay TV channels in New Zealand</string>
- <string name="display_name_nzptv_c" translatable="false">C</string>
- <string name="display_name_nzptv_v" translatable="false">V</string>
- <string name="display_name_nzptv_l" translatable="false">L</string>
- <string name="display_name_nzptv_s" translatable="false">S</string>
- <string name="display_name_nzptv_g" translatable="false">G</string>
- <string name="display_name_nzptv_pg" translatable="false">PG</string>
- <string name="display_name_nzptv_m" translatable="false">M</string>
- <string name="display_name_nzptv_16" translatable="false">16</string>
- <string name="display_name_nzptv_18" translatable="false">18</string>
- <string name="description_nzptv_c" translatable="false">Content may offend\nApplicable to NZ_PTV_PG, NZ_PTV_M, NZ_PTV_16, NZ_PTV_18</string>
- <string name="description_nzptv_v" translatable="false">Violence\nApplicable to NZ_PTV_PG, NZ_PTV_M, NZ_PTV_16, NZ_PTV_18</string>
- <string name="description_nzptv_l" translatable="false">Language\nApplicable to NZ_PTV_PG, NZ_PTV_M, NZ_PTV_16, NZ_PTV_18</string>
- <string name="description_nzptv_s" translatable="false">Sexual content\nApplicable to NZ_PTV_PG, NZ_PTV_M, NZ_PTV_16, NZ_PTV_18</string>
- <string name="description_nzptv_g" translatable="false">suitable for general audiences</string>
- <string name="description_nzptv_pg" translatable="false">Parental guidance recommended for under 10</string>
- <string name="description_nzptv_m" translatable="false">Suitable for mature audiences 13 and up</string>
- <string name="description_nzptv_16" translatable="false">Suitable for viewers 16 and up</string>
- <string name="description_nzptv_18" translatable="false">Suitable for viewers 18 and up</string>
-
- <!-- TV content rating system strings for PE TV -->
- <string name="display_name_petv" translatable="false">PE-TV</string>
- <string name="description_petv" translatable="false">TV content rating system for some Peruvian channels in Peru</string>
- <string name="display_name_petv_a" translatable="false">Apt</string>
- <string name="display_name_petv_14" translatable="false">14</string>
- <string name="display_name_petv_18" translatable="false">18</string>
- <string name="description_petv_a" translatable="false">Suitable for all audiences</string>
- <string name="description_petv_14" translatable="false">Suitable for people aged 14 and above only</string>
- <string name="description_petv_18" translatable="false">Suitable for people aged 18 and above only</string>
-
- <!-- TV content rating system strings for America TV in PE -->
- <string name="display_name_peatv" translatable="false">PE-ATV</string>
- <string name="description_peatv" translatable="false">TV content rating system for America Television in Peru that uses its own rating system</string>
- <string name="display_name_peatv_gp" translatable="false">GP</string>
- <string name="display_name_peatv_pg" translatable="false">PG</string>
- <string name="display_name_peatv_14" translatable="false">TV-14</string>
- <string name="display_name_peatv_18" translatable="false">TV-18</string>
- <string name="description_peatv_gp" translatable="false">General audience</string>
- <string name="description_peatv_pg" translatable="false">Parental guidance required for under 6</string>
- <string name="description_peatv_14" translatable="false">Suitable for people aged 14 and above only</string>
- <string name="description_peatv_18" translatable="false">Suitable for people aged 18 and above only</string>
-
- <!-- TV content rating system strings for PH TV -->
- <string name="display_name_phtv" translatable="false">MTRCB</string>
- <string name="display_name_phtv_g" translatable="false">G</string>
- <string name="display_name_phtv_pg" translatable="false">PG</string>
- <string name="display_name_phtv_spg" translatable="false">SPG</string>
- <string name="description_phtv_g" translatable="false">Suitable for all public viewers</string>
- <string name="description_phtv_pg" translatable="false">Programmes rated PG may contain scenes or other content that are unsuitable for children without the guidance of a parent</string>
- <string name="description_phtv_spg" translatable="false">Contains mature themes or moderate to intense violence, which may be deemed unfit for children to watch without strict parental supervision</string>
-
- <!-- TV content rating system strings for PL TV -->
- <string name="display_name_pltv" translatable="false">PL-TV</string>
- <string name="display_name_pltv_g" translatable="false">No age limit</string>
- <string name="display_name_pltv_7" translatable="false">7</string>
- <string name="display_name_pltv_12" translatable="false">12</string>
- <string name="display_name_pltv_16" translatable="false">16</string>
- <string name="display_name_pltv_18" translatable="false">18</string>
- <string name="description_pltv_g" translatable="false">Positive or neutral view of the world, little to no violence, non-sexual love, and no sexual content</string>
- <string name="description_pltv_7" translatable="false">Age 7 and above. May additionally contain some mild language, bloodless violence, and a more negative view of the world</string>
- <string name="description_pltv_12" translatable="false">Age 12 and above. May contain some foul language, some violence, and some sexual content</string>
- <string name="description_pltv_16" translatable="false">Age 16 and above. Deviant social behaviour, world filled with violence and sexuality, simplified picture of adulthood, display of physical force, especially in controversial social context, immoral behaviour without ethic dilemma, putting the blame on the victim, excessive concentration on material possessions</string>
- <string name="description_pltv_18" translatable="false">Age 18 and above. One-sided display of the joys of adult life without showing responsibilities, social justification of violent behaviour, excessive vulgarity, use of racial slurs and social stereotypes, explicit sexual content, praise of aggression or vulgarity</string>
-
- <!-- TV content rating system strings for PT TV -->
- <string name="display_name_pttv" translatable="false">PT-TV</string>
- <string name="display_name_pttv_t" translatable="false">Todos</string>
- <string name="display_name_pttv_10" translatable="false">10</string>
- <string name="display_name_pttv_12" translatable="false">12</string>
- <string name="display_name_pttv_16" translatable="false">16</string>
- <string name="description_pttv_t" translatable="false">Suitable for all</string>
- <string name="description_pttv_10" translatable="false">May not be suitable for children under 10, parental guidance advised</string>
- <string name="description_pttv_12" translatable="false">May not be suitable for children under 12, parental guidance advised</string>
- <string name="description_pttv_16" translatable="false">Not suitable for children under 16</string>
-
- <!-- TV content rating system strings for RO TV -->
- <string name="display_name_rotv" translatable="false">RO-TV</string>
- <string name="display_name_rotv_y" translatable="false">Y</string>
- <string name="display_name_rotv_g" translatable="false">G</string>
- <string name="display_name_rotv_ap" translatable="false">AP</string>
- <string name="display_name_rotv_12" translatable="false">12</string>
- <string name="display_name_rotv_15" translatable="false">15</string>
- <string name="display_name_rotv_18" translatable="false">18</string>
- <string name="description_rotv_y" translatable="false">Young Ages</string>
- <string name="description_rotv_g" translatable="false">General Exhibition</string>
- <string name="description_rotv_ap" translatable="false">Parental guidance is recommended for children below the age of 12</string>
- <string name="description_rotv_12" translatable="false">Forbidden for children under 12 years of age</string>
- <string name="description_rotv_15" translatable="false">Forbidden for children under 15 years of age</string>
- <string name="description_rotv_18" translatable="false">Forbidden for children under 18 years of age</string>
-
- <!-- TV content rating system strings for RU TV -->
- <string name="display_name_rutv" translatable="false">RU-TV</string>
- <string name="display_name_rutv_0" translatable="false">0+</string>
- <string name="display_name_rutv_6" translatable="false">6+</string>
- <string name="display_name_rutv_12" translatable="false">12+</string>
- <string name="display_name_rutv_16" translatable="false">16+</string>
- <string name="display_name_rutv_18" translatable="false">18+</string>
- <string name="description_rutv_0" translatable="false">Can be watched by Any Age</string>
- <string name="description_rutv_6" translatable="false">Only kids the age of 6 or older can watch</string>
- <string name="description_rutv_12" translatable="false">Only kids the age of 12 or older can watch</string>
- <string name="description_rutv_16" translatable="false">Only teens the age of 16 or older can watch</string>
- <string name="description_rutv_18" translatable="false">Restricted to children ONLY people 18 or older</string>
-
- <!-- TV content rating system strings for RS TV -->
- <string name="display_name_rstv" translatable="false">RS-TV</string>
- <string name="display_name_rstv_g" translatable="false">G</string>
- <string name="display_name_rstv_12" translatable="false">12</string>
- <string name="display_name_rstv_14" translatable="false">14</string>
- <string name="display_name_rstv_15" translatable="false">15</string>
- <string name="display_name_rstv_16" translatable="false">16</string>
- <string name="display_name_rstv_17" translatable="false">17</string>
- <string name="display_name_rstv_18" translatable="false">18</string>
- <string name="description_rstv_g" translatable="false">Program suitable for all ages</string>
- <string name="description_rstv_12" translatable="false">Program not suitable for children under the age of 12 </string>
- <string name="description_rstv_14" translatable="false">Program not suitable for children/teens under the age of 14</string>
- <string name="description_rstv_15" translatable="false">Program not suitable for children/teens under the age of 15</string>
- <string name="description_rstv_16" translatable="false">Program not suitable for children/teens under the age of 16</string>
- <string name="description_rstv_17" translatable="false">Program not suitable for children/teens under the age of 17</string>
- <string name="description_rstv_18" translatable="false">Program not suitable for minors under the age of 18</string>
-
- <!-- TV content rating system strings for SGF(Free-to-Air) TV -->
- <string name="display_name_sgftv" translatable="false">SG-Free-TV</string>
- <string name="display_name_sgftv_pg" translatable="false">PG</string>
- <string name="display_name_sgftv_pg13" translatable="false">PG13</string>
- <string name="description_sgftv_pg" translatable="false">Suitable for most but parents should guide their young</string>
- <string name="description_sgftv_pg13" translatable="false">Parental Guidance Strongly Cautioned - Suitable for 13 And Above</string>
-
- <!-- TV content rating system strings for SGP(Pay TV) TV -->
- <string name="display_name_sgptv" translatable="false">SG-Pay-TV</string>
- <string name="display_name_sgptv_nc16" translatable="false">NC16</string>
- <string name="display_name_sgptv_m18" translatable="false">M18</string>
- <string name="description_sgptv_nc16" translatable="false">No Children Under 16</string>
- <string name="description_sgptv_m18" translatable="false">Nobody under age 18 is admitted</string>
-
- <!-- TV content rating system strings for SI TV -->
- <string name="display_name_sitv" translatable="false">SI-TV</string>
- <string name="display_name_sitv_vs" translatable="false">VS</string>
- <string name="display_name_sitv_12" translatable="false">+12</string>
- <string name="display_name_sitv_15" translatable="false">+15</string>
- <string name="display_name_sitv_ad" translatable="false">AD</string>
- <string name="description_sitv_vs" translatable="false">Parental guidance suggested (for children under 6)</string>
- <string name="description_sitv_12" translatable="false">Content suitable for teens over 12 years</string>
- <string name="description_sitv_15" translatable="false">Content suitable for teens over 15 years</string>
- <string name="description_sitv_ad" translatable="false">Content exclusively for adults</string>
-
- <!-- TV content rating system strings for TH TV -->
- <string name="display_name_thtv" translatable="false">TH-TV</string>
- <string name="display_name_thtv_primary" translatable="false">Primary</string>
- <string name="display_name_thtv_children" translatable="false">Children</string>
- <string name="display_name_thtv_general" translatable="false">General</string>
- <string name="display_name_thtv_pg13" translatable="false">PG13</string>
- <string name="display_name_thtv_pg18" translatable="false">PG18</string>
- <string name="display_name_thtv_adults" translatable="false">Adults</string>
- <string name="description_thtv_primary" translatable="false">Content suitable for primary school aged children</string>
- <string name="description_thtv_children" translatable="false">Content suitable for children between 6-12 years old</string>
- <string name="description_thtv_general" translatable="false">Content suitable for general audiences</string>
- <string name="description_thtv_pg13" translatable="false">Content suitable for people aged 13 and above, but can be watched by those who are under the recommended age if parental guidance is provided</string>
- <string name="description_thtv_pg18" translatable="false">Content suitable for people aged above 18 years old; those who are younger that 18 must be provided with parental guidance</string>
- <string name="description_thtv_adults" translatable="false">Content unsuitable for children and youngsters</string>
-
- <!-- TV content rating system strings for TR TV -->
- <string name="display_name_trtv" translatable="false">TR-TV</string>
- <string name="display_name_trtv_g" translatable="false">Genel İzleyici</string>
- <string name="display_name_trtv_7" translatable="false">7+</string>
- <string name="display_name_trtv_13" translatable="false">13+</string>
- <string name="display_name_trtv_18" translatable="false">18+</string>
- <string name="description_trtv_g" translatable="false">General audience. Suitable for all ages</string>
- <string name="description_trtv_7" translatable="false">Suitable for ages 7 and over</string>
- <string name="description_trtv_13" translatable="false">Suitable for ages 13 and over</string>
- <string name="description_trtv_18" translatable="false">Suitable for ages 13 and over</string>
-
- <!-- TV content rating system strings for TW TV -->
- <string name="display_name_twtv" translatable="false">TW-TV</string>
- <string name="display_name_twtv_g" translatable="false">General audiences category</string>
- <string name="display_name_twtv_p" translatable="false">Protected category</string>
- <string name="display_name_twtv_pg" translatable="false">Parental guidance category</string>
- <string name="display_name_twtv_r" translatable="false">Restricted category</string>
- <string name="description_twtv_g" translatable="false">For all ages</string>
- <string name="description_twtv_p" translatable="false">Not suitable for children under 6 years old. People aged 6 but under 12 require guidance from accompanying adults to watch</string>
- <string name="description_twtv_pg" translatable="false">Not suitable for people under 12 years of age. Parental guidance is required for people aged 12 but under 18</string>
- <string name="description_twtv_r" translatable="false">For adults only and people under 18 years of age must not watch</string>
-
- <!-- TV content rating system strings for UA TV -->
- <string name="display_name_uatv" translatable="false">UA-TV</string>
- <string name="display_name_uatv_green circle" translatable="false">Green Circle</string>
- <string name="display_name_uatv_yellow triangle" translatable="false">Yellow Triangle</string>
- <string name="display_name_uatv_red square" translatable="false">Red Square</string>
- <string name="description_uatv_green circle" translatable="false">This program does not have age restrictions</string>
- <string name="description_uatv_yellow triangle" translatable="false">Children must view this program with parents. In it program there are fragments, which unsuitable for children</string>
- <string name="description_uatv_red square" translatable="false">This program is only for adult viewers. In it there are scenes with nudity, drug use, or violence</string>
-
- <!-- TV content rating system strings for US TV -->
- <string name="display_name_ustv" translatable="false">US-TV</string>
- <string name="description_ustv" translatable="false">TV content rating system for United States</string>
- <string name="display_name_ustv_d" translatable="false">D</string>
- <string name="display_name_ustv_l" translatable="false">L</string>
- <string name="display_name_ustv_s" translatable="false">S</string>
- <string name="display_name_ustv_v" translatable="false">V</string>
- <string name="display_name_ustv_fv" translatable="false">FV</string>
- <string name="display_name_ustv_y" translatable="false">TV-Y</string>
- <string name="display_name_ustv_y7" translatable="false">TV-Y7</string>
- <string name="display_name_ustv_g" translatable="false">TV-G</string>
- <string name="display_name_ustv_pg" translatable="false">TV-PG</string>
- <string name="display_name_ustv_14" translatable="false">TV-14</string>
- <string name="display_name_ustv_ma" translatable="false">TV-MA</string>
- <string name="description_ustv_d" translatable="false">Suggestive dialogue (Usually means talks about sex)\nApplicable to US_TV_PG, US_TV_14, US_TV</string>
- <string name="description_ustv_l" translatable="false">Coarse language\nApplicable to US_TV_PG, US_TV_14</string>
- <string name="description_ustv_s" translatable="false">Sexual content\nApplicable to US_TV_PG, US_TV_14, US_TV_MA</string>
- <string name="description_ustv_v" translatable="false">Violence\nApplicable to US_TV_PG, US_TV_14, US_TV_MA</string>
- <string name="description_ustv_fv" translatable="false">Fantasy violence (Children\'s programming only)\nApplicable to US_TV_Y7</string>
- <string name="description_ustv_y" translatable="false">This program is designed to be appropriate for all children</string>
- <string name="description_ustv_y7" translatable="false">This program is designed for children age 7 and above</string>
- <string name="description_ustv_g" translatable="false">Most parents would find this program suitable for all ages</string>
- <string name="description_ustv_pg" translatable="false">This program contains material that parents may find unsuitable for younger children</string>
- <string name="description_ustv_14" translatable="false">This program contains some material that many parents would find unsuitable for children under 14 years of age</string>
- <string name="description_ustv_ma" translatable="false">This program is specifically designed to be viewed by adults and therefore may be unsuitable for children under 17</string>
-
- <!-- TV content rating system strings for VE TV -->
- <string name="display_name_vetv" translatable="false">VE-TV</string>
- <string name="display_name_vetv_tu" translatable="false">TU</string>
- <string name="display_name_vetv_su" translatable="false">SU</string>
- <string name="display_name_vetv_a" translatable="false">A</string>
- <string name="description_vetv_tu" translatable="false">For all ages</string>
- <string name="description_vetv_su" translatable="false">Parental guidance for young viewers</string>
- <string name="description_vetv_a" translatable="false">Mature viewers</string>
-
- <!-- TV content rating system strings for ZA TV -->
- <string name="display_name_zatv" translatable="false">ZA-TV</string>
- <string name="display_name_zatv_d" translatable="false">D</string>
- <string name="display_name_zatv_v" translatable="false">V</string>
- <string name="display_name_zatv_n" translatable="false">N</string>
- <string name="display_name_zatv_p" translatable="false">P</string>
- <string name="display_name_zatv_s" translatable="false">S</string>
- <string name="display_name_zatv_l" translatable="false">L</string>
- <string name="display_name_zatv_f" translatable="false">Family</string>
- <string name="display_name_zatv_pg" translatable="false">PG</string>
- <string name="display_name_zatv_13" translatable="false">13</string>
- <string name="display_name_zatv_16" translatable="false">16</string>
- <string name="display_name_zatv_18" translatable="false">18</string>
- <string name="display_name_zatv_r18" translatable="false">R18</string>
- <string name="description_zatv_d" translatable="false">Drug\nApplicable to ZA_TV_F, ZA_TV_PG, ZA_TV_13, ZA_TV_16, ZA_TV_18, ZA_TV_R18</string>
- <string name="description_zatv_v" translatable="false">Violence\nApplicable to ZA_TV_F, ZA_TV_PG, ZA_TV_13, ZA_TV_16, ZA_TV_18, ZA_TV_R18</string>
- <string name="description_zatv_n" translatable="false">Nudity\nApplicable to ZA_TV_F, ZA_TV_PG, ZA_TV_13, ZA_TV_16, ZA_TV_18, ZA_TV_R18</string>
- <string name="description_zatv_p" translatable="false">Prejudice\nApplicable to ZA_TV_F, ZA_TV_PG, ZA_TV_13, ZA_TV_16, ZA_TV_18, ZA_TV_R18</string>
- <string name="description_zatv_s" translatable="false">Sex\nApplicable to ZA_TV_F, ZA_TV_PG, ZA_TV_13, ZA_TV_16, ZA_TV_18, ZA_TV_R18</string>
- <string name="description_zatv_l" translatable="false">Language\nApplicable to ZA_TV_F, ZA_TV_PG, ZA_TV_13, ZA_TV_16, ZA_TV_18, ZA_TV_R18</string>
- <string name="description_zatv_f" translatable="false">This is a program/film that does not contain any obscenity, and is suitable for family viewing. A logo must be displayed in the corner of the screen for 30 seconds after each commercial break</string>
- <string name="description_zatv_pg" translatable="false">Children under 6 may watch this program/film, but must be accompanied by an adult. This program contains an adult related theme, which might include very mild language, violence and sexual innuendo. A logo must be displayed in the corner of the screen for one minute after each commercial break</string>
- <string name="description_zatv_13" translatable="false">Children under 13 are prohibited from watching this program/film. This program contains mild language, violence and sexual innuendo. A logo must be displayed in the corner of the screen for two minutes after each commercial break</string>
- <string name="description_zatv_16" translatable="false">Children under 16 are prohibited from watching this program/film. It contains moderate violence, language, and some sexual situations. In the case of television, this program may only be broadcast after 9pm-4:30am. A logo must be displayed in the corner of the screen for five minutes after each commercial break. A full-screen warning must be issued before the start of the program. If the program is longer than an hour, a warning must be displayed every half an hour</string>
- <string name="description_zatv_18" translatable="false">Children under 18 are prohibited from watching this program/film. It contains extreme violence, language and/or graphic sexual content. In the case of television, this program may only be broadcast from 10pm-4:30am. A logo must be displayed in the corner of the screen for the duration of the program. A full-screen warning must be issued before the start of the program and after each commercial break</string>
- <string name="description_zatv_r18" translatable="false">This is reserved for films of an extreme sexual nature (pornography). R18 films may only be distributed in the form of video and DVD in a controlled environment (e.g. Adult Shops). No public viewing of this film may take place. R18 films may not be broadcast on television and in cinemas</string>
+ <string name="lock_to_app_unlock_password">Ask for password before unpinning</string>
<!-- [CHAR_LIMIT=NONE] Battery saver: Feature description -->
<string name="battery_saver_description">To help improve battery life, battery saver reduces your device’s performance and limits vibration and most background data. Email, messaging, and other apps that rely on syncing may not update unless you open them.\n\nBattery saver turns off automatically when your device is charging</string>
diff --git a/core/res/res/values/styles_material.xml b/core/res/res/values/styles_material.xml
index c8ea699..fb70d6b 100644
--- a/core/res/res/values/styles_material.xml
+++ b/core/res/res/values/styles_material.xml
@@ -413,12 +413,12 @@
<style name="TextAppearance.StatusBar.Material" />
<style name="TextAppearance.StatusBar.Material.EventContent">
- <item name="textColor">#90000000</item>
+ <item name="textColor">@color/secondary_text_material_light</item>
<item name="textSize">@dimen/notification_text_size</item>
</style>
<style name="TextAppearance.StatusBar.Material.EventContent.Title">
- <item name="textColor">#DD000000</item>
+ <item name="textColor">@color/primary_text_default_material_light</item>
<item name="textSize">@dimen/notification_title_text_size</item>
</style>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 304c81b..af73c02 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -350,7 +350,11 @@
<java-symbol type="dimen" name="notification_text_size" />
<java-symbol type="dimen" name="notification_title_text_size" />
<java-symbol type="dimen" name="notification_subtext_size" />
- <java-symbol type="dimen" name="notification_large_font_vert_pad" />
+ <java-symbol type="dimen" name="notification_top_pad" />
+ <java-symbol type="dimen" name="notification_top_pad_narrow" />
+ <java-symbol type="dimen" name="notification_top_pad_large_text" />
+ <java-symbol type="dimen" name="notification_top_pad_large_text_narrow" />
+ <java-symbol type="dimen" name="notification_large_icon_circle_padding" />
<java-symbol type="dimen" name="immersive_mode_cling_width" />
<java-symbol type="dimen" name="circular_display_mask_offset" />
@@ -622,7 +626,6 @@
<java-symbol type="id" name="lock_to_app_checkbox" />
<java-symbol type="string" name="lock_to_app_start" />
<java-symbol type="string" name="lock_to_app_exit" />
- <java-symbol type="string" name="lock_to_app_use_screen_lock" />
<java-symbol type="string" name="lock_to_app_unlock_pin" />
<java-symbol type="string" name="lock_to_app_unlock_pattern" />
<java-symbol type="string" name="lock_to_app_unlock_password" />
@@ -1266,7 +1269,6 @@
<java-symbol type="xml" name="audio_assets" />
<java-symbol type="xml" name="global_keys" />
<java-symbol type="xml" name="default_zen_mode_config" />
- <java-symbol type="xml" name="tv_content_rating_systems" />
<java-symbol type="raw" name="color_fade_vert" />
<java-symbol type="raw" name="color_fade_frag" />
@@ -1706,12 +1708,12 @@
<java-symbol type="layout" name="notification_template_material_inbox" />
<java-symbol type="layout" name="notification_template_material_media" />
<java-symbol type="layout" name="notification_template_material_big_media" />
+ <java-symbol type="layout" name="notification_template_material_big_text" />
<java-symbol type="layout" name="notification_template_icon_group" />
<java-symbol type="layout" name="notification_material_media_action" />
<java-symbol type="color" name="notification_action_legacy_color_filter" />
<java-symbol type="color" name="notification_icon_bg_color" />
<java-symbol type="drawable" name="notification_icon_legacy_bg" />
- <java-symbol type="drawable" name="notification_icon_legacy_bg_inset" />
<java-symbol type="drawable" name="notification_material_media_progress" />
<java-symbol type="color" name="notification_media_action_bg" />
<java-symbol type="color" name="notification_media_progress" />
diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml
index b36cdb9..5445816 100644
--- a/core/res/res/values/themes.xml
+++ b/core/res/res/values/themes.xml
@@ -116,12 +116,12 @@
<!-- Button styles -->
<item name="buttonStyle">@style/Widget.Button</item>
-
<item name="buttonStyleSmall">@style/Widget.Button.Small</item>
<item name="buttonStyleInset">@style/Widget.Button.Inset</item>
-
<item name="buttonStyleToggle">@style/Widget.Button.Toggle</item>
+ <item name="switchStyle">@style/Widget.CompoundButton.Switch</item>
+
<item name="selectableItemBackground">@drawable/item_background</item>
<item name="selectableItemBackgroundBorderless">?attr/selectableItemBackground</item>
<item name="borderlessButtonStyle">?attr/buttonStyle</item>
diff --git a/core/res/res/values/themes_material.xml b/core/res/res/values/themes_material.xml
index 18170ac..bff5ce2 100644
--- a/core/res/res/values/themes_material.xml
+++ b/core/res/res/values/themes_material.xml
@@ -379,6 +379,7 @@
<item name="colorControlHighlight">@color/ripple_material_dark</item>
<item name="colorButtonNormal">@color/btn_default_material_dark</item>
+ <item name="colorSwitchThumbNormal">@color/switch_thumb_material_dark</item>
</style>
<!-- Material theme (light version). -->
@@ -721,6 +722,7 @@
<item name="colorControlHighlight">@color/ripple_material_light</item>
<item name="colorButtonNormal">@color/btn_default_material_light</item>
+ <item name="colorSwitchThumbNormal">@color/switch_thumb_material_light</item>
</style>
<!-- Variant of the material (light) theme that has a solid (opaque) action bar
@@ -774,6 +776,7 @@
<item name="colorControlNormal">?attr/textColorSecondary</item>
<item name="colorControlHighlight">@color/ripple_material_light</item>
<item name="colorButtonNormal">@color/btn_default_material_light</item>
+ <item name="colorSwitchThumbNormal">@color/switch_thumb_material_light</item>
</style>
<!-- Theme overlay that replaces colors with their dark versions but preserves
@@ -811,6 +814,7 @@
<item name="colorControlNormal">?attr/textColorSecondary</item>
<item name="colorControlHighlight">@color/ripple_material_dark</item>
<item name="colorButtonNormal">@color/btn_default_material_dark</item>
+ <item name="colorSwitchThumbNormal">@color/switch_thumb_material_dark</item>
</style>
<!-- Theme overlay that replaces the normal control color, which by default is the same as the
diff --git a/core/res/res/xml/tv_content_rating_systems.xml b/core/res/res/xml/tv_content_rating_systems.xml
deleted file mode 100644
index 1318274..0000000
--- a/core/res/res/xml/tv_content_rating_systems.xml
+++ /dev/null
@@ -1,1744 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2014, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-<rating-system-definitions version="1.0">
- <!-- Range specific TV content rating system for AM TV-->
- <rating-system-definition id="AM_TV_RS"
- displayName="@string/display_name_amtvrs"
- description="@string/description_amtvrs"
- country="AM">
- <rating-definition id="AM_TV_RS_Y"
- displayName="@string/display_name_amtvrs_y"
- description="@string/description_amtvrs_y"
- ageHint="2" />
- <rating-definition id="AM_TV_RS_Y7"
- displayName="@string/display_name_amtvrs_y7"
- description="@string/description_amtvrs_y7"
- ageHint="7" />
- <rating-definition id="AM_TV_RS_GA"
- displayName="@string/display_name_amtvrs_ga"
- description="@string/description_amtvrs_ga"
- ageHint="0" />
- <rating-definition id="AM_TV_RS_TW"
- displayName="@string/display_name_amtvrs_tw"
- description="@string/description_amtvrs_tw"
- ageHint="9" />
- <rating-definition id="AM_TV_RS_T"
- displayName="@string/display_name_amtvrs_t"
- description="@string/description_amtvrs_t"
- ageHint="12" />
- <rating-definition id="AM_TV_RS_A"
- displayName="@string/display_name_amtvrs_a"
- description="@string/description_amtvrs_a"
- ageHint="18" />
- <order>
- <rating id="AM_TV_RS_Y" />
- <rating id="AM_TV_RS_Y7" />
- </order>
- <order>
- <rating id="AM_TV_RS_GA" />
- <rating id="AM_TV_RS_TW" />
- <rating id="AM_TV_RS_T" />
- <rating id="AM_TV_RS_A" />
- </order>
- </rating-system-definition>
-
- <!-- Age specific TV content rating system for AM TV-->
- <rating-system-definition id="AM_TV_AS"
- displayName="@string/display_name_amtvas"
- description="@string/description_amtvas"
- country="AM">
- <rating-definition id="AM_TV_AS_EC"
- displayName="@string/display_name_amtvas_ec"
- description="@string/description_amtvas_ec"
- ageHint="2" />
- <rating-definition id="AM_TV_AS_E"
- displayName="@string/display_name_amtvas_e"
- description="@string/description_amtvas_e"
- ageHint="5" />
- <rating-definition id="AM_TV_AS_E9"
- displayName="@string/display_name_amtvas_e9"
- description="@string/description_amtvas_e9"
- ageHint="9" />
- <rating-definition id="AM_TV_AS_T"
- displayName="@string/display_name_amtvas_t"
- description="@string/description_amtvas_t"
- ageHint="12" />
- <rating-definition id="AM_TV_AS_M"
- displayName="@string/display_name_amtvas_m"
- description="@string/description_amtvas_m"
- ageHint="16" />
- <rating-definition id="AM_TV_AS_AO"
- displayName="@string/display_name_amtvas_ao"
- description="@string/description_amtvas_ao"
- ageHint="17" />
- <order>
- <rating id="AM_TV_AS_EC" />
- <rating id="AM_TV_AS_E" />
- <rating id="AM_TV_AS_E9" />
- <rating id="AM_TV_AS_T" />
- <rating id="AM_TV_AS_M" />
- <rating id="AM_TV_AS_AO" />
- </order>
- </rating-system-definition>
-
- <!-- TV content rating system for AR TV -->
- <rating-system-definition id="AR_TV"
- displayName="@string/display_name_artv"
- country="AR">
- <rating-definition id="AR_TV_ALL"
- displayName="@string/display_name_artv_all"
- description="@string/description_artv_all"
- ageHint="0" />
- <rating-definition id="AR_TV_13"
- displayName="@string/display_name_artv_13"
- description="@string/description_artv_13"
- ageHint="13" />
- <rating-definition id="AR_TV_16"
- displayName="@string/display_name_artv_16"
- description="@string/description_artv_16"
- ageHint="16" />
- <rating-definition id="AR_TV_18"
- displayName="@string/display_name_artv_18"
- description="@string/description_artv_18"
- ageHint="18" />
- <order>
- <rating id="AR_TV_ALL" />
- <rating id="AR_TV_13" />
- <rating id="AR_TV_16" />
- <rating id="AR_TV_18" />
- </order>
- </rating-system-definition>
-
- <!-- TV content rating system for AU TV -->
- <rating-system-definition id="AU_TV"
- displayName="@string/display_name_autv"
- country="AU">
- <rating-definition id="AU_TV_CTC"
- displayName="@string/display_name_autv_ctc"
- description="@string/description_autv_ctc"
- ageHint="0" />
- <rating-definition id="AU_TV_G"
- displayName="@string/display_name_autv_g"
- description="@string/description_autv_g"
- ageHint="0" />
- <rating-definition id="AU_TV_PG"
- displayName="@string/display_name_autv_pg"
- description="@string/description_autv_pg"
- ageHint="15" />
- <rating-definition id="AU_TV_M"
- displayName="@string/display_name_autv_m"
- description="@string/description_autv_m"
- ageHint="15" />
- <rating-definition id="AU_TV_MA15"
- displayName="@string/display_name_autv_ma15"
- description="@string/description_autv_ma15"
- ageHint="15" />
- <rating-definition id="AU_TV_R18"
- displayName="@string/display_name_autv_r18"
- description="@string/description_autv_r18"
- ageHint="18" />
- <rating-definition id="AU_TV_X18"
- displayName="@string/display_name_autv_x18"
- description="@string/description_autv_x18"
- ageHint="18" />
- <order>
- <rating id="AU_TV_G" />
- <rating id="AU_TV_PG" />
- <rating id="AU_TV_M" />
- <rating id="AU_TV_MA15" />
- <rating id="AU_TV_R18" />
- <rating id="AU_TV_X18" />
- </order>
- </rating-system-definition>
-
- <!-- TV content rating system for BG TV -->
- <rating-system-definition id="BG_TV"
- displayName="@string/display_name_bgtv"
- country="BG">
- <rating-definition id="BG_TV_A"
- displayName="@string/display_name_bgtv_a"
- description="@string/description_bgtv_a"
- ageHint="0" />
- <rating-definition id="BG_TV_B"
- displayName="@string/display_name_bgtv_b"
- description="@string/description_bgtv_b"
- ageHint="0" />
- <rating-definition id="BG_TV_C"
- displayName="@string/display_name_bgtv_c"
- description="@string/description_bgtv_c"
- ageHint="12" />
- <rating-definition id="BG_TV_D"
- displayName="@string/display_name_bgtv_d"
- description="@string/description_bgtv_d"
- ageHint="16" />
- <rating-definition id="BG_TV_X"
- displayName="@string/display_name_bgtv_x"
- description="@string/description_bgtv_x"
- ageHint="18" />
- <order>
- <rating id="BG_TV_A" />
- <rating id="BG_TV_B" />
- <rating id="BG_TV_C" />
- <rating id="BG_TV_D" />
- <rating id="BG_TV_X" />
- </order>
- </rating-system-definition>
-
- <!-- TV content rating system for BR TV -->
- <rating-system-definition id="BR_TV"
- displayName="@string/display_name_brtv"
- country="BR">
- <rating-definition id="BR_TV_L"
- displayName="@string/display_name_brtv_l"
- description="@string/description_brtv_l"
- ageHint="0" />
- <rating-definition id="BR_TV_10"
- displayName="@string/display_name_brtv_10"
- description="@string/description_brtv_10"
- ageHint="10" />
- <rating-definition id="BR_TV_12"
- displayName="@string/display_name_brtv_12"
- description="@string/description_brtv_12"
- ageHint="12" />
- <rating-definition id="BR_TV_14"
- displayName="@string/display_name_brtv_14"
- description="@string/description_brtv_14"
- ageHint="14" />
- <rating-definition id="BR_TV_16"
- displayName="@string/display_name_brtv_16"
- description="@string/description_brtv_16"
- ageHint="16" />
- <rating-definition id="BR_TV_18"
- displayName="@string/display_name_brtv_18"
- description="@string/description_brtv_18"
- ageHint="18" />
- <order>
- <rating id="BR_TV_L" />
- <rating id="BR_TV_10" />
- <rating id="BR_TV_12" />
- <rating id="BR_TV_14" />
- <rating id="BR_TV_16" />
- <rating id="BR_TV_18" />
- </order>
- </rating-system-definition>
-
- <!-- TV content rating system for CA TV -->
- <rating-system-definition id="CA_TV"
- displayName="@string/display_name_catv"
- country="CA">
- <rating-definition id="CA_TV_EXEMPT"
- displayName="@string/display_name_catv_exempt"
- description="@string/description_catv_exempt"
- ageHint="0" />
- <rating-definition id="CA_TV_C"
- displayName="@string/display_name_catv_c"
- description="@string/description_catv_c"
- ageHint="0" />
- <rating-definition id="CA_TV_C8"
- displayName="@string/display_name_catv_c8"
- description="@string/description_catv_c8"
- ageHint="8" />
- <rating-definition id="CA_TV_G"
- displayName="@string/display_name_catv_g"
- description="@string/description_catv_g"
- ageHint="0" />
- <rating-definition id="CA_TV_PG"
- displayName="@string/display_name_catv_pg"
- description="@string/description_catv_pg"
- ageHint="14" />
- <rating-definition id="CA_TV_14"
- displayName="@string/display_name_catv_14"
- description="@string/description_catv_14"
- ageHint="14" />
- <rating-definition id="CA_TV_18"
- displayName="@string/display_name_catv_18"
- description="@string/description_catv_18"
- ageHint="18" />
- <order>
- <rating id="CA_TV_C" />
- <rating id="CA_TV_C8" />
- </order>
- <order>
- <rating id="CA_TV_G" />
- <rating id="CA_TV_PG" />
- <rating id="CA_TV_14" />
- <rating id="CA_TV_18" />
- </order>
- </rating-system-definition>
-
- <!-- TV content rating system for CH TV -->
- <rating-system-definition id="CH_TV"
- displayName="@string/display_name_chtv"
- country="CH">
- <rating-definition id="CH_TV_ALL"
- displayName="@string/display_name_chtv_all"
- description="@string/description_chtv_all"
- ageHint="0" />
- <rating-definition id="CH_TV_RED"
- displayName="@string/display_name_chtv_red"
- description="@string/description_chtv_red"
- ageHint="18" />
- <order>
- <rating id="CH_TV_ALL" />
- <rating id="CH_TV_RED" />
- </order>
- </rating-system-definition>
-
- <!-- TV content rating system for CL TV -->
- <rating-system-definition id="CL_TV"
- displayName="@string/display_name_cltv"
- country="CL">
- <rating-definition id="CL_TV_I"
- displayName="@string/display_name_cltv_i"
- description="@string/description_cltv_i"
- ageHint="0" />
- <rating-definition id="CL_TV_I7"
- displayName="@string/display_name_cltv_i7"
- description="@string/description_cltv_i7"
- ageHint="7" />
- <rating-definition id="CL_TV_I10"
- displayName="@string/display_name_cltv_i10"
- description="@string/description_cltv_i10"
- ageHint="10" />
- <rating-definition id="CL_TV_I12"
- displayName="@string/display_name_cltv_i12"
- description="@string/description_cltv_i12"
- ageHint="12" />
- <rating-definition id="CL_TV_F"
- displayName="@string/display_name_cltv_f"
- description="@string/description_cltv_f"
- ageHint="0" />
- <rating-definition id="CL_TV_R"
- displayName="@string/display_name_cltv_r"
- description="@string/description_cltv_r"
- ageHint="12" />
- <rating-definition id="CL_TV_A"
- displayName="@string/display_name_cltv_a"
- description="@string/description_cltv_a"
- ageHint="18" />
- <order>
- <rating id="CL_TV_I" />
- <rating id="CL_TV_I7" />
- <rating id="CL_TV_I10" />
- <rating id="CL_TV_I12" />
- </order>
- <order>
- <rating id="CL_TV_F" />
- <rating id="CL_TV_R" />
- <rating id="CL_TV_A" />
- </order>
- </rating-system-definition>
-
- <!-- TV content rating system for DE TV -->
- <rating-system-definition id="DE_TV"
- displayName="@string/display_name_detv"
- country="DE">
- <rating-definition id="DE_TV_ALL"
- displayName="@string/display_name_detv_all"
- description="@string/description_detv_all"
- ageHint="0" />
- <rating-definition id="DE_TV_12"
- displayName="@string/display_name_detv_12"
- description="@string/description_detv_12"
- ageHint="12" />
- <rating-definition id="DE_TV_16"
- displayName="@string/display_name_detv_16"
- description="@string/description_detv_16"
- ageHint="16" />
- <rating-definition id="DE_TV_18"
- displayName="@string/display_name_detv_18"
- description="@string/description_detv_18"
- ageHint="18" />
- <order>
- <rating id="DE_TV_ALL" />
- <rating id="DE_TV_12" />
- <rating id="DE_TV_16" />
- <rating id="DE_TV_18" />
- </order>
- </rating-system-definition>
-
- <!-- TV content rating system for DK TV -->
- <rating-system-definition id="DK_TV"
- displayName="@string/display_name_dktv"
- country="DK">
- <rating-definition id="DK_TV_G"
- displayName="@string/display_name_dktv_g"
- description="@string/description_dktv_g"
- ageHint="0" />
- <rating-definition id="DK_TV_Y"
- displayName="@string/display_name_dktv_y"
- description="@string/description_dktv_y"
- ageHint="13" />
- <rating-definition id="DK_TV_R"
- displayName="@string/display_name_dktv_r"
- description="@string/description_dktv_r"
- ageHint="18" />
- <rating-definition id="DK_TV_B"
- displayName="@string/display_name_dktv_b"
- description="@string/description_dktv_b"
- ageHint="18" />
- <order>
- <rating id="DK_TV_G" />
- <rating id="DK_TV_Y" />
- <rating id="DK_TV_R" />
- <rating id="DK_TV_B" />
- </order>
- </rating-system-definition>
-
- <!-- TV content rating system for ES TV -->
- <rating-system-definition id="ES_TV"
- displayName="@string/display_name_estv"
- country="ES">
- <rating-definition id="ES_TV_TP"
- displayName="@string/display_name_estv_tp"
- description="@string/description_estv_tp"
- ageHint="0" />
- <rating-definition id="ES_TV_I"
- displayName="@string/display_name_estv_i"
- description="@string/description_estv_i"
- ageHint="0" />
- <rating-definition id="ES_TV_7"
- displayName="@string/display_name_estv_7"
- description="@string/description_estv_7"
- ageHint="7" />
- <rating-definition id="ES_TV_7I"
- displayName="@string/display_name_estv_7i"
- description="@string/description_estv_7i"
- ageHint="7" />
- <rating-definition id="ES_TV_12"
- displayName="@string/display_name_estv_12"
- description="@string/description_estv_12"
- ageHint="12" />
- <rating-definition id="ES_TV_16"
- displayName="@string/display_name_estv_16"
- description="@string/description_estv_16"
- ageHint="16" />
- <rating-definition id="ES_TV_18"
- displayName="@string/display_name_estv_18"
- description="@string/description_estv_18"
- ageHint="18" />
- <order>
- <rating id="ES_TV_TP" />
- <rating id="ES_TV_I" />
- <rating id="ES_TV_7" />
- <rating id="ES_TV_7I" />
- <rating id="ES_TV_12" />
- <rating id="ES_TV_16" />
- <rating id="ES_TV_18" />
- </order>
- </rating-system-definition>
-
- <!-- TV content rating system for FI TV -->
- <rating-system-definition id="FI_TV"
- displayName="@string/display_name_fitv"
- country="FI">
- <rating-definition id="FI_TV_S"
- displayName="@string/display_name_fitv_s"
- description="@string/description_fitv_s"
- ageHint="0" />
- <rating-definition id="FI_TV_K7"
- displayName="@string/display_name_fitv_k7"
- description="@string/description_fitv_k7"
- ageHint="7" />
- <rating-definition id="FI_TV_K12"
- displayName="@string/display_name_fitv_k12"
- description="@string/description_fitv_k12"
- ageHint="12" />
- <rating-definition id="FI_TV_K16"
- displayName="@string/display_name_fitv_k16"
- description="@string/description_fitv_k16"
- ageHint="16" />
- <rating-definition id="FI_TV_K18"
- displayName="@string/display_name_fitv_k18"
- description="@string/description_fitv_k18"
- ageHint="18" />
- <order>
- <rating id="FI_TV_S" />
- <rating id="FI_TV_K7" />
- <rating id="FI_TV_K12" />
- <rating id="FI_TV_K16" />
- <rating id="FI_TV_K18" />
- </order>
- </rating-system-definition>
-
- <!-- TV content rating system for FR TV -->
- <rating-system-definition id="FR_TV"
- displayName="@string/display_name_frtv"
- country="FR">
- <rating-definition id="FR_TV_ALL"
- displayName="@string/display_name_frtv_all"
- description="@string/description_frtv_all"
- ageHint="0" />
- <rating-definition id="FR_TV_10"
- displayName="@string/display_name_frtv_10"
- description="@string/description_frtv_10"
- ageHint="10" />
- <rating-definition id="FR_TV_12"
- displayName="@string/display_name_frtv_12"
- description="@string/description_frtv_12"
- ageHint="12" />
- <rating-definition id="FR_TV_16"
- displayName="@string/display_name_frtv_16"
- description="@string/description_frtv_16"
- ageHint="16" />
- <rating-definition id="FR_TV_18"
- displayName="@string/display_name_frtv_18"
- description="@string/description_frtv_18"
- ageHint="18" />
- <order>
- <rating id="FR_TV_ALL" />
- <rating id="FR_TV_10" />
- <rating id="FR_TV_12" />
- <rating id="FR_TV_16" />
- <rating id="FR_TV_18" />
- </order>
- </rating-system-definition>
-
- <!-- TV content rating system for GR TV -->
- <rating-system-definition id="GR_TV"
- displayName="@string/display_name_grtv"
- country="GR">
- <rating-definition id="GR_TV_all"
- displayName="@string/display_name_grtv_all"
- description="@string/description_grtv_all"
- ageHint="0" />
- <rating-definition id="GR_TV_10"
- displayName="@string/display_name_grtv_10"
- description="@string/description_grtv_10"
- ageHint="10" />
- <rating-definition id="GR_TV_12"
- displayName="@string/display_name_grtv_12"
- description="@string/description_grtv_12"
- ageHint="12" />
- <rating-definition id="GR_TV_15"
- displayName="@string/display_name_grtv_15"
- description="@string/description_grtv_15"
- ageHint="15" />
- <rating-definition id="GR_TV_18"
- displayName="@string/display_name_grtv_18"
- description="@string/description_grtv_18"
- ageHint="18" />
- <order>
- <rating id="GR_TV_all" />
- <rating id="GR_TV_10" />
- <rating id="GR_TV_12" />
- <rating id="GR_TV_15" />
- <rating id="GR_TV_18" />
- </order>
- </rating-system-definition>
-
- <!-- TV content rating system for HK TV -->
- <rating-system-definition id="HK_TV"
- displayName="@string/display_name_hktv"
- country="HK">
- <rating-definition id="HK_TV_G"
- displayName="@string/display_name_hktv_g"
- description="@string/description_hktv_g"
- ageHint="0" />
- <rating-definition id="HK_TV_PG"
- displayName="@string/display_name_hktv_pg"
- description="@string/description_hktv_pg"
- ageHint="14" />
- <rating-definition id="HK_TV_M"
- displayName="@string/display_name_hktv_m"
- description="@string/description_hktv_m"
- ageHint="18" />
- <order>
- <rating id="HK_TV_G" />
- <rating id="HK_TV_PG" />
- <rating id="HK_TV_M" />
- </order>
- </rating-system-definition>
-
- <!-- TV content rating system for HU TV -->
- <rating-system-definition id="HU_TV"
- displayName="@string/display_name_hutv"
- country="HU">
- <rating-definition id="HU_TV_U"
- displayName="@string/display_name_hutv_u"
- description="@string/description_hutv_u"
- ageHint="0" />
- <rating-definition id="HU_TV_CF"
- displayName="@string/display_name_hutv_cf"
- description="@string/description_hutv_cf"
- ageHint="0" />
- <rating-definition id="HU_TV_6"
- displayName="@string/display_name_hutv_6"
- description="@string/description_hutv_6"
- ageHint="6" />
- <rating-definition id="HU_TV_12"
- displayName="@string/display_name_hutv_12"
- description="@string/description_hutv_12"
- ageHint="12" />
- <rating-definition id="HU_TV_16"
- displayName="@string/display_name_hutv_16"
- description="@string/description_hutv_16"
- ageHint="16" />
- <rating-definition id="HU_TV_18"
- displayName="@string/display_name_hutv_18"
- description="@string/description_hutv_18"
- ageHint="18" />
- <order>
- <rating id="HU_TV_U" />
- <rating id="HU_TV_CF" />
- <rating id="HU_TV_6" />
- <rating id="HU_TV_12" />
- <rating id="HU_TV_16" />
- <rating id="HU_TV_18" />
- </order>
- </rating-system-definition>
-
- <!-- TV content rating system for ID TV -->
- <rating-system-definition id="ID_TV"
- displayName="@string/display_name_idtv"
- country="ID">
- <rating-definition id="ID_TV_P"
- displayName="@string/display_name_idtv_p"
- description="@string/description_idtv_p"
- ageHint="2" />
- <rating-definition id="ID_TV_A"
- displayName="@string/display_name_idtv_a"
- description="@string/description_idtv_a"
- ageHint="7" />
- <rating-definition id="ID_TV_A_BO"
- displayName="@string/display_name_idtv_a_bo"
- description="@string/description_idtv_a_bo"
- ageHint="10" />
- <rating-definition id="ID_TV_SU"
- displayName="@string/display_name_idtv_su"
- description="@string/description_idtv_su"
- ageHint="0" />
- <rating-definition id="ID_TV_BO"
- displayName="@string/display_name_idtv_bo"
- description="@string/description_idtv_bo"
- ageHint="5" />
- <rating-definition id="ID_TV_R"
- displayName="@string/display_name_idtv_r"
- description="@string/description_idtv_r"
- ageHint="13" />
- <rating-definition id="ID_TV_R_BO"
- displayName="@string/display_name_idtv_r_bo"
- description="@string/description_idtv_r_bo"
- ageHint="18" />
- <rating-definition id="ID_TV_D"
- displayName="@string/display_name_idtv_d"
- description="@string/description_idtv_d"
- ageHint="18" />
- <order>
- <rating id="ID_TV_P" />
- <rating id="ID_TV_A" />
- <rating id="ID_TV_A_BO" />
- </order>
- <order>
- <rating id="ID_TV_SU" />
- <rating id="ID_TV_BO" />
- <rating id="ID_TV_R" />
- <rating id="ID_TV_R_BO" />
- <rating id="ID_TV_D" />
- </order>
- </rating-system-definition>
-
- <!-- TV content rating system for IE TV -->
- <rating-system-definition id="IE_TV"
- displayName="@string/display_name_ietv"
- country="IE">
- <rating-definition id="IE_TV_GA"
- displayName="@string/display_name_ietv_ga"
- description="@string/description_ietv_ga"
- ageHint="0" />
- <rating-definition id="IE_TV_Ch"
- displayName="@string/display_name_ietv_ch"
- description="@string/description_ietv_ch"
- ageHint="10" />
- <rating-definition id="IE_TV_YA"
- displayName="@string/display_name_ietv_ya"
- description="@string/description_ietv_ya"
- ageHint="13" />
- <rating-definition id="IE_TV_PS"
- displayName="@string/display_name_ietv_ps"
- description="@string/description_ietv_ps"
- ageHint="18" />
- <rating-definition id="IE_TV_MA"
- displayName="@string/display_name_ietv_ma"
- description="@string/description_ietv_ma"
- ageHint="21" />
- <order>
- <rating id="IE_TV_GA" />
- <rating id="IE_TV_Ch" />
- <rating id="IE_TV_YA" />
- <rating id="IE_TV_PS" />
- <rating id="IE_TV_MA" />
- </order>
- </rating-system-definition>
-
- <!-- TV content rating system for IL TV -->
- <rating-system-definition id="IL_TV"
- displayName="@string/display_name_iltv"
- country="IL">
- <rating-definition id="IL_TV_G"
- displayName="@string/display_name_iltv_g"
- description="@string/description_iltv_g"
- ageHint="0" />
- <rating-definition id="IL_TV_12"
- displayName="@string/display_name_iltv_12"
- description="@string/description_iltv_12"
- ageHint="12" />
- <rating-definition id="IL_TV_15"
- displayName="@string/display_name_iltv_15"
- description="@string/description_iltv_15"
- ageHint="15" />
- <rating-definition id="IL_TV_18"
- displayName="@string/display_name_iltv_18"
- description="@string/description_iltv_18"
- ageHint="18" />
- <rating-definition id="IL_TV_E"
- displayName="@string/display_name_iltv_e"
- description="@string/description_iltv_e"
- ageHint="0" />
- <order>
- <rating id="IL_TV_G" />
- <rating id="IL_TV_12" />
- <rating id="IL_TV_15" />
- <rating id="IL_TV_18" />
- <rating id="IL_TV_E" />
- </order>
- </rating-system-definition>
-
- <!-- TV content rating system for IN TV -->
- <rating-system-definition id="IN_TV"
- displayName="@string/display_name_intv"
- country="IN">
- <rating-definition id="IN_TV_U"
- displayName="@string/display_name_intv_u"
- description="@string/description_intv_u"
- ageHint="0" />
- <rating-definition id="IN_TV_U/A"
- displayName="@string/display_name_intv_u/a"
- description="@string/description_intv_u/a"
- ageHint="12" />
- <rating-definition id="IN_TV_A"
- displayName="@string/display_name_intv_a"
- description="@string/description_intv_a"
- ageHint="18" />
- <rating-definition id="IN_TV_S"
- displayName="@string/display_name_intv_s"
- description="@string/description_intv_s"
- ageHint="0" />
- <order>
- <rating id="IN_TV_U" />
- <rating id="IN_TV_U/A" />
- <rating id="IN_TV_A" />
- <rating id="IN_TV_S" />
- </order>
- </rating-system-definition>
-
- <!-- TV content rating system for IS TV -->
- <rating-system-definition id="IS_TV"
- displayName="@string/display_name_istv"
- country="IS">
- <rating-definition id="IS_TV_L"
- displayName="@string/display_name_istv_l"
- description="@string/description_istv_l"
- ageHint="0" />
- <rating-definition id="IS_TV_7"
- displayName="@string/display_name_istv_7"
- description="@string/description_istv_7"
- ageHint="7" />
- <rating-definition id="IS_TV_10"
- displayName="@string/display_name_istv_10"
- description="@string/description_istv_10"
- ageHint="10" />
- <rating-definition id="IS_TV_12"
- displayName="@string/display_name_istv_12"
- description="@string/description_istv_12"
- ageHint="12" />
- <rating-definition id="IS_TV_14"
- displayName="@string/display_name_istv_14"
- description="@string/description_istv_14"
- ageHint="14" />
- <rating-definition id="IS_TV_16"
- displayName="@string/display_name_istv_16"
- description="@string/description_istv_16"
- ageHint="16" />
- <rating-definition id="IS_TV_18"
- displayName="@string/display_name_istv_18"
- description="@string/description_istv_18"
- ageHint="18" />
- <order>
- <rating id="IS_TV_L" />
- <rating id="IS_TV_7" />
- <rating id="IS_TV_10" />
- <rating id="IS_TV_12" />
- <rating id="IS_TV_14" />
- <rating id="IS_TV_16" />
- <rating id="IS_TV_18" />
- </order>
- </rating-system-definition>
-
- <!-- TV content rating system for KR TV -->
- <rating-system-definition id="KR_TV"
- displayName="@string/display_name_krtv"
- country="KR">
- <rating-definition id="KR_TV_All"
- displayName="@string/display_name_krtv_all"
- description="@string/description_krtv_all"
- ageHint="0" />
- <rating-definition id="KR_TV_7"
- displayName="@string/display_name_krtv_7"
- description="@string/description_krtv_7"
- ageHint="7" />
- <rating-definition id="KR_TV_12"
- displayName="@string/display_name_krtv_12"
- description="@string/description_krtv_12"
- ageHint="12" />
- <rating-definition id="KR_TV_15"
- displayName="@string/display_name_krtv_15"
- description="@string/description_krtv_15"
- ageHint="15" />
- <rating-definition id="KR_TV_19"
- displayName="@string/display_name_krtv_19"
- description="@string/description_krtv_19"
- ageHint="19" />
- <order>
- <rating id="KR_TV_All" />
- <rating id="KR_TV_7" />
- <rating id="KR_TV_12" />
- <rating id="KR_TV_15" />
- <rating id="KR_TV_19" />
- </order>
- </rating-system-definition>
-
- <!-- TV content rating system for MV TV -->
- <rating-system-definition id="MV_TV"
- displayName="@string/display_name_mvtv"
- country="MV">
- <rating-definition id="MV_TV_Y"
- displayName="@string/display_name_mvtv_y"
- description="@string/description_mvtv_y"
- ageHint="0" />
- <rating-definition id="MV_TV_G"
- displayName="@string/display_name_mvtv_g"
- description="@string/description_mvtv_g"
- ageHint="0" />
- <rating-definition id="MV_TV_PG"
- displayName="@string/display_name_mvtv_pg"
- description="@string/description_mvtv_pg"
- ageHint="0" />
- <rating-definition id="MV_TV_PG-12"
- displayName="@string/display_name_mvtv_pg-12"
- description="@string/description_mvtv_pg-12"
- ageHint="12" />
- <rating-definition id="MV_TV_12"
- displayName="@string/display_name_mvtv_12"
- description="@string/description_mvtv_12"
- ageHint="12" />
- <rating-definition id="MV_TV_15"
- displayName="@string/display_name_mvtv_15"
- description="@string/description_mvtv_15"
- ageHint="15" />
- <rating-definition id="MV_TV_18"
- displayName="@string/display_name_mvtv_18"
- description="@string/description_mvtv_18"
- ageHint="18" />
- <rating-definition id="MV_TV_21"
- displayName="@string/display_name_mvtv_21"
- description="@string/description_mvtv_21"
- ageHint="21" />
- <rating-definition id="MV_TV_X"
- displayName="@string/display_name_mvtv_x"
- description="@string/description_mvtv_x"
- ageHint="25" />
- <order>
- <rating id="MV_TV_Y" />
- <rating id="MV_TV_G" />
- <rating id="MV_TV_PG" />
- <rating id="MV_TV_PG-12" />
- <rating id="MV_TV_12" />
- <rating id="MV_TV_15" />
- <rating id="MV_TV_18" />
- <rating id="MV_TV_21" />
- <rating id="MV_TV_X" />
- </order>
- </rating-system-definition>
-
- <!-- TV content rating system for MX TV -->
- <rating-system-definition id="MX_TV"
- displayName="@string/display_name_mxtv"
- country="MX">
- <rating-definition id="MX_TV_A"
- displayName="@string/display_name_mxtv_a"
- description="@string/description_mxtv_a"
- ageHint="7" />
- <rating-definition id="MX_TV_B"
- displayName="@string/display_name_mxtv_b"
- description="@string/description_mxtv_b"
- ageHint="12" />
- <rating-definition id="MX_TV_B-15"
- displayName="@string/display_name_mxtv_b-15"
- description="@string/description_mxtv_b-15"
- ageHint="15" />
- <rating-definition id="MX_TV_C"
- displayName="@string/display_name_mxtv_c"
- description="@string/description_mxtv_c"
- ageHint="18" />
- <rating-definition id="MX_TV_D"
- displayName="@string/display_name_mxtv_d"
- description="@string/description_mxtv_d"
- ageHint="21" />
- <rating-definition id="MX_TV_RC"
- displayName="@string/display_name_mxtv_rc"
- description="@string/description_mxtv_rc"
- ageHint="0" />
- <order>
- <rating id="MX_TV_A" />
- <rating id="MX_TV_B" />
- <rating id="MX_TV_B-15" />
- <rating id="MX_TV_C" />
- <rating id="MX_TV_D" />
- <rating id="MX_TV_RC" />
- </order>
- </rating-system-definition>
-
- <!-- TV content rating system for MY TV -->
- <rating-system-definition id="MY_TV"
- displayName="@string/display_name_mytv"
- country="MY">
- <rating-definition id="MY_TV_U"
- displayName="@string/display_name_mytv_u"
- description="@string/description_mytv_u"
- ageHint="0" />
- <rating-definition id="MY_TV_P13"
- displayName="@string/display_name_mytv_p13"
- description="@string/description_mytv_p13"
- ageHint="13" />
- <rating-definition id="MY_TV_18"
- displayName="@string/display_name_mytv_18"
- description="@string/description_mytv_18"
- ageHint="18" />
- <order>
- <rating id="MY_TV_U" />
- <rating id="MY_TV_P13" />
- <rating id="MY_TV_18" />
- </order>
- </rating-system-definition>
-
- <!-- TV content rating system for NL TV -->
- <rating-system-definition id="NL_TV"
- displayName="@string/display_name_nltv"
- country="NL">
- <sub-rating-definition id="NL_TV_V"
- displayName="@string/display_name_nltv_v"
- description="@string/description_nltv_v" />
- <sub-rating-definition id="NL_TV_F"
- displayName="@string/display_name_nltv_f"
- description="@string/description_nltv_f" />
- <sub-rating-definition id="NL_TV_S"
- displayName="@string/display_name_nltv_s"
- description="@string/description_nltv_s" />
- <sub-rating-definition id="NL_TV_D"
- displayName="@string/display_name_nltv_d"
- description="@string/description_nltv_d" />
- <sub-rating-definition id="NL_TV_DA"
- displayName="@string/display_name_nltv_da"
- description="@string/description_nltv_da" />
- <sub-rating-definition id="NL_TV_L"
- displayName="@string/display_name_nltv_l"
- description="@string/description_nltv_l" />
-
- <rating-definition id="NL_TV_AL"
- displayName="@string/display_name_nltv_al"
- description="@string/description_nltv_al"
- ageHint="0">
- <sub-rating id="NL_TV_V" />
- <sub-rating id="NL_TV_F" />
- <sub-rating id="NL_TV_S" />
- <sub-rating id="NL_TV_D" />
- <sub-rating id="NL_TV_DA" />
- <sub-rating id="NL_TV_L" />
- </rating-definition>
- <rating-definition id="NL_TV_6"
- displayName="@string/display_name_nltv_6"
- description="@string/description_nltv_6"
- ageHint="6">
- <sub-rating id="NL_TV_V" />
- <sub-rating id="NL_TV_F" />
- <sub-rating id="NL_TV_S" />
- <sub-rating id="NL_TV_D" />
- <sub-rating id="NL_TV_DA" />
- <sub-rating id="NL_TV_L" />
- </rating-definition>
- <rating-definition id="NL_TV_9"
- displayName="@string/display_name_nltv_9"
- description="@string/description_nltv_9"
- ageHint="9">
- <sub-rating id="NL_TV_V" />
- <sub-rating id="NL_TV_F" />
- <sub-rating id="NL_TV_S" />
- <sub-rating id="NL_TV_D" />
- <sub-rating id="NL_TV_DA" />
- <sub-rating id="NL_TV_L" />
- </rating-definition>
- <rating-definition id="NL_TV_12"
- displayName="@string/display_name_nltv_12"
- description="@string/description_nltv_12"
- ageHint="12">
- <sub-rating id="NL_TV_V" />
- <sub-rating id="NL_TV_F" />
- <sub-rating id="NL_TV_S" />
- <sub-rating id="NL_TV_D" />
- <sub-rating id="NL_TV_DA" />
- <sub-rating id="NL_TV_L" />
- </rating-definition>
- <rating-definition id="NL_TV_16"
- displayName="@string/display_name_nltv_16"
- description="@string/description_nltv_16"
- ageHint="16">
- <sub-rating id="NL_TV_V" />
- <sub-rating id="NL_TV_F" />
- <sub-rating id="NL_TV_S" />
- <sub-rating id="NL_TV_D" />
- <sub-rating id="NL_TV_DA" />
- <sub-rating id="NL_TV_L" />
- </rating-definition>
- <order>
- <rating id="NL_TV_AL" />
- <rating id="NL_TV_6" />
- <rating id="NL_TV_9" />
- <rating id="NL_TV_12" />
- <rating id="NL_TV_16" />
- </order>
- </rating-system-definition>
-
- <!-- TV content rating system for NZ Free-to-Air TV -->
- <rating-system-definition id="NZ_FTV"
- displayName="@string/display_name_nzftv"
- description="@string/description_nzftv"
- country="NZ">
- <rating-definition id="NZ_FTV_G"
- displayName="@string/display_name_nzftv_g"
- description="@string/description_nzftv_g"
- ageHint="0" />
- <rating-definition id="NZ_FTV_PGR"
- displayName="@string/display_name_nzftv_pgr"
- description="@string/description_nzftv_pgr"
- ageHint="14" />
- <rating-definition id="NZ_FTV_AO"
- displayName="@string/display_name_nzftv_ao"
- description="@string/description_nzftv_ao"
- ageHint="18" />
- <order>
- <rating id="NZ_FTV_G" />
- <rating id="NZ_FTV_PGR" />
- <rating id="NZ_FTV_AO" />
- </order>
- </rating-system-definition>
-
- <!-- TV content rating system for NZ Pay Television -->
- <rating-system-definition id="NZ_PTV"
- displayName="@string/display_name_nzptv"
- description="@string/description_nzptv"
- country="NZ">
- <sub-rating-definition id="NZ_PTV_C"
- displayName="@string/display_name_nzptv_c"
- description="@string/description_nzptv_c" />
- <sub-rating-definition id="NZ_PTV_V"
- displayName="@string/display_name_nzptv_v"
- description="@string/description_nzptv_v" />
- <sub-rating-definition id="NZ_PTV_L"
- displayName="@string/display_name_nzptv_l"
- description="@string/description_nzptv_l" />
- <sub-rating-definition id="NZ_PTV_S"
- displayName="@string/display_name_nzptv_s"
- description="@string/description_nzptv_s" />
- <rating-definition id="NZ_PTV_G"
- displayName="@string/display_name_nzptv_g"
- description="@string/description_nzptv_g"
- ageHint="0" />
- <rating-definition id="NZ_PTV_PG"
- displayName="@string/display_name_nzptv_pg"
- description="@string/description_nzptv_pg"
- ageHint="10">
- <sub-rating id="NZ_PTV_C" />
- <sub-rating id="NZ_PTV_V" />
- <sub-rating id="NZ_PTV_L" />
- <sub-rating id="NZ_PTV_S" />
- </rating-definition>
- <rating-definition id="NZ_PTV_M"
- displayName="@string/display_name_nzptv_m"
- description="@string/description_nzptv_m"
- ageHint="13">
- <sub-rating id="NZ_PTV_C" />
- <sub-rating id="NZ_PTV_V" />
- <sub-rating id="NZ_PTV_L" />
- <sub-rating id="NZ_PTV_S" />
- </rating-definition>
- <rating-definition id="NZ_PTV_16"
- displayName="@string/display_name_nzptv_16"
- description="@string/description_nzptv_16"
- ageHint="16">
- <sub-rating id="NZ_PTV_C" />
- <sub-rating id="NZ_PTV_V" />
- <sub-rating id="NZ_PTV_L" />
- <sub-rating id="NZ_PTV_S" />
- </rating-definition>
- <rating-definition id="NZ_PTV_18"
- displayName="@string/display_name_nzptv_18"
- description="@string/description_nzptv_18"
- ageHint="18">
- <sub-rating id="NZ_PTV_C" />
- <sub-rating id="NZ_PTV_V" />
- <sub-rating id="NZ_PTV_L" />
- <sub-rating id="NZ_PTV_S" />
- </rating-definition>
- <order>
- <rating id="NZ_PTV_G" />
- <rating id="NZ_PTV_PG" />
- <rating id="NZ_PTV_M" />
- <rating id="NZ_PTV_16" />
- <rating id="NZ_PTV_18" />
- </order>
- </rating-system-definition>
-
- <!-- TV content rating system for PE TV -->
- <rating-system-definition id="PE_TV"
- displayName="@string/display_name_petv"
- description="@string/description_petv"
- country="PE">
- <rating-definition id="PE_TV_A"
- displayName="@string/display_name_petv_a"
- description="@string/description_petv_a"
- ageHint="0" />
- <rating-definition id="PE_TV_14"
- displayName="@string/display_name_petv_14"
- description="@string/description_petv_14"
- ageHint="14" />
- <rating-definition id="PE_TV_18"
- displayName="@string/display_name_petv_18"
- description="@string/description_petv_18"
- ageHint="18" />
- <order>
- <rating id="PE_TV_A" />
- <rating id="PE_TV_14" />
- <rating id="PE_TV_18" />
- </order>
- </rating-system-definition>
-
- <rating-system-definition id="PE_ATV"
- displayName="@string/display_name_peatv"
- description="@string/description_peatv"
- country="PE">
- <rating-definition id="PE_ATV_GP"
- displayName="@string/display_name_peatv_gp"
- description="@string/description_peatv_gp"
- ageHint="0" />
- <rating-definition id="PE_ATV_PG"
- displayName="@string/display_name_peatv_pg"
- description="@string/description_peatv_pg"
- ageHint="6" />
- <rating-definition id="PE_ATV_14"
- displayName="@string/display_name_peatv_14"
- description="@string/description_peatv_14"
- ageHint="14" />
- <rating-definition id="PE_ATV_18"
- displayName="@string/display_name_peatv_18"
- description="@string/description_peatv_18"
- ageHint="18" />
- <order>
- <rating id="PE_ATV_GP" />
- <rating id="PE_ATV_PG" />
- <rating id="PE_ATV_14" />
- <rating id="PE_ATV_18" />
- </order>
- </rating-system-definition>
-
- <!-- TV content rating system for PH TV -->
- <rating-system-definition id="PH_TV"
- displayName="@string/display_name_phtv"
- country="PH">
- <rating-definition id="PH_TV_G"
- displayName="@string/display_name_phtv_g"
- description="@string/description_phtv_g"
- ageHint="0" />
- <rating-definition id="PH_TV_PG"
- displayName="@string/display_name_phtv_pg"
- description="@string/description_phtv_pg"
- ageHint="14" />
- <rating-definition id="PH_TV_SPG"
- displayName="@string/display_name_phtv_spg"
- description="@string/description_phtv_spg"
- ageHint="18" />
- <order>
- <rating id="PH_TV_G" />
- <rating id="PH_TV_PG" />
- <rating id="PH_TV_SPG" />
- </order>
- </rating-system-definition>
-
- <!-- TV content rating system for PL TV -->
- <rating-system-definition id="PL_TV"
- displayName="@string/display_name_pltv"
- country="PL">
- <rating-definition id="PL_TV_G"
- displayName="@string/display_name_pltv_g"
- description="@string/description_pltv_g"
- ageHint="0" />
- <rating-definition id="PL_TV_7"
- displayName="@string/display_name_pltv_7"
- description="@string/description_pltv_7"
- ageHint="7" />
- <rating-definition id="PL_TV_12"
- displayName="@string/display_name_pltv_12"
- description="@string/description_pltv_12"
- ageHint="12" />
- <rating-definition id="PL_TV_16"
- displayName="@string/display_name_pltv_16"
- description="@string/description_pltv_16"
- ageHint="16" />
- <rating-definition id="PL_TV_18"
- displayName="@string/display_name_pltv_18"
- description="@string/description_pltv_18"
- ageHint="18" />
- <order>
- <rating id="PL_TV_G" />
- <rating id="PL_TV_7" />
- <rating id="PL_TV_12" />
- <rating id="PL_TV_16" />
- <rating id="PL_TV_18" />
- </order>
- </rating-system-definition>
-
- <!-- TV content rating system for PT TV -->
- <rating-system-definition id="PT_TV"
- displayName="@string/display_name_pttv"
- country="PT">
- <rating-definition id="PT_TV_T"
- displayName="@string/display_name_pttv_t"
- description="@string/description_pttv_t"
- ageHint="0" />
- <rating-definition id="PT_TV_10"
- displayName="@string/display_name_pttv_10"
- description="@string/description_pttv_10"
- ageHint="10" />
- <rating-definition id="PT_TV_12"
- displayName="@string/display_name_pttv_12"
- description="@string/description_pttv_12"
- ageHint="12" />
- <rating-definition id="PT_TV_16"
- displayName="@string/display_name_pttv_16"
- description="@string/description_pttv_16"
- ageHint="16" />
- <order>
- <rating id="PT_TV_T" />
- <rating id="PT_TV_10" />
- <rating id="PT_TV_12" />
- <rating id="PT_TV_16" />
- </order>
- </rating-system-definition>
-
- <!-- TV content rating system for RO TV -->
- <rating-system-definition id="RO_TV"
- displayName="@string/display_name_rotv"
- country="RO">
- <rating-definition id="RO_TV_Y"
- displayName="@string/display_name_rotv_y"
- description="@string/description_rotv_y"
- ageHint="0" />
- <rating-definition id="RO_TV_G"
- displayName="@string/display_name_rotv_g"
- description="@string/description_rotv_g"
- ageHint="0" />
- <rating-definition id="RO_TV_AP"
- displayName="@string/display_name_rotv_ap"
- description="@string/description_rotv_ap"
- ageHint="12" />
- <rating-definition id="RO_TV_12"
- displayName="@string/display_name_rotv_12"
- description="@string/description_rotv_12"
- ageHint="12" />
- <rating-definition id="RO_TV_15"
- displayName="@string/display_name_rotv_15"
- description="@string/description_rotv_15"
- ageHint="15" />
- <rating-definition id="RO_TV_18"
- displayName="@string/display_name_rotv_18"
- description="@string/description_rotv_18"
- ageHint="18" />
- <order>
- <rating id="RO_TV_Y" />
- <rating id="RO_TV_G" />
- <rating id="RO_TV_AP" />
- <rating id="RO_TV_12" />
- <rating id="RO_TV_15" />
- <rating id="RO_TV_18" />
- </order>
- </rating-system-definition>
-
- <!-- TV content rating system for RU TV -->
- <rating-system-definition id="RU_TV"
- displayName="@string/display_name_rutv"
- country="RU">
- <rating-definition id="RU_TV_0"
- displayName="@string/display_name_rutv_0"
- description="@string/description_rutv_0"
- ageHint="0" />
- <rating-definition id="RU_TV_6"
- displayName="@string/display_name_rutv_6"
- description="@string/description_rutv_6"
- ageHint="6" />
- <rating-definition id="RU_TV_12"
- displayName="@string/display_name_rutv_12"
- description="@string/description_rutv_12"
- ageHint="12" />
- <rating-definition id="RU_TV_16"
- displayName="@string/display_name_rutv_16"
- description="@string/description_rutv_16"
- ageHint="16" />
- <rating-definition id="RU_TV_18"
- displayName="@string/display_name_rutv_18"
- description="@string/description_rutv_18"
- ageHint="18" />
- <order>
- <rating id="RU_TV_0" />
- <rating id="RU_TV_6" />
- <rating id="RU_TV_12" />
- <rating id="RU_TV_16" />
- <rating id="RU_TV_18" />
- </order>
- </rating-system-definition>
-
- <!-- TV content rating system for RS TV -->
- <rating-system-definition id="RS_TV"
- displayName="@string/display_name_rstv"
- country="RS">
- <rating-definition id="RS_TV_G"
- displayName="@string/display_name_rstv_g"
- description="@string/description_rstv_g"
- ageHint="0" />
- <rating-definition id="RS_TV_12"
- displayName="@string/display_name_rstv_12"
- description="@string/description_rstv_12"
- ageHint="12" />
- <rating-definition id="RS_TV_14"
- displayName="@string/display_name_rstv_14"
- description="@string/description_rstv_14"
- ageHint="14" />
- <rating-definition id="RS_TV_15"
- displayName="@string/display_name_rstv_15"
- description="@string/description_rstv_15"
- ageHint="15" />
- <rating-definition id="RS_TV_16"
- displayName="@string/display_name_rstv_16"
- description="@string/description_rstv_16"
- ageHint="16" />
- <rating-definition id="RS_TV_17"
- displayName="@string/display_name_rstv_17"
- description="@string/description_rstv_17"
- ageHint="17" />
- <rating-definition id="RS_TV_18"
- displayName="@string/display_name_rstv_18"
- description="@string/description_rstv_18"
- ageHint="18" />
- <order>
- <rating id="RS_TV_G" />
- <rating id="RS_TV_12" />
- <rating id="RS_TV_14" />
- <rating id="RS_TV_15" />
- <rating id="RS_TV_16" />
- <rating id="RS_TV_17" />
- <rating id="RS_TV_18" />
- </order>
- </rating-system-definition>
-
- <!-- TV content rating system for SG Free-to-Air TV -->
- <rating-system-definition id="SG_FTV"
- displayName="@string/display_name_sgftv"
- country="SG">
- <rating-definition id="SG_FTV_PG"
- displayName="@string/display_name_sgftv_pg"
- description="@string/description_sgftv_pg"
- ageHint="0" />
- <rating-definition id="SG_FTV_PG13"
- displayName="@string/display_name_sgftv_pg13"
- description="@string/description_sgftv_pg13"
- ageHint="13" />
- <order>
- <rating id="SG_FTV_PG" />
- <rating id="SG_FTV_PG13" />
- </order>
- </rating-system-definition>
-
- <!-- TV content rating system for SG Pay TV -->
- <rating-system-definition id="SG_PTV"
- displayName="@string/display_name_sgptv"
- country="SG">
- <rating-definition id="SG_PTV_NC16"
- displayName="@string/display_name_sgptv_nc16"
- description="@string/description_sgptv_nc16"
- ageHint="16" />
- <rating-definition id="SG_PTV_M18"
- displayName="@string/display_name_sgptv_m18"
- description="@string/description_sgptv_m18"
- ageHint="18" />
- <order>
- <rating id="SG_PTV_NC16" />
- <rating id="SG_PTV_M18" />
- </order>
- </rating-system-definition>
-
- <!-- TV content rating system for SI TV -->
- <rating-system-definition id="SI_TV"
- displayName="@string/display_name_sitv"
- country="SI">
- <rating-definition id="SI_TV_VS"
- displayName="@string/display_name_sitv_vs"
- description="@string/description_sitv_vs"
- ageHint="6" />
- <rating-definition id="SI_TV_12"
- displayName="@string/display_name_sitv_12"
- description="@string/description_sitv_12"
- ageHint="12" />
- <rating-definition id="SI_TV_15"
- displayName="@string/display_name_sitv_15"
- description="@string/description_sitv_15"
- ageHint="15" />
- <rating-definition id="SI_TV_AD"
- displayName="@string/display_name_sitv_ad"
- description="@string/description_sitv_ad"
- ageHint="0" />
- <order>
- <rating id="SI_TV_VS" />
- <rating id="SI_TV_12" />
- <rating id="SI_TV_15" />
- <rating id="SI_TV_AD" />
- </order>
- </rating-system-definition>
-
- <!-- TV content rating system for TH TV -->
- <rating-system-definition id="TH_TV"
- displayName="@string/display_name_thtv"
- country="TH">
- <rating-definition id="TH_TV_P"
- displayName="@string/display_name_thtv_primary"
- description="@string/description_thtv_primary"
- ageHint="0" />
- <rating-definition id="TH_TV_C"
- displayName="@string/display_name_thtv_children"
- description="@string/description_thtv_children"
- ageHint="6" />
- <rating-definition id="TH_TV_G"
- displayName="@string/display_name_thtv_general"
- description="@string/description_thtv_general"
- ageHint="0" />
- <rating-definition id="TH_TV_PG13"
- displayName="@string/display_name_thtv_pg13"
- description="@string/description_thtv_pg13"
- ageHint="13" />
- <rating-definition id="TH_TV_PG18"
- displayName="@string/display_name_thtv_pg18"
- description="@string/description_thtv_pg18"
- ageHint="18" />
- <rating-definition id="TH_TV_A"
- displayName="@string/display_name_thtv_adults"
- description="@string/description_thtv_adults"
- ageHint="18" />
- <order>
- <rating id="TH_TV_P" />
- <rating id="TH_TV_C" />
- </order>
- <order>
- <rating id="TH_TV_G" />
- <rating id="TH_TV_PG13" />
- <rating id="TH_TV_PG18" />
- <rating id="TH_TV_A" />
- </order>
- </rating-system-definition>
-
- <!-- TV content rating system for TR TV -->
- <rating-system-definition id="TR_TV"
- displayName="@string/display_name_trtv"
- country="TR">
- <rating-definition id="TR_TV_G"
- displayName="@string/display_name_trtv_g"
- description="@string/description_trtv_g"
- ageHint="0" />
- <rating-definition id="TR_TV_7"
- displayName="@string/display_name_trtv_7"
- description="@string/description_trtv_7"
- ageHint="7" />
- <rating-definition id="TR_TV_13"
- displayName="@string/display_name_trtv_13"
- description="@string/description_trtv_13"
- ageHint="13" />
- <rating-definition id="TR_TV_18"
- displayName="@string/display_name_trtv_18"
- description="@string/description_trtv_18"
- ageHint="18" />
- <order>
- <rating id="TR_TV_G" />
- <rating id="TR_TV_7" />
- <rating id="TR_TV_13" />
- <rating id="TR_TV_18" />
- </order>
- </rating-system-definition>
-
- <!-- TV content rating system for TW TV -->
- <rating-system-definition id="TW_TV"
- displayName="@string/display_name_twtv"
- country="TW">
- <rating-definition id="TW_TV_G"
- displayName="@string/display_name_twtv_g"
- description="@string/description_twtv_g"
- ageHint="0" />
- <rating-definition id="TW_TV_P"
- displayName="@string/display_name_twtv_p"
- description="@string/description_twtv_p"
- ageHint="6" />
- <rating-definition id="TW_TV_PG"
- displayName="@string/display_name_twtv_pg"
- description="@string/description_twtv_pg"
- ageHint="12" />
- <rating-definition id="TW_TV_R"
- displayName="@string/display_name_twtv_r"
- description="@string/description_twtv_r"
- ageHint="18" />
- <order>
- <rating id="TW_TV_G" />
- <rating id="TW_TV_P" />
- <rating id="TW_TV_PG" />
- <rating id="TW_TV_R" />
- </order>
- </rating-system-definition>
-
- <!-- TV content rating system for UA TV -->
- <rating-system-definition id="UA_TV"
- displayName="@string/display_name_uatv"
- country="UA">
- <rating-definition id="UA_TV_G"
- displayName="@string/display_name_uatv_green circle"
- description="@string/description_uatv_green circle"
- ageHint="0" />
- <rating-definition id="UA_TV_Y"
- displayName="@string/display_name_uatv_yellow triangle"
- description="@string/description_uatv_yellow triangle"
- ageHint="12" />
- <rating-definition id="UA_TV_R"
- displayName="@string/display_name_uatv_red square"
- description="@string/description_uatv_red square"
- ageHint="18" />
- <order>
- <rating id="UA_TV_G" />
- <rating id="UA_TV_Y" />
- <rating id="UA_TV_R" />
- </order>
- </rating-system-definition>
-
- <!-- TV content rating system for US TV -->
- <rating-system-definition id="US_TV"
- displayName="@string/display_name_ustv"
- description="@string/description_ustv"
- country="US">
- <sub-rating-definition id="US_TV_D"
- displayName="@string/display_name_ustv_d"
- description="@string/description_ustv_d" />
- <sub-rating-definition id="US_TV_L"
- displayName="@string/display_name_ustv_l"
- description="@string/description_ustv_l" />
- <sub-rating-definition id="US_TV_S"
- displayName="@string/display_name_ustv_s"
- description="@string/description_ustv_s" />
- <sub-rating-definition id="US_TV_V"
- displayName="@string/display_name_ustv_v"
- description="@string/description_ustv_v" />
- <sub-rating-definition id="US_TV_FV"
- displayName="@string/display_name_ustv_fv"
- description="@string/description_ustv_fv" />
-
- <rating-definition id="US_TV_Y"
- displayName="@string/display_name_ustv_y"
- description="@string/description_ustv_y"
- ageHint="0" />
- <rating-definition id="US_TV_Y7"
- displayName="@string/display_name_ustv_y7"
- description="@string/description_ustv_y7"
- ageHint="7">
- <sub-rating id="US_TV_FV" />
- </rating-definition>
- <rating-definition id="US_TV_G"
- displayName="@string/display_name_ustv_g"
- description="@string/description_ustv_g"
- ageHint="0" />
- <rating-definition id="US_TV_PG"
- displayName="@string/display_name_ustv_pg"
- description="@string/description_ustv_pg"
- ageHint="14">
- <sub-rating id="US_TV_D" />
- <sub-rating id="US_TV_L" />
- <sub-rating id="US_TV_S" />
- <sub-rating id="US_TV_V" />
- </rating-definition>
- <rating-definition id="US_TV_14"
- displayName="@string/display_name_ustv_14"
- description="@string/description_ustv_14"
- ageHint="14">
- <sub-rating id="US_TV_D" />
- <sub-rating id="US_TV_L" />
- <sub-rating id="US_TV_S" />
- <sub-rating id="US_TV_V" />
- </rating-definition>
- <rating-definition id="US_TV_MA"
- displayName="@string/display_name_ustv_ma"
- description="@string/description_ustv_ma"
- ageHint="17">
- <sub-rating id="US_TV_L" />
- <sub-rating id="US_TV_S" />
- <sub-rating id="US_TV_V" />
- </rating-definition>
- <order>
- <rating id="US_TV_Y" />
- <rating id="US_TV_Y7" />
- </order>
- <order>
- <rating id="US_TV_G" />
- <rating id="US_TV_PG" />
- <rating id="US_TV_14" />
- <rating id="US_TV_MA" />
- </order>
- </rating-system-definition>
-
- <!-- TV content rating system for VE TV -->
- <rating-system-definition id="VE_TV"
- displayName="@string/display_name_vetv"
- country="VE">
- <rating-definition id="VE_TV_TU"
- displayName="@string/display_name_vetv_tu"
- description="@string/description_vetv_tu"
- ageHint="0" />
- <rating-definition id="VE_TV_SU"
- displayName="@string/display_name_vetv_su"
- description="@string/description_vetv_su"
- ageHint="15" />
- <rating-definition id="VE_TV_A"
- displayName="@string/display_name_vetv_a"
- description="@string/description_vetv_a"
- ageHint="18" />
- <order>
- <rating id="VE_TV_TU" />
- <rating id="VE_TV_SU" />
- <rating id="VE_TV_A" />
- </order>
- </rating-system-definition>
-
- <!-- TV content rating system for ZA TV -->
- <rating-system-definition id="ZA_TV"
- displayName="@string/display_name_zatv"
- country="ZA">
- <sub-rating-definition id="ZA_TV_D"
- displayName="@string/display_name_zatv_d"
- description="@string/description_zatv_d" />
- <sub-rating-definition id="ZA_TV_V"
- displayName="@string/display_name_zatv_v"
- description="@string/description_zatv_v" />
- <sub-rating-definition id="ZA_TV_N"
- displayName="@string/display_name_zatv_n"
- description="@string/description_zatv_n" />
- <sub-rating-definition id="ZA_TV_P"
- displayName="@string/display_name_zatv_p"
- description="@string/description_zatv_p" />
- <sub-rating-definition id="ZA_TV_S"
- displayName="@string/display_name_zatv_s"
- description="@string/description_zatv_s" />
- <sub-rating-definition id="ZA_TV_L"
- displayName="@string/display_name_zatv_l"
- description="@string/description_zatv_l" />
- <rating-definition id="ZA_TV_F"
- displayName="@string/display_name_zatv_f"
- description="@string/description_zatv_f"
- ageHint="0">
- <sub-rating id="ZA_TV_D" />
- <sub-rating id="ZA_TV_V" />
- <sub-rating id="ZA_TV_N" />
- <sub-rating id="ZA_TV_P" />
- <sub-rating id="ZA_TV_S" />
- <sub-rating id="ZA_TV_L" />
- </rating-definition>
- <rating-definition id="ZA_TV_PG"
- displayName="@string/display_name_zatv_pg"
- description="@string/description_zatv_pg"
- ageHint="0">
- <sub-rating id="ZA_TV_D" />
- <sub-rating id="ZA_TV_V" />
- <sub-rating id="ZA_TV_N" />
- <sub-rating id="ZA_TV_P" />
- <sub-rating id="ZA_TV_S" />
- <sub-rating id="ZA_TV_L" />
- </rating-definition>
- <rating-definition id="ZA_TV_13"
- displayName="@string/display_name_zatv_13"
- description="@string/description_zatv_13"
- ageHint="13">
- <sub-rating id="ZA_TV_D" />
- <sub-rating id="ZA_TV_V" />
- <sub-rating id="ZA_TV_N" />
- <sub-rating id="ZA_TV_P" />
- <sub-rating id="ZA_TV_S" />
- <sub-rating id="ZA_TV_L" />
- </rating-definition>
- <rating-definition id="ZA_TV_16"
- displayName="@string/display_name_zatv_16"
- description="@string/description_zatv_16"
- ageHint="16">
- <sub-rating id="ZA_TV_D" />
- <sub-rating id="ZA_TV_V" />
- <sub-rating id="ZA_TV_N" />
- <sub-rating id="ZA_TV_P" />
- <sub-rating id="ZA_TV_S" />
- <sub-rating id="ZA_TV_L" />
- </rating-definition>
- <rating-definition id="ZA_TV_18"
- displayName="@string/display_name_zatv_18"
- description="@string/description_zatv_18"
- ageHint="18">
- <sub-rating id="ZA_TV_D" />
- <sub-rating id="ZA_TV_V" />
- <sub-rating id="ZA_TV_N" />
- <sub-rating id="ZA_TV_P" />
- <sub-rating id="ZA_TV_S" />
- <sub-rating id="ZA_TV_L" />
- </rating-definition>
- <rating-definition id="ZA_TV_R18"
- displayName="@string/display_name_zatv_r18"
- description="@string/description_zatv_r18"
- ageHint="18">
- <sub-rating id="ZA_TV_D" />
- <sub-rating id="ZA_TV_V" />
- <sub-rating id="ZA_TV_N" />
- <sub-rating id="ZA_TV_P" />
- <sub-rating id="ZA_TV_S" />
- <sub-rating id="ZA_TV_L" />
- </rating-definition>
- <order>
- <rating id="ZA_TV_F" />
- <rating id="ZA_TV_PG" />
- <rating id="ZA_TV_13" />
- <rating id="ZA_TV_16" />
- <rating id="ZA_TV_18" />
- <rating id="ZA_TV_R18" />
- </order>
- </rating-system-definition>
-</rating-system-definitions>
diff --git a/docs/html/guide/components/intents-common.jd b/docs/html/guide/components/intents-common.jd
index 3b52b0a..af9456d 100644
--- a/docs/html/guide/components/intents-common.jd
+++ b/docs/html/guide/components/intents-common.jd
@@ -1678,7 +1678,7 @@
<p><b>Example intent:</b></p>
<pre>
public void composeMmsMessage(String message, Uri attachment) {
- Intent intent = new Intent(Intent.ACTION_SEND);
+ Intent intent = new Intent(Intent.ACTION_SENDTO);
intent.setType(HTTP.PLAIN_TEXT_TYPE);
intent.putExtra("sms_body", message);
intent.putExtra(Intent.EXTRA_STREAM, attachment);
diff --git a/docs/html/guide/topics/ui/declaring-layout.jd b/docs/html/guide/topics/ui/declaring-layout.jd
index cb952a4..ab105fd 100644
--- a/docs/html/guide/topics/ui/declaring-layout.jd
+++ b/docs/html/guide/topics/ui/declaring-layout.jd
@@ -31,7 +31,7 @@
<li>{@link android.view.ViewGroup}</li>
<li>{@link android.view.ViewGroup.LayoutParams}</li>
</ol>
-
+
<h2>See also</h2>
<ol>
<li><a href="{@docRoot}training/basics/firstapp/building-ui.html">Building a Simple User
@@ -43,9 +43,9 @@
href="{@docRoot}guide/topics/appwidgets/index.html">app widget</a>.
You can declare a layout in two ways:</p>
<ul>
-<li><strong>Declare UI elements in XML</strong>. Android provides a straightforward XML
+<li><strong>Declare UI elements in XML</strong>. Android provides a straightforward XML
vocabulary that corresponds to the View classes and subclasses, such as those for widgets and layouts.</li>
-<li><strong>Instantiate layout elements at runtime</strong>. Your
+<li><strong>Instantiate layout elements at runtime</strong>. Your
application can create View and ViewGroup objects (and manipulate their properties) programmatically. </li>
</ul>
@@ -55,12 +55,12 @@
<div class="sidebox">
<ul>
<li>The <a href="{@docRoot}tools/sdk/eclipse-adt.html">ADT
- Plugin for Eclipse</a> offers a layout preview of your XML —
+ Plugin for Eclipse</a> offers a layout preview of your XML —
with the XML file opened, select the <strong>Layout</strong> tab.</li>
- <li>You should also try the
- <a href="{@docRoot}tools/debugging/debugging-ui.html#hierarchyViewer">Hierarchy Viewer</a> tool,
- for debugging layouts — it reveals layout property values,
- draws wireframes with padding/margin indicators, and full rendered views while
+ <li>You should also try the
+ <a href="{@docRoot}tools/debugging/debugging-ui.html#hierarchyViewer">Hierarchy Viewer</a> tool,
+ for debugging layouts — it reveals layout property values,
+ draws wireframes with padding/margin indicators, and full rendered views while
you debug on the emulator or device.</li>
<li>The <a href="{@docRoot}tools/debugging/debugging-ui.html#layoutopt">layoutopt</a> tool lets
you quickly analyze your layouts and hierarchies for inefficiencies or other problems.</li>
@@ -68,7 +68,7 @@
</div>
<p>The advantage to declaring your UI in XML is that it enables you to better separate the presentation of your application from the code that controls its behavior. Your UI descriptions are external to your application code, which means that you can modify or adapt it without having to modify your source code and recompile. For example, you can create XML layouts for different screen orientations, different device screen sizes, and different languages. Additionally, declaring the layout in XML makes it easier to visualize the structure of your UI, so it's easier to debug problems. As such, this document focuses on teaching you how to declare your layout in XML. If you're
-interested in instantiating View objects at runtime, refer to the {@link android.view.ViewGroup} and
+interested in instantiating View objects at runtime, refer to the {@link android.view.ViewGroup} and
{@link android.view.View} class references.</p>
<p>In general, the XML vocabulary for declaring UI elements closely follows the structure and naming of the classes and methods, where element names correspond to class names and attribute names correspond to methods. In fact, the correspondence is often so direct that you can guess what XML attribute corresponds to a class method, or guess what class corresponds to a given XML element. However, note that not all vocabulary is identical. In some cases, there are slight naming differences. For
@@ -102,7 +102,7 @@
</LinearLayout>
</pre>
-<p>After you've declared your layout in XML, save the file with the <code>.xml</code> extension,
+<p>After you've declared your layout in XML, save the file with the <code>.xml</code> extension,
in your Android project's <code>res/layout/</code> directory, so it will properly compile. </p>
<p>More information about the syntax for a layout XML file is available in the <a
@@ -111,11 +111,11 @@
<h2 id="load">Load the XML Resource</h2>
<p>When you compile your application, each XML layout file is compiled into a
-{@link android.view.View} resource. You should load the layout resource from your application code, in your
+{@link android.view.View} resource. You should load the layout resource from your application code, in your
{@link android.app.Activity#onCreate(android.os.Bundle) Activity.onCreate()} callback implementation.
-Do so by calling <code>{@link android.app.Activity#setContentView(int) setContentView()}</code>,
-passing it the reference to your layout resource in the form of:
-<code>R.layout.<em>layout_file_name</em></code>.
+Do so by calling <code>{@link android.app.Activity#setContentView(int) setContentView()}</code>,
+passing it the reference to your layout resource in the form of:
+<code>R.layout.<em>layout_file_name</em></code>.
For example, if your XML layout is saved as <code>main_layout.xml</code>, you would load it
for your Activity like so:</p>
<pre>
@@ -126,7 +126,7 @@
</pre>
<p>The <code>onCreate()</code> callback method in your Activity is called by the Android framework when
-your Activity is launched (see the discussion about lifecycles, in the
+your Activity is launched (see the discussion about lifecycles, in the
<a href="{@docRoot}guide/components/activities.html#Lifecycle">Activities</a>
document).</p>
@@ -136,18 +136,18 @@
<p>Every View and ViewGroup object supports their own variety of XML attributes.
Some attributes are specific to a View object (for example, TextView supports the <code>textSize</code>
attribute), but these attributes are also inherited by any View objects that may extend this class.
-Some are common to all View objects, because they are inherited from the root View class (like
-the <code>id</code> attribute). And, other attributes are considered "layout parameters," which are
+Some are common to all View objects, because they are inherited from the root View class (like
+the <code>id</code> attribute). And, other attributes are considered "layout parameters," which are
attributes that describe certain layout orientations of the View object, as defined by that object's
parent ViewGroup object.</p>
<h3 id="id">ID</h3>
<p>Any View object may have an integer ID associated with it, to uniquely identify the View within the tree.
-When the application is compiled, this ID is referenced as an integer, but the ID is typically
+When the application is compiled, this ID is referenced as an integer, but the ID is typically
assigned in the layout XML file as a string, in the <code>id</code> attribute.
This is an XML attribute common to all View objects
-(defined by the {@link android.view.View} class) and you will use it very often.
+(defined by the {@link android.view.View} class) and you will use it very often.
The syntax for an ID, inside an XML tag is:</p>
<pre>android:id="@+id/my_button"</pre>
@@ -170,7 +170,7 @@
android:text="@string/my_button_text"/>
</pre>
</li>
- <li>Then create an instance of the view object and capture it from the layout
+ <li>Then create an instance of the view object and capture it from the layout
(typically in the <code>{@link android.app.Activity#onCreate(Bundle) onCreate()}</code> method):
<pre>
Button myButton = (Button) findViewById(R.id.my_button);
@@ -178,16 +178,16 @@
</li>
</ol>
<p>Defining IDs for view objects is important when creating a {@link android.widget.RelativeLayout}.
-In a relative layout, sibling views can define their layout relative to another sibling view,
+In a relative layout, sibling views can define their layout relative to another sibling view,
which is referenced by the unique ID.</p>
<p>An ID need not be unique throughout the entire tree, but it should be
-unique within the part of the tree you are searching (which may often be the entire tree, so it's best
+unique within the part of the tree you are searching (which may often be the entire tree, so it's best
to be completely unique when possible).</p>
<h3 id="layout-params">Layout Parameters</h3>
-<p>XML layout attributes named <code>layout_<em>something</em></code> define
+<p>XML layout attributes named <code>layout_<em>something</em></code> define
layout parameters for the View that are appropriate for the ViewGroup in which it resides.</p>
<p>Every ViewGroup class implements a nested class that extends {@link
@@ -201,7 +201,7 @@
parameters associated with each view.</p>
<p>Note that every LayoutParams subclass has its own syntax for setting
-values. Each child element must define LayoutParams that are appropriate for its parent,
+values. Each child element must define LayoutParams that are appropriate for its parent,
though it may also define different LayoutParams for its own children. </p>
<p>All view groups include a width and height (<code>layout_width</code> and
@@ -236,7 +236,7 @@
two dimensions, expressed as a width and a height. The unit for location
and dimensions is the pixel.
</p>
-
+
<p>
It is possible to retrieve the location of a view by invoking the methods
{@link android.view.View#getLeft()} and {@link android.view.View#getTop()}. The former returns the left, or X,
@@ -246,7 +246,7 @@
when <code>getLeft()</code> returns 20, that means the view is located 20 pixels to the
right of the left edge of its direct parent.
</p>
-
+
<p>
In addition, several convenience methods are offered to avoid unnecessary
computations, namely {@link android.view.View#getRight()} and {@link android.view.View#getBottom()}.
@@ -254,14 +254,14 @@
rectangle representing the view. For instance, calling {@link android.view.View#getRight()}
is similar to the following computation: <code>getLeft() + getWidth()</code>.
</p>
-
+
<h2 id="SizePaddingMargins">Size, Padding and Margins</h2>
<p>
The size of a view is expressed with a width and a height. A view actually
possess two pairs of width and height values.
</p>
-
+
<p>
The first pair is known as <em>measured width</em> and
<em>measured height</em>. These dimensions define how big a view wants to be
@@ -269,16 +269,16 @@
measured dimensions can be obtained by calling {@link android.view.View#getMeasuredWidth()}
and {@link android.view.View#getMeasuredHeight()}.
</p>
-
+
<p>
The second pair is simply known as <em>width</em> and <em>height</em>, or
sometimes <em>drawing width</em> and <em>drawing height</em>. These
dimensions define the actual size of the view on screen, at drawing time and
after layout. These values may, but do not have to, be different from the
measured width and height. The width and height can be obtained by calling
- {@link android.view.View#getWidth()} and {@link android.view.View#getHeight()}.
+ {@link android.view.View#getWidth()} and {@link android.view.View#getHeight()}.
</p>
-
+
<p>
To measure its dimensions, a view takes into account its padding. The padding
is expressed in pixels for the left, top, right and bottom parts of the view.
@@ -287,9 +287,9 @@
2 pixels to the right of the left edge. Padding can be set using the
{@link android.view.View#setPadding(int, int, int, int)} method and queried by calling
{@link android.view.View#getPaddingLeft()}, {@link android.view.View#getPaddingTop()},
- {@link android.view.View#getPaddingRight()} and {@link android.view.View#getPaddingBottom()}.
+ {@link android.view.View#getPaddingRight()} and {@link android.view.View#getPaddingBottom()}.
</p>
-
+
<p>
Even though a view can define a padding, it does not provide any support for
margins. However, view groups provide such a support. Refer to
@@ -297,13 +297,13 @@
{@link android.view.ViewGroup.MarginLayoutParams} for further information.
</p>
- <p>For more information about dimensions, see
+ <p>For more information about dimensions, see
<a href="{@docRoot}guide/topics/resources/more-resources.html#Dimension">Dimension Values</a>.
</p>
-
-
-
+
+
+
<style type="text/css">
@@ -332,7 +332,7 @@
possible. Your layout draws faster if it has fewer nested layouts (a wide view hierarchy is
better than a deep view hierarchy).</p>
-<!--
+<!--
<h2 id="framelayout">FrameLayout</h2>
<p>{@link android.widget.FrameLayout FrameLayout} is the simplest type of layout
object. It's basically a blank space on your screen that you can
@@ -417,7 +417,7 @@
android.widget.ListView}, initialize a new {@link android.widget.ArrayAdapter} using a
constructor to specify the layout for each string and the string array:</p>
<pre>
-ArrayAdapter adapter = new ArrayAdapter<String>(this,
+ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
android.R.layout.simple_list_item_1, myStringArray);
</pre>
<p>The arguments for this constructor are:</p>
@@ -453,14 +453,14 @@
android.database.Cursor} you want in the layout for each result and an integer array specifying the
corresponding views that each column should be placed:</p>
<pre>
-String[] fromColumns = {ContactsContract.Data.DISPLAY_NAME,
+String[] fromColumns = {ContactsContract.Data.DISPLAY_NAME,
ContactsContract.CommonDataKinds.Phone.NUMBER};
int[] toViews = {R.id.display_name, R.id.phone_number};
</pre>
<p>When you instantiate the {@link android.widget.SimpleCursorAdapter}, pass the layout to use for
each result, the {@link android.database.Cursor} containing the results, and these two arrays:</p>
<pre>
-SimpleCursorAdapter adapter = new SimpleCursorAdapter(this,
+SimpleCursorAdapter adapter = new SimpleCursorAdapter(this,
R.layout.person_name_and_number, cursor, fromColumns, toViews, 0);
ListView listView = getListView();
listView.setAdapter(adapter);
@@ -490,7 +490,7 @@
}
};
-listView.setOnItemClickListener(mMessageClickedHandler);
+listView.setOnItemClickListener(mMessageClickedHandler);
</pre>
diff --git a/docs/html/sdk/installing/create-project.jd b/docs/html/sdk/installing/create-project.jd
index c0d523a..a7c12d4 100644
--- a/docs/html/sdk/installing/create-project.jd
+++ b/docs/html/sdk/installing/create-project.jd
@@ -76,7 +76,7 @@
<img src="{@docRoot}images/tools/wizard7.png" alt="" width="750" height="509">
<p class="img-caption"><strong>Figure 7.</strong> The default project structure for a mobile app.</p>
-<p>Now you are ready to develop your app. Fore more information, see the following links:</p>
+<p>Now you are ready to develop your app. For more information, see the following links:</p>
<ul>
<li><a href="{@docRoot}training/">Training Lessons</a></li>
diff --git a/docs/html/training/wearables/data-layer/assets.jd b/docs/html/training/wearables/data-layer/assets.jd
index 52ccbb0..5dc11cb 100644
--- a/docs/html/training/wearables/data-layer/assets.jd
+++ b/docs/html/training/wearables/data-layer/assets.jd
@@ -91,7 +91,7 @@
for (DataEvent event : dataEvents) {
if (event.getType() == DataEvent.TYPE_CHANGED &&
event.getDataItem().getUri().getPath().equals("/image")) {
- DataMapItem dataMapItem = DataMapItem.fromDataItem(dataItem);
+ DataMapItem dataMapItem = DataMapItem.fromDataItem(event.getDataItem());
Asset profileAsset = dataMapItem.getDataMap().getAsset("profileImage");
Bitmap bitmap = loadBitmapFromAsset(profileAsset);
// Do something with the bitmap
diff --git a/graphics/java/android/graphics/Typeface.java b/graphics/java/android/graphics/Typeface.java
index 06586ca..568d3f2 100644
--- a/graphics/java/android/graphics/Typeface.java
+++ b/graphics/java/android/graphics/Typeface.java
@@ -188,7 +188,7 @@
return createFromFamiliesWithDefault(families);
}
}
- return null;
+ throw new RuntimeException("Font asset not found " + path);
}
/**
@@ -215,7 +215,7 @@
return createFromFamiliesWithDefault(families);
}
}
- return null;
+ throw new RuntimeException("Font not found " + path);
}
/**
diff --git a/graphics/java/android/graphics/drawable/GradientDrawable.java b/graphics/java/android/graphics/drawable/GradientDrawable.java
index 29b9141..2c8611e 100644
--- a/graphics/java/android/graphics/drawable/GradientDrawable.java
+++ b/graphics/java/android/graphics/drawable/GradientDrawable.java
@@ -811,6 +811,11 @@
}
@Override
+ public ColorFilter getColorFilter() {
+ return mColorFilter;
+ }
+
+ @Override
public void setColorFilter(ColorFilter cf) {
if (cf != mColorFilter) {
mColorFilter = cf;
diff --git a/graphics/java/android/graphics/drawable/Ripple.java b/graphics/java/android/graphics/drawable/Ripple.java
index be2241b..063ac09 100644
--- a/graphics/java/android/graphics/drawable/Ripple.java
+++ b/graphics/java/android/graphics/drawable/Ripple.java
@@ -211,7 +211,7 @@
final boolean canUseHardware = c.isHardwareAccelerated();
if (mCanUseHardware != canUseHardware && mCanUseHardware) {
// We've switched from hardware to non-hardware mode. Panic.
- cancelHardwareAnimations();
+ cancelHardwareAnimations(true);
}
mCanUseHardware = canUseHardware;
@@ -231,7 +231,7 @@
final ArrayList<RenderNodeAnimator> pendingAnimations = mPendingAnimations;
final int N = pendingAnimations.size();
if (N > 0) {
- cancelHardwareAnimations();
+ cancelHardwareAnimations(false);
for (int i = 0; i < N; i++) {
pendingAnimations.get(i).setTarget(c);
@@ -399,6 +399,45 @@
invalidateSelf();
}
+ public void jump() {
+ endSoftwareAnimations();
+ endHardwareAnimations();
+ }
+
+ private void endSoftwareAnimations() {
+ if (mAnimRadius != null) {
+ mAnimRadius.end();
+ }
+
+ if (mAnimOpacity != null) {
+ mAnimOpacity.end();
+ }
+
+ if (mAnimX != null) {
+ mAnimX.end();
+ }
+
+ if (mAnimY != null) {
+ mAnimY.end();
+ }
+ }
+
+ private void endHardwareAnimations() {
+ final ArrayList<RenderNodeAnimator> runningAnimations = mRunningAnimations;
+ final int N = runningAnimations.size();
+ for (int i = 0; i < N; i++) {
+ runningAnimations.get(i).end();
+ }
+ runningAnimations.clear();
+
+ // Abort any pending animations. Since we always have a completion
+ // listener on a pending animation, we also need to remove ourselves.
+ if (!mPendingAnimations.isEmpty()) {
+ mPendingAnimations.clear();
+ removeSelf();
+ }
+ }
+
private Paint getTempPaint() {
if (mTempPaint == null) {
mTempPaint = new Paint();
@@ -444,7 +483,7 @@
*/
public void cancel() {
cancelSoftwareAnimations();
- cancelHardwareAnimations();
+ cancelHardwareAnimations(true);
}
private void cancelSoftwareAnimations() {
@@ -468,14 +507,18 @@
/**
* Cancels any running hardware animations.
*/
- private void cancelHardwareAnimations() {
+ private void cancelHardwareAnimations(boolean cancelPending) {
final ArrayList<RenderNodeAnimator> runningAnimations = mRunningAnimations;
final int N = runningAnimations.size();
for (int i = 0; i < N; i++) {
runningAnimations.get(i).cancel();
}
-
runningAnimations.clear();
+
+ if (cancelPending && !mPendingAnimations.isEmpty()) {
+ mPendingAnimations.clear();
+ removeSelf();
+ }
}
private void removeSelf() {
diff --git a/graphics/java/android/graphics/drawable/RippleBackground.java b/graphics/java/android/graphics/drawable/RippleBackground.java
index 93df648..49862bc 100644
--- a/graphics/java/android/graphics/drawable/RippleBackground.java
+++ b/graphics/java/android/graphics/drawable/RippleBackground.java
@@ -203,7 +203,7 @@
final boolean canUseHardware = c.isHardwareAccelerated();
if (mCanUseHardware != canUseHardware && mCanUseHardware) {
// We've switched from hardware to non-hardware mode. Panic.
- cancelHardwareAnimations();
+ cancelHardwareAnimations(true);
}
mCanUseHardware = canUseHardware;
@@ -223,7 +223,7 @@
final ArrayList<RenderNodeAnimator> pendingAnimations = mPendingAnimations;
final int N = pendingAnimations.size();
if (N > 0) {
- cancelHardwareAnimations();
+ cancelHardwareAnimations(false);
for (int i = 0; i < N; i++) {
pendingAnimations.get(i).setTarget(c);
@@ -403,6 +403,41 @@
invalidateSelf();
}
+ public void jump() {
+ endSoftwareAnimations();
+ endHardwareAnimations();
+ }
+
+ private void endSoftwareAnimations() {
+ if (mAnimOuterOpacity != null) {
+ mAnimOuterOpacity.end();
+ }
+
+ if (mAnimX != null) {
+ mAnimX.end();
+ }
+
+ if (mAnimY != null) {
+ mAnimY.end();
+ }
+ }
+
+ private void endHardwareAnimations() {
+ final ArrayList<RenderNodeAnimator> runningAnimations = mRunningAnimations;
+ final int N = runningAnimations.size();
+ for (int i = 0; i < N; i++) {
+ runningAnimations.get(i).end();
+ }
+ runningAnimations.clear();
+
+ // Abort any pending animations. Since we always have a completion
+ // listener on a pending animation, we also need to remove ourselves.
+ if (!mPendingAnimations.isEmpty()) {
+ mPendingAnimations.clear();
+ removeSelf();
+ }
+ }
+
private Paint getTempPaint() {
if (mTempPaint == null) {
mTempPaint = new Paint();
@@ -477,7 +512,7 @@
*/
public void cancel() {
cancelSoftwareAnimations();
- cancelHardwareAnimations();
+ cancelHardwareAnimations(true);
}
private void cancelSoftwareAnimations() {
@@ -497,7 +532,7 @@
/**
* Cancels any running hardware animations.
*/
- private void cancelHardwareAnimations() {
+ private void cancelHardwareAnimations(boolean cancelPending) {
final ArrayList<RenderNodeAnimator> runningAnimations = mRunningAnimations;
final int N = runningAnimations.size();
for (int i = 0; i < N; i++) {
@@ -505,6 +540,11 @@
}
runningAnimations.clear();
+
+ if (cancelPending && !mPendingAnimations.isEmpty()) {
+ mPendingAnimations.clear();
+ removeSelf();
+ }
}
private void removeSelf() {
diff --git a/graphics/java/android/graphics/drawable/RippleDrawable.java b/graphics/java/android/graphics/drawable/RippleDrawable.java
index 0447e17..ca32751f 100644
--- a/graphics/java/android/graphics/drawable/RippleDrawable.java
+++ b/graphics/java/android/graphics/drawable/RippleDrawable.java
@@ -199,6 +199,29 @@
}
@Override
+ public void jumpToCurrentState() {
+ super.jumpToCurrentState();
+
+ if (mRipple != null) {
+ mRipple.jump();
+ }
+
+ if (mBackground != null) {
+ mBackground.jump();
+ }
+
+ mClearingHotspots = true;
+ final int count = mAnimatingRipplesCount;
+ final Ripple[] ripples = mAnimatingRipples;
+ for (int i = 0; i < count; i++) {
+ ripples[i].jump();
+ ripples[i] = null;
+ }
+ mAnimatingRipplesCount = 0;
+ mClearingHotspots = false;
+ }
+
+ @Override
public void setAlpha(int alpha) {
super.setAlpha(alpha);
@@ -534,18 +557,6 @@
}
private void clearHotspots() {
- mClearingHotspots = true;
-
- final int count = mAnimatingRipplesCount;
- final Ripple[] ripples = mAnimatingRipples;
- for (int i = 0; i < count; i++) {
- // Calling cancel may remove the ripple from the animating ripple
- // array, so cache the reference before nulling it out.
- final Ripple ripple = ripples[i];
- ripples[i] = null;
- ripple.cancel();
- }
-
if (mRipple != null) {
mRipple.cancel();
mRipple = null;
@@ -556,8 +567,16 @@
mBackground = null;
}
- mClearingHotspots = false;
+ mClearingHotspots = true;
+ final int count = mAnimatingRipplesCount;
+ final Ripple[] ripples = mAnimatingRipples;
+ for (int i = 0; i < count; i++) {
+ ripples[i].cancel();
+ ripples[i] = null;
+ }
mAnimatingRipplesCount = 0;
+ mClearingHotspots = false;
+
invalidateSelf();
}
diff --git a/include/androidfw/ResourceTypes.h b/include/androidfw/ResourceTypes.h
index b56829d..1af497c 100644
--- a/include/androidfw/ResourceTypes.h
+++ b/include/androidfw/ResourceTypes.h
@@ -1459,6 +1459,9 @@
// Loads an unmapped reference table from the package.
status_t load(const ResTable_lib_header* const header);
+ // Adds mappings from the other DynamicRefTable
+ status_t addMappings(const DynamicRefTable& other);
+
// Creates a mapping from build-time package ID to run-time package ID for
// the given package.
status_t addMapping(const String16& packageName, uint8_t packageId);
diff --git a/libs/androidfw/ResourceTypes.cpp b/libs/androidfw/ResourceTypes.cpp
index 2a4dec0..239d682 100644
--- a/libs/androidfw/ResourceTypes.cpp
+++ b/libs/androidfw/ResourceTypes.cpp
@@ -3346,6 +3346,7 @@
TypeList& typeList = pg->types.editItemAt(j);
typeList.appendVector(srcPg->types[j]);
}
+ pg->dynamicRefTable.addMappings(srcPg->dynamicRefTable);
pg->largestTypeId = max(pg->largestTypeId, srcPg->largestTypeId);
mPackageGroups.add(pg);
}
@@ -5604,7 +5605,6 @@
return (mError=NO_MEMORY);
}
- //printf("Adding new package id %d at index %d\n", id, idx);
err = mPackageGroups.add(group);
if (err < NO_ERROR) {
return (mError=err);
@@ -5844,6 +5844,37 @@
return NO_ERROR;
}
+status_t DynamicRefTable::addMappings(const DynamicRefTable& other) {
+ if (mAssignedPackageId != other.mAssignedPackageId) {
+ return UNKNOWN_ERROR;
+ }
+
+ const size_t entryCount = other.mEntries.size();
+ for (size_t i = 0; i < entryCount; i++) {
+ ssize_t index = mEntries.indexOfKey(other.mEntries.keyAt(i));
+ if (index < 0) {
+ mEntries.add(other.mEntries.keyAt(i), other.mEntries[i]);
+ } else {
+ if (other.mEntries[i] != mEntries[index]) {
+ return UNKNOWN_ERROR;
+ }
+ }
+ }
+
+ // Merge the lookup table. No entry can conflict
+ // (value of 0 means not set).
+ for (size_t i = 0; i < 256; i++) {
+ if (mLookupTable[i] != other.mLookupTable[i]) {
+ if (mLookupTable[i] == 0) {
+ mLookupTable[i] = other.mLookupTable[i];
+ } else if (other.mLookupTable[i] != 0) {
+ return UNKNOWN_ERROR;
+ }
+ }
+ }
+ return NO_ERROR;
+}
+
status_t DynamicRefTable::addMapping(const String16& packageName, uint8_t packageId)
{
ssize_t index = mEntries.indexOfKey(packageName);
@@ -6216,21 +6247,36 @@
printf("Package Groups (%d)\n", (int)pgCount);
for (size_t pgIndex=0; pgIndex<pgCount; pgIndex++) {
const PackageGroup* pg = mPackageGroups[pgIndex];
- printf("Package Group %d id=%d packageCount=%d name=%s\n",
+ printf("Package Group %d id=0x%02x packageCount=%d name=%s\n",
(int)pgIndex, pg->id, (int)pg->packages.size(),
String8(pg->name).string());
+ const KeyedVector<String16, uint8_t>& refEntries = pg->dynamicRefTable.entries();
+ const size_t refEntryCount = refEntries.size();
+ if (refEntryCount > 0) {
+ printf(" DynamicRefTable entryCount=%d:\n", (int) refEntryCount);
+ for (size_t refIndex = 0; refIndex < refEntryCount; refIndex++) {
+ printf(" 0x%02x -> %s\n",
+ refEntries.valueAt(refIndex),
+ String8(refEntries.keyAt(refIndex)).string());
+ }
+ printf("\n");
+ }
+
+ int packageId = pg->id;
size_t pkgCount = pg->packages.size();
for (size_t pkgIndex=0; pkgIndex<pkgCount; pkgIndex++) {
const Package* pkg = pg->packages[pkgIndex];
- printf(" Package %d id=%d name=%s\n", (int)pkgIndex,
+ // Use a package's real ID, since the ID may have been assigned
+ // if this package is a shared library.
+ packageId = pkg->package->id;
+ printf(" Package %d id=0x%02x name=%s\n", (int)pkgIndex,
pkg->package->id, String8(String16(pkg->package->name)).string());
}
for (size_t typeIndex=0; typeIndex < pg->types.size(); typeIndex++) {
const TypeList& typeList = pg->types[typeIndex];
if (typeList.isEmpty()) {
- //printf(" type %d NULL\n", (int)typeIndex);
continue;
}
const Type* typeConfigs = typeList[0];
@@ -6239,13 +6285,15 @@
(int)typeIndex, (int)NTC, (int)typeConfigs->entryCount);
if (typeConfigs->typeSpecFlags != NULL) {
for (size_t entryIndex=0; entryIndex<typeConfigs->entryCount; entryIndex++) {
- uint32_t resID = (0xff000000 & ((pg->id)<<24))
+ uint32_t resID = (0xff000000 & ((packageId)<<24))
| (0x00ff0000 & ((typeIndex+1)<<16))
| (0x0000ffff & (entryIndex));
// Since we are creating resID without actually
// iterating over them, we have no idea which is a
// dynamic reference. We must check.
- pg->dynamicRefTable.lookupResourceId(&resID);
+ if (packageId == 0) {
+ pg->dynamicRefTable.lookupResourceId(&resID);
+ }
resource_name resName;
if (this->getResourceName(resID, true, &resName)) {
@@ -6303,10 +6351,12 @@
continue;
}
- uint32_t resID = (0xff000000 & ((pg->id)<<24))
+ uint32_t resID = (0xff000000 & ((packageId)<<24))
| (0x00ff0000 & ((typeIndex+1)<<16))
| (0x0000ffff & (entryIndex));
- pg->dynamicRefTable.lookupResourceId(&resID);
+ if (packageId == 0) {
+ pg->dynamicRefTable.lookupResourceId(&resID);
+ }
resource_name resName;
if (this->getResourceName(resID, true, &resName)) {
String8 type8;
@@ -6387,9 +6437,11 @@
const ResTable_map* mapPtr = (ResTable_map*)(baseMapPtr+mapOffset);
const uint32_t parent = dtohl(bagPtr->parent.ident);
uint32_t resolvedParent = parent;
- status_t err = pg->dynamicRefTable.lookupResourceId(&resolvedParent);
- if (err != NO_ERROR) {
- resolvedParent = 0;
+ if (Res_GETPACKAGE(resolvedParent) + 1 == 0) {
+ status_t err = pg->dynamicRefTable.lookupResourceId(&resolvedParent);
+ if (err != NO_ERROR) {
+ resolvedParent = 0;
+ }
}
printf(" Parent=0x%08x(Resolved=0x%08x), Count=%d\n",
parent, resolvedParent, N);
diff --git a/libs/hwui/DamageAccumulator.cpp b/libs/hwui/DamageAccumulator.cpp
index 054a164..420e331 100644
--- a/libs/hwui/DamageAccumulator.cpp
+++ b/libs/hwui/DamageAccumulator.cpp
@@ -214,7 +214,7 @@
mHead->pendingDirty.join(left, top, right, bottom);
}
-void DamageAccumulator::peekAtDirty(SkRect* dest) {
+void DamageAccumulator::peekAtDirty(SkRect* dest) const {
*dest = mHead->pendingDirty;
}
diff --git a/libs/hwui/DamageAccumulator.h b/libs/hwui/DamageAccumulator.h
index 6f0bd8c..dd3365a 100644
--- a/libs/hwui/DamageAccumulator.h
+++ b/libs/hwui/DamageAccumulator.h
@@ -50,7 +50,7 @@
void dirty(float left, float top, float right, float bottom);
// Returns the current dirty area, *NOT* transformed by pushed transforms
- void peekAtDirty(SkRect* dest);
+ void peekAtDirty(SkRect* dest) const;
void computeCurrentTransform(Matrix4* outMatrix) const;
diff --git a/libs/hwui/RenderNode.cpp b/libs/hwui/RenderNode.cpp
index 0db6198..977744f 100644
--- a/libs/hwui/RenderNode.cpp
+++ b/libs/hwui/RenderNode.cpp
@@ -179,13 +179,6 @@
transformUpdateNeeded = true;
}
- if (transformUpdateNeeded) {
- // update the transform in window of the layer to reset its origin wrt light source position
- Matrix4 windowTransform;
- info.damageAccumulator->computeCurrentTransform(&windowTransform);
- mLayer->setWindowTransform(windowTransform);
- }
-
SkRect dirty;
info.damageAccumulator->peekAtDirty(&dirty);
@@ -198,6 +191,12 @@
return;
}
+ if (transformUpdateNeeded) {
+ // update the transform in window of the layer to reset its origin wrt light source position
+ Matrix4 windowTransform;
+ info.damageAccumulator->computeCurrentTransform(&windowTransform);
+ mLayer->setWindowTransform(windowTransform);
+ }
if (dirty.intersect(0, 0, getWidth(), getHeight())) {
dirty.roundOut();
@@ -216,7 +215,10 @@
if (info.mode == TreeInfo::MODE_FULL) {
pushStagingPropertiesChanges(info);
}
- uint32_t animatorDirtyMask = mAnimatorManager.animate(info);
+ uint32_t animatorDirtyMask = 0;
+ if (CC_LIKELY(info.runAnimations)) {
+ animatorDirtyMask = mAnimatorManager.animate(info);
+ }
prepareLayer(info, animatorDirtyMask);
if (info.mode == TreeInfo::MODE_FULL) {
pushStagingDisplayListChanges(info);
@@ -231,7 +233,9 @@
// Push the animators first so that setupStartValueIfNecessary() is called
// before properties() is trampled by stagingProperties(), as they are
// required by some animators.
- mAnimatorManager.pushStaging(info);
+ if (CC_LIKELY(info.runAnimations)) {
+ mAnimatorManager.pushStaging(info);
+ }
if (mDirtyPropertyFields) {
mDirtyPropertyFields = 0;
damageSelf(info);
diff --git a/libs/hwui/StatefulBaseRenderer.cpp b/libs/hwui/StatefulBaseRenderer.cpp
index 06c5ab4..bdac47b 100644
--- a/libs/hwui/StatefulBaseRenderer.cpp
+++ b/libs/hwui/StatefulBaseRenderer.cpp
@@ -196,12 +196,14 @@
float radius;
if (!outline->getAsRoundRect(&bounds, &radius)) return; // only RR supported
- if (!MathUtils::isPositive(radius)) {
+ bool outlineIsRounded = MathUtils::isPositive(radius);
+ if (!outlineIsRounded || currentTransform()->isSimple()) {
// TODO: consider storing this rect separately, so that this can't be replaced with clip ops
clipRect(bounds.left, bounds.top, bounds.right, bounds.bottom, SkRegion::kIntersect_Op);
- return;
}
- setClippingRoundRect(allocator, bounds, radius);
+ if (outlineIsRounded) {
+ setClippingRoundRect(allocator, bounds, radius);
+ }
}
void StatefulBaseRenderer::setClippingRoundRect(LinearAllocator& allocator,
diff --git a/libs/hwui/TreeInfo.h b/libs/hwui/TreeInfo.h
index 331f157..74d52a3 100644
--- a/libs/hwui/TreeInfo.h
+++ b/libs/hwui/TreeInfo.h
@@ -65,6 +65,7 @@
, frameTimeMs(0)
, animationHook(NULL)
, prepareTextures(mode == MODE_FULL)
+ , runAnimations(true)
, damageAccumulator(NULL)
, renderState(renderState)
, renderer(NULL)
@@ -76,6 +77,7 @@
, frameTimeMs(clone.frameTimeMs)
, animationHook(clone.animationHook)
, prepareTextures(mode == MODE_FULL)
+ , runAnimations(clone.runAnimations)
, damageAccumulator(clone.damageAccumulator)
, renderState(clone.renderState)
, renderer(clone.renderer)
@@ -88,6 +90,12 @@
// TODO: Remove this? Currently this is used to signal to stop preparing
// textures if we run out of cache space.
bool prepareTextures;
+ // TODO: buildLayer uses this to suppress running any animations, but this
+ // should probably be refactored somehow. The reason this is done is
+ // because buildLayer is not setup for injecting the animationHook, as well
+ // as this being otherwise wasted work as all the animators will be
+ // re-evaluated when the frame is actually drawn
+ bool runAnimations;
// Must not be null during actual usage
DamageAccumulator* damageAccumulator;
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp
index 5922135..4bf5a8a 100644
--- a/libs/hwui/renderthread/CanvasContext.cpp
+++ b/libs/hwui/renderthread/CanvasContext.cpp
@@ -257,6 +257,7 @@
info.frameTimeMs = mRenderThread.timeLord().frameTimeMs();
info.damageAccumulator = &mDamageAccumulator;
info.renderer = mCanvas;
+ info.runAnimations = false;
node->prepareTree(info);
SkRect ignore;
mDamageAccumulator.finish(&ignore);
diff --git a/media/java/android/media/RemoteControlClient.java b/media/java/android/media/RemoteControlClient.java
index 2a0fd83..3c2ad0e 100644
--- a/media/java/android/media/RemoteControlClient.java
+++ b/media/java/android/media/RemoteControlClient.java
@@ -389,6 +389,7 @@
public void registerWithSession(MediaSessionLegacyHelper helper) {
helper.addRccListener(mRcMediaIntent, mTransportListener);
mSession = helper.getSession(mRcMediaIntent);
+ setTransportControlFlags(mTransportControlFlags);
}
/**
diff --git a/media/java/android/media/tv/TvContentRating.java b/media/java/android/media/tv/TvContentRating.java
index 405ef22..c4a81cc 100644
--- a/media/java/android/media/tv/TvContentRating.java
+++ b/media/java/android/media/tv/TvContentRating.java
@@ -41,78 +41,79 @@
* The following XML example shows how the TV Parental Guidelines in United States can be defined:
* <p><pre class="prettyprint">
* {@literal
- * <?xml version="1.0" encoding="UTF-8"?>
- * <rating-system-definitions version="1.0">
- * <rating-system-definition id="US_TV"
- * displayName="US-TV"
- * description="The TV Parental Guidelines"
- * country="US">
- * <sub-rating-definition id="US_TV_D"
- * displayName="D"
- * description="Suggestive dialogue (Usually means talks about sex)" />
- * <sub-rating-definition id="US_TV_L"
- * displayName="L"
- * description="Coarse language" />
- * <sub-rating-definition id="US_TV_S"
- * displayName="S"
- * description="Sexual content" />
- * <sub-rating-definition id="US_TV_V"
- * displayName="V"
- * description="Violence" />
- * <sub-rating-definition id="US_TV_FV"
- * displayName="FV"
- * description="Fantasy violence (Children\'s programming only)" />
+ * <rating-system-definitions xmlns:android="http://schemas.android.com/apk/res/android"
+ * android:versionCode="1">
+ * <!-- TV content rating system for US TV -->
+ * <rating-system-definition android:name="US_TV"
+ * android:title="US-TV"
+ * android:description="@string/description_ustv"
+ * android:country="US">
+ * <sub-rating-definition android:name="US_TV_D"
+ * android:title="D"
+ * android:description="@string/description_ustv_d" />
+ * <sub-rating-definition android:name="US_TV_L"
+ * android:title="L"
+ * android:description="@string/description_ustv_l" />
+ * <sub-rating-definition android:name="US_TV_S"
+ * android:title="S"
+ * android:description="@string/description_ustv_s" />
+ * <sub-rating-definition android:name="US_TV_V"
+ * android:title="V"
+ * android:description="@string/description_ustv_v" />
+ * <sub-rating-definition android:name="US_TV_FV"
+ * android:title="FV"
+ * android:description="@string/description_ustv_fv" />
*
- * <rating-definition id="US_TV_Y"
- * displayName="TV-Y"
- * description="This program is designed to be appropriate for all children"
- * ageHint="0" />
- * <rating-definition id="US_TV_Y7"
- * displayName="TV-Y7"
- * description="This program is designed for children age 7 and above"
- * ageHint="7">
- * <sub-rating id="US_TV_FV" />
+ * <rating-definition android:name="US_TV_Y"
+ * android:title="TV-Y"
+ * android:description="@string/description_ustv_y"
+ * android:ageHint="0" />
+ * <rating-definition android:name="US_TV_Y7"
+ * android:title="TV-Y7"
+ * android:description="@string/description_ustv_y7"
+ * android:ageHint="7">
+ * <sub-rating android:name="US_TV_FV" />
* </rating-definition>
- * <rating-definition id="US_TV_G"
- * displayName="TV-G"
- * description="Most parents would find this program suitable for all ages"
- * ageHint="0" />
- * <rating-definition id="US_TV_PG"
- * displayName="TV-PG"
- * description="This program contains material that parents may find unsuitable for younger children"
- * ageHint="14">
- * <sub-rating id="US_TV_D" />
- * <sub-rating id="US_TV_L" />
- * <sub-rating id="US_TV_S" />
- * <sub-rating id="US_TV_V" />
+ * <rating-definition android:name="US_TV_G"
+ * android:title="TV-G"
+ * android:description="@string/description_ustv_g"
+ * android:ageHint="0" />
+ * <rating-definition android:name="US_TV_PG"
+ * android:title="TV-PG"
+ * android:description="@string/description_ustv_pg"
+ * android:ageHint="14">
+ * <sub-rating android:name="US_TV_D" />
+ * <sub-rating android:name="US_TV_L" />
+ * <sub-rating android:name="US_TV_S" />
+ * <sub-rating android:name="US_TV_V" />
* </rating-definition>
- * <rating-definition id="US_TV_14"
- * displayName="TV-14"
- * description="This program contains some material that many parents would find unsuitable for children under 14 years of age"
- * ageHint="14">
- * <sub-rating id="US_TV_D" />
- * <sub-rating id="US_TV_L" />
- * <sub-rating id="US_TV_S" />
- * <sub-rating id="US_TV_V" />
+ * <rating-definition android:name="US_TV_14"
+ * android:title="TV-14"
+ * android:description="@string/description_ustv_14"
+ * android:ageHint="14">
+ * <sub-rating android:name="US_TV_D" />
+ * <sub-rating android:name="US_TV_L" />
+ * <sub-rating android:name="US_TV_S" />
+ * <sub-rating android:name="US_TV_V" />
* </rating-definition>
- * <rating-definition id="US_TV_MA"
- * displayName="TV-MA"
- * description="This program is specifically designed to be viewed by adults and therefore may be unsuitable for children under 17"
- * ageHint="17">
- * <sub-rating id="US_TV_L" />
- * <sub-rating id="US_TV_S" />
- * <sub-rating id="US_TV_V" />
+ * <rating-definition android:name="US_TV_MA"
+ * android:title="TV-MA"
+ * android:description="@string/description_ustv_ma"
+ * android:ageHint="17">
+ * <sub-rating android:name="US_TV_L" />
+ * <sub-rating android:name="US_TV_S" />
+ * <sub-rating android:name="US_TV_V" />
* </rating-definition>
- * <order>
- * <rating id="US_TV_Y" />
- * <rating id="US_TV_Y7" />
- * </order>
- * <order>
- * <rating id="US_TV_G" />
- * <rating id="US_TV_PG" />
- * <rating id="US_TV_14" />
- * <rating id="US_TV_MA" />
- * </order>
+ * <rating-order>
+ * <rating android:name="US_TV_Y" />
+ * <rating android:name="US_TV_Y7" />
+ * </rating-order>
+ * <rating-order>
+ * <rating android:name="US_TV_G" />
+ * <rating android:name="US_TV_PG" />
+ * <rating android:name="US_TV_14" />
+ * <rating android:name="US_TV_MA" />
+ * </rating-order>
* </rating-system-definition>
* </rating-system-definitions>}</pre></p>
*
@@ -1506,10 +1507,6 @@
* </table>
*/
public final class TvContentRating {
- /** @hide */
- public static final Uri SYSTEM_CONTENT_RATING_SYSTEM_XML = Uri.parse(
- "android.resource://system/" + com.android.internal.R.xml.tv_content_rating_systems);
-
// TODO: Consider to use other DELIMITER. In some countries such as India may use this delimiter
// in the main ratings.
private static final String DELIMITER = "/";
diff --git a/media/java/android/media/tv/TvInputInfo.java b/media/java/android/media/tv/TvInputInfo.java
index 3f5697f..106e1dc 100644
--- a/media/java/android/media/tv/TvInputInfo.java
+++ b/media/java/android/media/tv/TvInputInfo.java
@@ -46,7 +46,6 @@
import java.io.IOException;
import java.io.InputStream;
-import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
@@ -616,11 +615,15 @@
public static Set<String> getHiddenTvInputIds(Context context, int userId) {
String hiddenIdsString = Settings.Secure.getStringForUser(
context.getContentResolver(), Settings.Secure.TV_INPUT_HIDDEN_INPUTS, userId);
+ Set<String> set = new HashSet<String>();
if (TextUtils.isEmpty(hiddenIdsString)) {
- return new HashSet<String>();
+ return set;
}
String[] ids = hiddenIdsString.split(TV_INPUT_SEPARATOR);
- return new HashSet<>(Arrays.asList(ids));
+ for (String id : ids) {
+ set.add(Uri.decode(id));
+ }
+ return set;
}
/**
@@ -641,7 +644,7 @@
String[] pairs = labelsString.split(TV_INPUT_SEPARATOR);
for (String pairString : pairs) {
String[] pair = pairString.split(CUSTOM_NAME_SEPARATOR);
- map.put(pair[0], pair[1]);
+ map.put(Uri.decode(pair[0]), Uri.decode(pair[1]));
}
return map;
}
@@ -667,7 +670,7 @@
} else {
builder.append(TV_INPUT_SEPARATOR);
}
- builder.append(inputId);
+ builder.append(Uri.encode(inputId));
}
Settings.Secure.putStringForUser(context.getContentResolver(),
Settings.Secure.TV_INPUT_HIDDEN_INPUTS, builder.toString(), userId);
@@ -695,9 +698,9 @@
} else {
builder.append(TV_INPUT_SEPARATOR);
}
- builder.append(entry.getKey());
+ builder.append(Uri.encode(entry.getKey()));
builder.append(CUSTOM_NAME_SEPARATOR);
- builder.append(entry.getValue());
+ builder.append(Uri.encode(entry.getValue()));
}
Settings.Secure.putStringForUser(context.getContentResolver(),
Settings.Secure.TV_INPUT_CUSTOM_LABELS, builder.toString(), userId);
@@ -707,14 +710,6 @@
if (TextUtils.isEmpty(value)) {
throw new IllegalArgumentException(value + " should not empty ");
}
- if (value.contains(TV_INPUT_SEPARATOR)) {
- throw new IllegalArgumentException(value + " should not include "
- + TV_INPUT_SEPARATOR);
- }
- if (value.contains(CUSTOM_NAME_SEPARATOR)) {
- throw new IllegalArgumentException(value + " should not include "
- + CUSTOM_NAME_SEPARATOR);
- }
}
}
}
diff --git a/media/java/android/media/tv/TvView.java b/media/java/android/media/tv/TvView.java
index f348b9b..7110db9 100644
--- a/media/java/android/media/tv/TvView.java
+++ b/media/java/android/media/tv/TvView.java
@@ -38,6 +38,7 @@
import android.view.ViewGroup;
import android.view.ViewRootImpl;
+import java.lang.ref.WeakReference;
import java.util.List;
/**
@@ -69,8 +70,10 @@
private static final int CAPTION_ENABLED = 1;
private static final int CAPTION_DISABLED = 2;
+ private static final WeakReference<TvView> NULL_TV_VIEW = new WeakReference(null);
+
private static final Object sMainTvViewLock = new Object();
- private static TvView sMainTvView;
+ private static WeakReference<TvView> sMainTvView = NULL_TV_VIEW;
private final Handler mHandler = new Handler();
private Session mSession;
@@ -186,16 +189,16 @@
* (including the tuner, composite, S-Video, etc.), the internal device (= TV itself) becomes
* the active source.
* </p><p>
- * First tuned {@link TvView} becomes main automatically, and keeps to be main until {@link
- * #setMain} is called for other {@link TvView}. Note that main {@link TvView} won't be reset
- * even when current main {@link TvView} is removed from view hierarchy.
+ * First tuned {@link TvView} becomes main automatically, and keeps to be main until either
+ * {@link #reset} is called for the main {@link TvView} or {@link #setMain} is called for other
+ * {@link TvView}.
* </p>
* @hide
*/
@SystemApi
public void setMain() {
synchronized (sMainTvViewLock) {
- sMainTvView = this;
+ sMainTvView = new WeakReference(this);
if (hasWindowFocus() && mSession != null) {
mSession.setMain();
}
@@ -288,8 +291,8 @@
throw new IllegalArgumentException("inputId cannot be null or an empty string");
}
synchronized (sMainTvViewLock) {
- if (sMainTvView == null) {
- sMainTvView = this;
+ if (sMainTvView.get() == null) {
+ sMainTvView = new WeakReference(this);
}
}
if (mSessionCallback != null && mSessionCallback.mInputId.equals(inputId)) {
@@ -320,6 +323,11 @@
*/
public void reset() {
if (DEBUG) Log.d(TAG, "reset()");
+ synchronized (sMainTvViewLock) {
+ if (this == sMainTvView.get()) {
+ sMainTvView = NULL_TV_VIEW;
+ }
+ }
if (mSession != null) {
release();
resetSurfaceView();
@@ -530,7 +538,7 @@
// Other app may have shown its own main TvView.
// Set main again to regain main session.
synchronized (sMainTvViewLock) {
- if (hasFocus && this == sMainTvView && mSession != null) {
+ if (hasFocus && this == sMainTvView.get() && mSession != null) {
mSession.setMain();
}
}
@@ -828,7 +836,7 @@
mSession = session;
if (session != null) {
synchronized (sMainTvViewLock) {
- if (hasWindowFocus() && TvView.this == sMainTvView) {
+ if (hasWindowFocus() && TvView.this == sMainTvView.get()) {
mSession.setMain();
}
}
diff --git a/packages/SystemUI/res/drawable-xxhdpi/title_bar_shadow.9.png b/packages/SystemUI/res/drawable-xxhdpi/title_bar_shadow.9.png
deleted file mode 100644
index e86f891..0000000
--- a/packages/SystemUI/res/drawable-xxhdpi/title_bar_shadow.9.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable/ic_qs_vpn.xml b/packages/SystemUI/res/drawable/ic_qs_vpn.xml
index e9141ef..e7ef02a 100644
--- a/packages/SystemUI/res/drawable/ic_qs_vpn.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_vpn.xml
@@ -18,8 +18,7 @@
android:height="12.0dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
-
<path
android:fillColor="#4DFFFFFF"
- android:pathData="M22.000000,4.000000L22.000000,3.500000C22.000000,2.100000 20.900000,1.000000 19.500000,1.000000C18.100000,1.000000 17.000000,2.100000 17.000000,3.500000L17.000000,4.000000c-0.600000,0.000000 -1.000000,0.400000 -1.000000,1.000000l0.000000,4.000000c0.000000,0.600000 0.400000,1.000000 1.000000,1.000000l5.000000,0.000000c0.600000,0.000000 1.000000,-0.400000 1.000000,-1.000000L23.000000,5.000000C23.000000,4.400000 22.600000,4.000000 22.000000,4.000000zM21.200001,4.000000l-3.400000,0.000000L17.800001,3.500000c0.000000,-0.900000 0.800000,-1.700000 1.700000,-1.700000c0.900000,0.000000 1.700000,0.800000 1.700000,1.700000L21.200003,4.000000zM18.900000,12.000000c0.000000,0.300000 0.100000,0.700000 0.100000,1.000000c0.000000,2.100000 -0.800000,4.000000 -2.100000,5.400000c-0.300000,-0.800000 -1.000000,-1.400000 -1.900000,-1.400000l-1.000000,0.000000l0.000000,-3.000000c0.000000,-0.600000 -0.400000,-1.000000 -1.000000,-1.000000L7.000000,13.000000l0.000000,-2.000000l2.000000,0.000000c0.600000,0.000000 1.000000,-0.400000 1.000000,-1.000000L10.000000,8.000000l2.000000,0.000000c1.100000,0.000000 2.000000,-0.900000 2.000000,-2.000000L14.000000,3.500000C13.100000,3.200000 12.000000,3.000000 11.000000,3.000000C5.500000,3.000000 1.000000,7.500000 1.000000,13.000000c0.000000,5.500000 4.500000,10.000000 10.000000,10.000000c5.500000,0.000000 10.000000,-4.500000 10.000000,-10.000000c0.000000,-0.300000 0.000000,-0.700000 -0.100000,-1.000000L18.900000,12.000000zM10.000000,20.900000c-3.900000,-0.500000 -7.000000,-3.900000 -7.000000,-7.900000c0.000000,-0.600000 0.100000,-1.200000 0.200000,-1.800000L8.000000,16.000000l0.000000,1.000000c0.000000,1.100000 0.900000,2.000000 2.000000,2.000000L10.000000,20.900000z"/>
+ android:pathData="M12.700000,10.000000c-0.800000,-2.300000 -3.000000,-4.000000 -5.700000,-4.000000c-3.300000,0.000000 -6.000000,2.700000 -6.000000,6.000000s2.700000,6.000000 6.000000,6.000000c2.600000,0.000000 4.800000,-1.700000 5.700000,-4.000000L17.000000,14.000000l0.000000,4.000000l4.000000,0.000000l0.000000,-4.000000l2.000000,0.000000l0.000000,-4.000000L12.700000,10.000000zM7.000000,14.000000c-1.100000,0.000000 -2.000000,-0.900000 -2.000000,-2.000000c0.000000,-1.100000 0.900000,-2.000000 2.000000,-2.000000s2.000000,0.900000 2.000000,2.000000C9.000000,13.100000 8.100000,14.000000 7.000000,14.000000z"/>
</vector>
diff --git a/packages/SystemUI/res/layout/super_status_bar.xml b/packages/SystemUI/res/layout/super_status_bar.xml
index 365a7d2..09e541f 100644
--- a/packages/SystemUI/res/layout/super_status_bar.xml
+++ b/packages/SystemUI/res/layout/super_status_bar.xml
@@ -38,7 +38,9 @@
android:layout_height="match_parent"
android:elevation="2dp"
android:background="@drawable/brightness_mirror_background">
- <include layout="@layout/quick_settings_brightness_dialog" />
+ <include layout="@layout/quick_settings_brightness_dialog"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" />
</FrameLayout>
</FrameLayout>
diff --git a/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java b/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java
index fb77751..5390daf 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java
@@ -71,6 +71,8 @@
public class SystemServicesProxy {
final static String TAG = "SystemServicesProxy";
+ final static BitmapFactory.Options sBitmapOptions;
+
ActivityManager mAm;
IActivityManager mIam;
AppWidgetManager mAwm;
@@ -89,6 +91,11 @@
Paint mBgProtectionPaint;
Canvas mBgProtectionCanvas;
+ static {
+ sBitmapOptions = new BitmapFactory.Options();
+ sBitmapOptions.inMutable = true;
+ }
+
/** Private constructor */
public SystemServicesProxy(Context context) {
mAm = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
@@ -258,7 +265,8 @@
Bitmap thumbnail = taskThumbnail.mainThumbnail;
ParcelFileDescriptor descriptor = taskThumbnail.thumbnailFileDescriptor;
if (thumbnail == null && descriptor != null) {
- thumbnail = BitmapFactory.decodeFileDescriptor(descriptor.getFileDescriptor());
+ thumbnail = BitmapFactory.decodeFileDescriptor(descriptor.getFileDescriptor(),
+ null, sBitmapOptions);
}
if (descriptor != null) {
try {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
index 53bdcbf..3a20b00 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
@@ -1183,7 +1183,10 @@
icon.setImageDrawable(iconDrawable);
if (mNotificationColorUtil.isGrayscale(iconDrawable)) {
icon.setBackgroundResource(
- com.android.internal.R.drawable.notification_icon_legacy_bg_inset);
+ com.android.internal.R.drawable.notification_icon_legacy_bg);
+ int padding = mContext.getResources().getDimensionPixelSize(
+ com.android.internal.R.dimen.notification_large_icon_circle_padding);
+ icon.setPadding(padding, padding, padding, padding);
}
if (profileIcon != null) {
@@ -1214,6 +1217,11 @@
R.style.TextAppearance_StatusBar_Material_EventContent_Parenthetical);
}
+ int topPadding = Notification.Builder.calculateTopPadding(mContext,
+ false /* hasThreeLines */,
+ mContext.getResources().getConfiguration().fontScale);
+ title.setPadding(0, topPadding, 0, 0);
+
entry.autoRedacted = true;
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java
index d53aa47..735fbfc 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java
@@ -158,8 +158,9 @@
picture = BitmapHelper.createCircularClip(
picture, avatarSize, avatarSize);
}
- records.add(new UserRecord(info, picture, false /* isGuest */, isCurrent,
- false /* isAddUser */, false /* isRestricted */));
+ int index = isCurrent ? 0 : records.size();
+ records.add(index, new UserRecord(info, picture, false /* isGuest */,
+ isCurrent, false /* isAddUser */, false /* isRestricted */));
}
}
@@ -182,7 +183,8 @@
false /* isAddUser */, createIsRestricted));
}
} else {
- records.add(guestRecord);
+ int index = guestRecord.isCurrent ? 0 : records.size();
+ records.add(index, guestRecord);
}
}
diff --git a/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java b/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
index c6aa30b..f1e99fd 100644
--- a/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
+++ b/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
@@ -1539,7 +1539,7 @@
widget.views = views;
}
- scheduleNotifyUpdateAppWidgetLocked(widget);
+ scheduleNotifyUpdateAppWidgetLocked(widget, views);
}
}
@@ -1611,7 +1611,7 @@
}
}
- private void scheduleNotifyUpdateAppWidgetLocked(Widget widget) {
+ private void scheduleNotifyUpdateAppWidgetLocked(Widget widget, RemoteViews updateViews) {
if (widget == null || widget.provider == null || widget.provider.zombie
|| widget.host.callbacks == null || widget.host.zombie) {
return;
@@ -1620,7 +1620,7 @@
SomeArgs args = SomeArgs.obtain();
args.arg1 = widget.host;
args.arg2 = widget.host.callbacks;
- args.arg3 = widget.views;
+ args.arg3 = updateViews;
args.argi1 = widget.appWidgetId;
mCallbackHandler.obtainMessage(
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java
index 8914728..1005bd7 100644
--- a/services/core/java/com/android/server/ConnectivityService.java
+++ b/services/core/java/com/android/server/ConnectivityService.java
@@ -2850,11 +2850,13 @@
enforceConnectivityInternalPermission();
if (TextUtils.isEmpty(iface)) return ConnectivityManager.TYPE_NONE;
- for (NetworkStateTracker tracker : mNetTrackers) {
- if (tracker != null) {
- LinkProperties lp = tracker.getLinkProperties();
- if (lp != null && iface.equals(lp.getInterfaceName())) {
- return tracker.getNetworkInfo().getType();
+
+ synchronized(mNetworkForNetId) {
+ for (int i = 0; i < mNetworkForNetId.size(); i++) {
+ NetworkAgentInfo nai = mNetworkForNetId.valueAt(i);
+ LinkProperties lp = nai.linkProperties;
+ if (lp != null && iface.equals(lp.getInterfaceName()) && nai.networkInfo != null) {
+ return nai.networkInfo.getType();
}
}
}
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index b1d84f58..f36f25f 100755
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -40,6 +40,9 @@
import android.app.usage.UsageEvents;
import android.app.usage.UsageStatsManagerInternal;
import android.appwidget.AppWidgetManager;
+import android.content.res.Resources;
+import android.graphics.Bitmap;
+import android.graphics.Point;
import android.graphics.Rect;
import android.os.BatteryStats;
import android.os.PersistableBundle;
@@ -261,6 +264,7 @@
static final boolean DEBUG_VISBILITY = localLOGV || false;
static final boolean DEBUG_PSS = localLOGV || false;
static final boolean DEBUG_LOCKSCREEN = localLOGV || false;
+ static final boolean DEBUG_RECENTS = localLOGV || false;
static final boolean VALIDATE_TOKENS = false;
static final boolean SHOW_ACTIVITY_START_TIME = true;
@@ -410,6 +414,21 @@
ArrayList<TaskRecord> mRecentTasks;
ArraySet<TaskRecord> mTmpRecents = new ArraySet<TaskRecord>();
+ /**
+ * For addAppTask: cached of the last activity component that was added.
+ */
+ ComponentName mLastAddedTaskComponent;
+
+ /**
+ * For addAppTask: cached of the last activity uid that was added.
+ */
+ int mLastAddedTaskUid;
+
+ /**
+ * For addAppTask: cached of the last ActivityInfo that was added.
+ */
+ ActivityInfo mLastAddedTaskActivity;
+
public class PendingAssistExtras extends Binder implements Runnable {
public final ActivityRecord activity;
public boolean haveResult = false;
@@ -1181,6 +1200,9 @@
/** Flag whether the device has a recents UI */
final boolean mHasRecents;
+ final int mThumbnailWidth;
+ final int mThumbnailHeight;
+
final ServiceThread mHandlerThread;
final MainHandler mHandler;
@@ -1819,6 +1841,7 @@
BatteryStats.HistoryItem.EVENT_USER_FOREGROUND_START,
Integer.toString(msg.arg1), msg.arg1);
mSystemServiceManager.switchUser(msg.arg1);
+ mLockToAppRequest.clearPrompt();
break;
}
case ENTER_ANIMATION_COMPLETE_MSG: {
@@ -2229,8 +2252,10 @@
mConfigurationSeq = mConfiguration.seq = 1;
mProcessCpuTracker.init();
- mHasRecents = mContext.getResources().getBoolean(
- com.android.internal.R.bool.config_hasRecents);
+ final Resources res = mContext.getResources();
+ mHasRecents = res.getBoolean(com.android.internal.R.bool.config_hasRecents);
+ mThumbnailWidth = res.getDimensionPixelSize(com.android.internal.R.dimen.thumbnail_width);
+ mThumbnailHeight = res.getDimensionPixelSize(com.android.internal.R.dimen.thumbnail_height);
mCompatModePackages = new CompatModePackages(this, systemDir, mHandler);
mIntentFirewall = new IntentFirewall(new IntentFirewallInterface(), mHandler);
@@ -3481,7 +3506,8 @@
try {
int ret = mStackSupervisor.startActivityMayWait(null, targetUid, targetPackage, intent,
resolvedType, null, null, resultTo, resultWho, requestCode, startFlags,
- null, null, null, null, options, UserHandle.getUserId(targetUid), null);
+ null, null, null, null, options, UserHandle.getUserId(sourceRecord.app.uid),
+ null);
return ret;
} catch (SecurityException e) {
// XXX need to figure out how to propagate to original app.
@@ -3781,7 +3807,7 @@
}
final void addRecentTaskLocked(TaskRecord task) {
- int N = mRecentTasks.size();
+ final int N = mRecentTasks.size();
// Quick case: check if the top-most recent task is the same.
if (N > 0 && mRecentTasks.get(0) == task) {
return;
@@ -3790,10 +3816,25 @@
if (task.voiceSession != null) {
return;
}
- // Remove any existing entries that are the same kind of task.
+
+ trimRecentsForTask(task, true);
+
+ if (N >= MAX_RECENT_TASKS) {
+ final TaskRecord tr = mRecentTasks.remove(N - 1);
+ tr.disposeThumbnail();
+ tr.closeRecentsChain();
+ }
+ mRecentTasks.add(0, task);
+ }
+
+ /**
+ * If needed, remove oldest existing entries in recents that are for the same kind
+ * of task as the given one.
+ */
+ int trimRecentsForTask(TaskRecord task, boolean doTrim) {
+ int N = mRecentTasks.size();
final Intent intent = task.intent;
final boolean document = intent != null && intent.isDocument();
- final ComponentName comp = intent.getComponent();
int maxRecents = task.maxRecents - 1;
for (int i=0; i<N; i++) {
@@ -3825,6 +3866,12 @@
}
}
+ if (!doTrim) {
+ // If the caller is not actually asking for a trim, just tell them we reached
+ // a point where the trim would happen.
+ return i;
+ }
+
// Either task and tr are the same or, their affinities match or their intents match
// and neither of them is a document, or they are documents using the same activity
// and their maxRecents has been reached.
@@ -3842,12 +3889,8 @@
}
notifyTaskPersisterLocked(tr, false);
}
- if (N >= MAX_RECENT_TASKS) {
- final TaskRecord tr = mRecentTasks.remove(N - 1);
- tr.disposeThumbnail();
- tr.closeRecentsChain();
- }
- mRecentTasks.add(0, task);
+
+ return -1;
}
@Override
@@ -7639,7 +7682,10 @@
for (int i=0; i<N && maxNum > 0; i++) {
TaskRecord tr = mRecentTasks.get(i);
// Only add calling user or related users recent tasks
- if (!includedUsers.contains(Integer.valueOf(tr.userId))) continue;
+ if (!includedUsers.contains(Integer.valueOf(tr.userId))) {
+ if (DEBUG_RECENTS) Slog.d(TAG, "Skipping, not user: " + tr);
+ continue;
+ }
// Return the entry if desired by the caller. We always return
// the first entry, because callers always expect this to be the
@@ -7656,11 +7702,14 @@
// If the caller doesn't have the GET_TASKS permission, then only
// allow them to see a small subset of tasks -- their own and home.
if (!tr.isHomeTask() && tr.creatorUid != callingUid) {
+ if (DEBUG_RECENTS) Slog.d(TAG, "Skipping, not allowed: " + tr);
continue;
}
}
if (tr.autoRemoveRecents && tr.getTopActivity() == null) {
// Don't include auto remove tasks that are finished or finishing.
+ if (DEBUG_RECENTS) Slog.d(TAG, "Skipping, auto-remove without activity: "
+ + tr);
continue;
}
@@ -7675,11 +7724,15 @@
if (rti.origActivity != null) {
if (pm.getActivityInfo(rti.origActivity, 0, userId)
== null) {
+ if (DEBUG_RECENTS) Slog.d(TAG, "Skipping, unavail orig act: "
+ + tr);
continue;
}
} else if (rti.baseIntent != null) {
if (pm.queryIntentActivities(rti.baseIntent,
null, 0, userId) == null) {
+ if (DEBUG_RECENTS) Slog.d(TAG, "Skipping, unavail intent: "
+ + tr);
continue;
}
}
@@ -7721,6 +7774,97 @@
}
@Override
+ public int addAppTask(IBinder activityToken, Intent intent,
+ ActivityManager.TaskDescription description, Bitmap thumbnail) throws RemoteException {
+ final int callingUid = Binder.getCallingUid();
+ final long callingIdent = Binder.clearCallingIdentity();
+
+ try {
+ synchronized (this) {
+ ActivityRecord r = ActivityRecord.isInStackLocked(activityToken);
+ if (r == null) {
+ throw new IllegalArgumentException("Activity does not exist; token="
+ + activityToken);
+ }
+ ComponentName comp = intent.getComponent();
+ if (comp == null) {
+ throw new IllegalArgumentException("Intent " + intent
+ + " must specify explicit component");
+ }
+ if (thumbnail.getWidth() != mThumbnailWidth
+ || thumbnail.getHeight() != mThumbnailHeight) {
+ throw new IllegalArgumentException("Bad thumbnail size: got "
+ + thumbnail.getWidth() + "x" + thumbnail.getHeight() + ", require "
+ + mThumbnailWidth + "x" + mThumbnailHeight);
+ }
+ if (intent.getSelector() != null) {
+ intent.setSelector(null);
+ }
+ if (intent.getSourceBounds() != null) {
+ intent.setSourceBounds(null);
+ }
+ if ((intent.getFlags()&Intent.FLAG_ACTIVITY_NEW_DOCUMENT) != 0) {
+ if ((intent.getFlags()&Intent.FLAG_ACTIVITY_RETAIN_IN_RECENTS) == 0) {
+ // The caller has added this as an auto-remove task... that makes no
+ // sense, so turn off auto-remove.
+ intent.addFlags(Intent.FLAG_ACTIVITY_RETAIN_IN_RECENTS);
+ }
+ } else if ((intent.getFlags()&Intent.FLAG_ACTIVITY_NEW_TASK) != 0) {
+ // Must be a new task.
+ intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ }
+ if (!comp.equals(mLastAddedTaskComponent) || callingUid != mLastAddedTaskUid) {
+ mLastAddedTaskActivity = null;
+ }
+ ActivityInfo ainfo = mLastAddedTaskActivity;
+ if (ainfo == null) {
+ ainfo = mLastAddedTaskActivity = AppGlobals.getPackageManager().getActivityInfo(
+ comp, 0, UserHandle.getUserId(callingUid));
+ if (ainfo.applicationInfo.uid != callingUid) {
+ throw new SecurityException(
+ "Can't add task for another application: target uid="
+ + ainfo.applicationInfo.uid + ", calling uid=" + callingUid);
+ }
+ }
+
+ TaskRecord task = new TaskRecord(this, mStackSupervisor.getNextTaskId(), ainfo,
+ intent, description);
+
+ int trimIdx = trimRecentsForTask(task, false);
+ if (trimIdx >= 0) {
+ // If this would have caused a trim, then we'll abort because that
+ // means it would be added at the end of the list but then just removed.
+ return -1;
+ }
+
+ final int N = mRecentTasks.size();
+ if (N >= (MAX_RECENT_TASKS-1)) {
+ final TaskRecord tr = mRecentTasks.remove(N - 1);
+ tr.disposeThumbnail();
+ tr.closeRecentsChain();
+ }
+
+ mRecentTasks.add(task);
+ r.task.stack.addTask(task, false, false);
+
+ task.setLastThumbnail(thumbnail);
+ task.freeLastThumbnail();
+
+ return task.taskId;
+ }
+ } finally {
+ Binder.restoreCallingIdentity(callingIdent);
+ }
+ }
+
+ @Override
+ public Point getAppTaskThumbnailSize() {
+ synchronized (this) {
+ return new Point(mThumbnailWidth, mThumbnailHeight);
+ }
+ }
+
+ @Override
public void setTaskDescription(IBinder token, ActivityManager.TaskDescription td) {
synchronized (this) {
ActivityRecord r = ActivityRecord.isInStackLocked(token);
@@ -18056,14 +18200,16 @@
mCallingUid = callingUid;
}
+ private void checkCaller() {
+ if (mCallingUid != Binder.getCallingUid()) {
+ throw new SecurityException("Caller " + mCallingUid
+ + " does not match caller of getAppTasks(): " + Binder.getCallingUid());
+ }
+ }
+
@Override
public void finishAndRemoveTask() {
- // Ensure that we are called from the same process that created this AppTask
- if (mCallingUid != Binder.getCallingUid()) {
- Slog.w(TAG, "finishAndRemoveTask: caller " + mCallingUid
- + " does not match caller of getAppTasks(): " + Binder.getCallingUid());
- return;
- }
+ checkCaller();
synchronized (ActivityManagerService.this) {
long origId = Binder.clearCallingIdentity();
@@ -18085,12 +18231,7 @@
@Override
public ActivityManager.RecentTaskInfo getTaskInfo() {
- // Ensure that we are called from the same process that created this AppTask
- if (mCallingUid != Binder.getCallingUid()) {
- Slog.w(TAG, "finishAndRemoveTask: caller " + mCallingUid
- + " does not match caller of getAppTasks(): " + Binder.getCallingUid());
- return null;
- }
+ checkCaller();
synchronized (ActivityManagerService.this) {
long origId = Binder.clearCallingIdentity();
@@ -18105,5 +18246,28 @@
return null;
}
}
+
+ @Override
+ public void setExcludeFromRecents(boolean exclude) {
+ checkCaller();
+
+ synchronized (ActivityManagerService.this) {
+ long origId = Binder.clearCallingIdentity();
+ try {
+ TaskRecord tr = recentTaskForIdLocked(mTaskId);
+ if (tr != null) {
+ Intent intent = tr.getBaseIntent();
+ if (exclude) {
+ intent.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
+ } else {
+ intent.setFlags(intent.getFlags()
+ & ~Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
+ }
+ }
+ } finally {
+ Binder.restoreCallingIdentity(origId);
+ }
+ }
+ }
}
}
diff --git a/services/core/java/com/android/server/am/ActivityRecord.java b/services/core/java/com/android/server/am/ActivityRecord.java
index abacb2d..24b7cb3 100755
--- a/services/core/java/com/android/server/am/ActivityRecord.java
+++ b/services/core/java/com/android/server/am/ActivityRecord.java
@@ -1054,8 +1054,8 @@
return null;
}
- private static String createImageFilename(ActivityRecord r, int taskId) {
- return String.valueOf(taskId) + ACTIVITY_ICON_SUFFIX + r.createTime +
+ private static String createImageFilename(long createTime, int taskId) {
+ return String.valueOf(taskId) + ACTIVITY_ICON_SUFFIX + createTime +
TaskPersister.IMAGE_EXTENSION;
}
@@ -1072,7 +1072,7 @@
out.attribute(null, ATTR_USERID, String.valueOf(userId));
if (taskDescription != null) {
- task.saveTaskDescription(taskDescription, createImageFilename(this, task.taskId),
+ task.saveTaskDescription(taskDescription, createImageFilename(createTime, task.taskId),
out);
}
@@ -1165,7 +1165,8 @@
r.persistentState = persistentState;
if (createTime >= 0) {
- taskDescription.setIcon(TaskPersister.restoreImage(createImageFilename(r, taskId)));
+ taskDescription.setIcon(TaskPersister.restoreImage(createImageFilename(createTime,
+ taskId)));
}
r.taskDescription = taskDescription;
r.createTime = createTime;
diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java
index e309a03..5ad84d4 100755
--- a/services/core/java/com/android/server/am/ActivityStack.java
+++ b/services/core/java/com/android/server/am/ActivityStack.java
@@ -355,8 +355,8 @@
mCurrentUser = mService.mCurrentUserId;
// Get the activity screenshot thumbnail dimensions
Resources res = mService.mContext.getResources();
- mThumbnailWidth = res.getDimensionPixelSize(com.android.internal.R.dimen.thumbnail_width);
- mThumbnailHeight = res.getDimensionPixelSize(com.android.internal.R.dimen.thumbnail_height);
+ mThumbnailWidth = mService.mThumbnailWidth;
+ mThumbnailHeight = mService.mThumbnailHeight;
}
/**
diff --git a/services/core/java/com/android/server/am/LockTaskNotify.java b/services/core/java/com/android/server/am/LockTaskNotify.java
index cf65243..5768ddb 100644
--- a/services/core/java/com/android/server/am/LockTaskNotify.java
+++ b/services/core/java/com/android/server/am/LockTaskNotify.java
@@ -34,6 +34,7 @@
private final Context mContext;
private final H mHandler;
private AccessibilityManager mAccessibilityManager;
+ private Toast mLastToast;
public LockTaskNotify(Context context) {
mContext = context;
@@ -52,7 +53,11 @@
if (!isLocked && mAccessibilityManager.isEnabled()) {
text = mContext.getString(R.string.lock_to_app_toast_accessible);
}
- Toast.makeText(mContext, text, Toast.LENGTH_LONG).show();
+ if (mLastToast != null) {
+ mLastToast.cancel();
+ }
+ mLastToast = Toast.makeText(mContext, text, Toast.LENGTH_LONG);
+ mLastToast.show();
}
public void show(boolean starting) {
diff --git a/services/core/java/com/android/server/am/LockToAppRequestDialog.java b/services/core/java/com/android/server/am/LockToAppRequestDialog.java
index 12dcf7e..a1eb31e 100644
--- a/services/core/java/com/android/server/am/LockToAppRequestDialog.java
+++ b/services/core/java/com/android/server/am/LockToAppRequestDialog.java
@@ -74,11 +74,15 @@
return 0;
}
- public void showLockTaskPrompt(TaskRecord task) {
+ public void clearPrompt() {
if (mDialog != null) {
mDialog.dismiss();
mDialog = null;
}
+ }
+
+ public void showLockTaskPrompt(TaskRecord task) {
+ clearPrompt();
mRequestedTask = task;
final int unlockStringId = getLockString(task.userId);
@@ -97,13 +101,14 @@
mDialog = builder.create();
mDialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
+ mDialog.getWindow().getAttributes().privateFlags |=
+ WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS;
mDialog.show();
if (unlockStringId != 0) {
String unlockString = mContext.getString(unlockStringId);
mCheckbox = (CheckBox) mDialog.findViewById(R.id.lock_to_app_checkbox);
- mCheckbox.setText(mContext.getString(R.string.lock_to_app_use_screen_lock,
- unlockString));
+ mCheckbox.setText(unlockString);
// Remember state.
try {
diff --git a/services/core/java/com/android/server/am/TaskRecord.java b/services/core/java/com/android/server/am/TaskRecord.java
index ccca657..2a8c6fb 100644
--- a/services/core/java/com/android/server/am/TaskRecord.java
+++ b/services/core/java/com/android/server/am/TaskRecord.java
@@ -167,6 +167,34 @@
setIntent(_intent, info);
}
+ TaskRecord(ActivityManagerService service, int _taskId, ActivityInfo info, Intent _intent,
+ ActivityManager.TaskDescription _taskDescription) {
+ mService = service;
+ mFilename = String.valueOf(_taskId) + TASK_THUMBNAIL_SUFFIX +
+ TaskPersister.IMAGE_EXTENSION;
+ mLastThumbnailFile = new File(TaskPersister.sImagesDir, mFilename);
+ taskId = _taskId;
+ mAffiliatedTaskId = _taskId;
+ voiceSession = null;
+ voiceInteractor = null;
+ mActivities = new ArrayList<ActivityRecord>();
+ setIntent(_intent, info);
+
+ taskType = ActivityRecord.APPLICATION_ACTIVITY_TYPE;
+ isPersistable = true;
+ mCallingUid = info.applicationInfo.uid;
+ mCallingPackage = info.packageName;
+ // Clamp to [1, 100].
+ maxRecents = Math.min(Math.max(info.maxRecents, 1), 100);
+
+ taskType = APPLICATION_ACTIVITY_TYPE;
+ mTaskToReturnTo = HOME_ACTIVITY_TYPE;
+ userId = UserHandle.getUserId(info.applicationInfo.uid);
+ lastTaskDescription = _taskDescription;
+ mCallingUid = info.applicationInfo.uid;
+ mCallingPackage = info.packageName;
+ }
+
TaskRecord(ActivityManagerService service, int _taskId, Intent _intent, Intent _affinityIntent,
String _affinity, ComponentName _realActivity, ComponentName _origActivity,
boolean _rootWasReset, boolean _autoRemoveRecents, boolean _askedCompatMode,
@@ -764,8 +792,13 @@
return true;
}
+ private static String createLastTaskDescriptionIconFilename(int taskId, long lastActiveTime) {
+ return String.valueOf(taskId) + LAST_ACTIVITY_ICON_SUFFIX + lastActiveTime +
+ TaskPersister.IMAGE_EXTENSION;
+ }
+
void saveToXml(XmlSerializer out) throws IOException, XmlPullParserException {
- Slog.i(TAG, "Saving task=" + this);
+ if (ActivityManagerService.DEBUG_RECENTS) Slog.i(TAG, "Saving task=" + this);
out.attribute(null, ATTR_TASKID, String.valueOf(taskId));
if (realActivity != null) {
@@ -790,8 +823,8 @@
out.attribute(null, ATTR_LASTDESCRIPTION, lastDescription.toString());
}
if (lastTaskDescription != null) {
- saveTaskDescription(lastTaskDescription, String.valueOf(taskId) +
- LAST_ACTIVITY_ICON_SUFFIX + lastActiveTime, out);
+ saveTaskDescription(lastTaskDescription, createLastTaskDescriptionIconFilename(taskId,
+ lastActiveTime), out);
}
out.attribute(null, ATTR_TASK_AFFILIATION_COLOR, String.valueOf(mAffiliatedTaskColor));
out.attribute(null, ATTR_TASK_AFFILIATION, String.valueOf(mAffiliatedTaskId));
@@ -933,8 +966,8 @@
}
if (lastActiveTime >= 0) {
- taskDescription.setIcon(TaskPersister.restoreImage(String.valueOf(taskId) +
- LAST_ACTIVITY_ICON_SUFFIX + lastActiveTime + TaskPersister.IMAGE_EXTENSION));
+ taskDescription.setIcon(TaskPersister.restoreImage(
+ createLastTaskDescriptionIconFilename(taskId, lastActiveTime)));
}
final TaskRecord task = new TaskRecord(stackSupervisor.mService, taskId, intent,
@@ -948,18 +981,15 @@
activities.get(activityNdx).task = task;
}
- Slog.i(TAG, "Restored task=" + task);
+ if (ActivityManagerService.DEBUG_RECENTS) Slog.d(TAG, "Restored task=" + task);
return task;
}
void dump(PrintWriter pw, String prefix) {
- if (rootWasReset || userId != 0 || numFullscreen != 0) {
- pw.print(prefix); pw.print(" rootWasReset="); pw.print(rootWasReset);
- pw.print(" userId="); pw.print(userId);
- pw.print(" taskType="); pw.print(taskType);
- pw.print(" numFullscreen="); pw.print(numFullscreen);
- pw.print(" mTaskToReturnTo="); pw.println(mTaskToReturnTo);
- }
+ pw.print(prefix); pw.print("userId="); pw.print(userId);
+ pw.print(" creatorUid="); pw.print(creatorUid);
+ pw.print(" mCallingUid="); pw.print(mCallingUid);
+ pw.print(" mCallingPackage="); pw.println(mCallingPackage);
if (affinity != null) {
pw.print(prefix); pw.print("affinity="); pw.println(affinity);
}
@@ -991,6 +1021,17 @@
pw.print(prefix); pw.print("realActivity=");
pw.println(realActivity.flattenToShortString());
}
+ if (autoRemoveRecents || taskType != 0 || mTaskToReturnTo != 0 || numFullscreen != 0) {
+ pw.print(prefix); pw.print("autoRemoveRecents="); pw.print(autoRemoveRecents);
+ pw.print(" numFullscreen="); pw.print(numFullscreen);
+ pw.print(" taskType="); pw.print(taskType);
+ pw.print(" mTaskToReturnTo="); pw.println(mTaskToReturnTo);
+ }
+ if (rootWasReset || mNeverRelinquishIdentity || mReuseTask) {
+ pw.print(prefix); pw.print("rootWasReset="); pw.print(rootWasReset);
+ pw.print(" mNeverRelinquishIdentity="); pw.print(mNeverRelinquishIdentity);
+ pw.print(" mReuseTask="); pw.println(mReuseTask);
+ }
pw.print(prefix); pw.print("Activities="); pw.println(mActivities);
if (!askedCompatMode) {
pw.print(prefix); pw.print("askedCompatMode="); pw.println(askedCompatMode);
diff --git a/services/core/java/com/android/server/connectivity/NetworkMonitor.java b/services/core/java/com/android/server/connectivity/NetworkMonitor.java
index b09298c..ddd0865 100644
--- a/services/core/java/com/android/server/connectivity/NetworkMonitor.java
+++ b/services/core/java/com/android/server/connectivity/NetworkMonitor.java
@@ -769,6 +769,7 @@
latencyBroadcast.putExtra(EXTRA_IS_CAPTIVE_PORTAL, isCaptivePortal);
latencyBroadcast.putExtra(EXTRA_RESPONSE_TIMESTAMP_MS, responseTimestampMs);
}
- mContext.sendBroadcast(latencyBroadcast, PERMISSION_ACCESS_NETWORK_CONDITIONS);
+ mContext.sendBroadcastAsUser(latencyBroadcast, UserHandle.CURRENT,
+ PERMISSION_ACCESS_NETWORK_CONDITIONS);
}
}
diff --git a/services/core/java/com/android/server/hdmi/HdmiCecLocalDevice.java b/services/core/java/com/android/server/hdmi/HdmiCecLocalDevice.java
index b43ad1b..a12e4fc 100644
--- a/services/core/java/com/android/server/hdmi/HdmiCecLocalDevice.java
+++ b/services/core/java/com/android/server/hdmi/HdmiCecLocalDevice.java
@@ -691,6 +691,7 @@
mActiveSource.logicalAddress = logicalAddress;
mActiveSource.physicalAddress = physicalAddress;
}
+ mService.setLastInputForMhl(Constants.INVALID_PORT_ID);
}
int getActivePath() {
diff --git a/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java b/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java
index 73f5cfd..a231945 100644
--- a/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java
+++ b/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java
@@ -314,7 +314,7 @@
HdmiCecMessageBuilder.buildRoutingChange(mAddress, oldPath, newPath);
mService.sendCecCommand(routingChange);
removeAction(RoutingControlAction.class);
- addAndStartAction(new RoutingControlAction(this, newPath, false, callback));
+ addAndStartAction(new RoutingControlAction(this, newPath, true, callback));
}
int getPowerStatus() {
diff --git a/services/core/java/com/android/server/hdmi/HdmiControlService.java b/services/core/java/com/android/server/hdmi/HdmiControlService.java
index 5b99f14..888ceec3 100644
--- a/services/core/java/com/android/server/hdmi/HdmiControlService.java
+++ b/services/core/java/com/android/server/hdmi/HdmiControlService.java
@@ -243,6 +243,9 @@
// Map from port ID to HdmiPortInfo.
private UnmodifiableSparseArray<HdmiPortInfo> mPortInfoMap;
+ // Map from port ID to HdmiDeviceInfo.
+ private UnmodifiableSparseArray<HdmiDeviceInfo> mPortDeviceMap;
+
private HdmiCecMessageValidator mMessageValidator;
private final HdmiControlBroadcastReceiver
@@ -263,6 +266,12 @@
@ServiceThreadOnly
private int mActivePortId = Constants.INVALID_PORT_ID;
+ // Last input port before switching to the MHL port by way of incoming request RAP[ContentOn].
+ // Should switch back to this port when the device sends RAP[ContentOff].
+ // Gets invalidated if we go to other port/input.
+ @ServiceThreadOnly
+ private int mLastInputMhl = Constants.INVALID_PORT_ID;
+
public HdmiControlService(Context context) {
super(context);
mLocalDevices = getIntList(SystemProperties.get(Constants.PROPERTY_DEVICE_TYPE));
@@ -474,12 +483,15 @@
SparseArray<HdmiPortInfo> portInfoMap = new SparseArray<>();
SparseIntArray portIdMap = new SparseIntArray();
+ SparseArray<HdmiDeviceInfo> portDeviceMap = new SparseArray<>();
for (HdmiPortInfo info : cecPortInfo) {
portIdMap.put(info.getAddress(), info.getId());
portInfoMap.put(info.getId(), info);
+ portDeviceMap.put(info.getId(), new HdmiDeviceInfo(info.getAddress(), info.getId()));
}
mPortIdMap = new UnmodifiableSparseIntArray(portIdMap);
mPortInfoMap = new UnmodifiableSparseArray<>(portInfoMap);
+ mPortDeviceMap = new UnmodifiableSparseArray<>(portDeviceMap);
if (mMhlController == null) {
mPortInfo = Collections.unmodifiableList(Arrays.asList(cecPortInfo));
@@ -1020,6 +1032,10 @@
if (mMhlController != null) {
HdmiMhlLocalDevice device = mMhlController.getLocalDeviceById(deviceId);
if (device != null) {
+ if (device.getPortId() == tv.getActivePortId()) {
+ invokeCallback(callback, HdmiControlManager.RESULT_SUCCESS);
+ return;
+ }
// Upon selecting MHL device, we send RAP[Content On] to wake up
// the connected mobile device, start routing control to switch ports.
// callback is handled by MHL action.
@@ -1838,9 +1854,60 @@
void setActivePortId(int portId) {
assertRunOnServiceThread();
mActivePortId = portId;
+
+ // Resets last input for MHL, which stays valid only after the MHL device was selected,
+ // and no further switching is done.
+ setLastInputForMhl(Constants.INVALID_PORT_ID);
}
- void setMhlInputChangeEnabled(boolean enabled) {
+ @ServiceThreadOnly
+ void setLastInputForMhl(int portId) {
+ assertRunOnServiceThread();
+ mLastInputMhl = portId;
+ }
+
+ @ServiceThreadOnly
+ int getLastInputForMhl() {
+ assertRunOnServiceThread();
+ return mLastInputMhl;
+ }
+
+ /**
+ * Performs input change, routing control for MHL device.
+ *
+ * @param portId MHL port, or the last port to go back to if {@code contentOn} is false
+ * @param contentOn {@code true} if RAP data is content on; otherwise false
+ */
+ @ServiceThreadOnly
+ void changeInputForMhl(int portId, boolean contentOn) {
+ assertRunOnServiceThread();
+ final int lastInput = contentOn ? tv().getActivePortId() : Constants.INVALID_PORT_ID;
+ tv().doManualPortSwitching(portId, new IHdmiControlCallback.Stub() {
+ @Override
+ public void onComplete(int result) throws RemoteException {
+ // Keep the last input to switch back later when RAP[ContentOff] is received.
+ // This effectively sets the port to invalid one if the switching is for
+ // RAP[ContentOff].
+ setLastInputForMhl(lastInput);
+ }
+ });
+
+ // MHL device is always directly connected to the port. Update the active port ID to avoid
+ // unnecessary post-routing control task.
+ tv().setActivePortId(portId);
+
+ // The port is either the MHL-enabled port where the mobile device is connected, or
+ // the last port to go back to when RAP[ContentOff] is received. Note that the last port
+ // may not be the MHL-enabled one. In this case the device info to be passed to
+ // input change listener should be the one describing the corresponding HDMI port.
+ HdmiMhlLocalDevice device = mMhlController.getLocalDevice(portId);
+ HdmiDeviceInfo info = (device != null && device.getInfo() != null)
+ ? device.getInfo()
+ : mPortDeviceMap.get(portId);
+ invokeInputChangeListener(info);
+ }
+
+ void setMhlInputChangeEnabled(boolean enabled) {
if (mMhlController != null) {
mMhlController.setOption(OPTION_MHL_INPUT_SWITCHING, toInt(enabled));
}
diff --git a/services/core/java/com/android/server/job/JobSchedulerService.java b/services/core/java/com/android/server/job/JobSchedulerService.java
index 14457ec..6771cce 100644
--- a/services/core/java/com/android/server/job/JobSchedulerService.java
+++ b/services/core/java/com/android/server/job/JobSchedulerService.java
@@ -162,6 +162,7 @@
JobStatus jobStatus = new JobStatus(job, uId);
cancelJob(uId, job.getId());
startTrackingJob(jobStatus);
+ mHandler.obtainMessage(MSG_CHECK_JOB).sendToTarget();
return JobScheduler.RESULT_SUCCESS;
}
@@ -507,7 +508,9 @@
case MSG_JOB_EXPIRED:
synchronized (mJobs) {
JobStatus runNow = (JobStatus) message.obj;
- if (!mPendingJobs.contains(runNow)) {
+ // runNow can be null, which is a controller's way of indicating that its
+ // state is such that all ready jobs should be run immediately.
+ if (runNow != null && !mPendingJobs.contains(runNow)) {
mPendingJobs.add(runNow);
}
}
diff --git a/services/core/java/com/android/server/job/StateChangedListener.java b/services/core/java/com/android/server/job/StateChangedListener.java
index 90c203a..97dfad3 100644
--- a/services/core/java/com/android/server/job/StateChangedListener.java
+++ b/services/core/java/com/android/server/job/StateChangedListener.java
@@ -33,7 +33,8 @@
/**
* Called by the controller to notify the JobManager that regardless of the state of the task,
* it must be run immediately.
- * @param jobStatus The state of the task which is to be run immediately.
+ * @param jobStatus The state of the task which is to be run immediately. <strong>null
+ * indicates to the scheduler that any ready jobs should be flushed.</strong>
*/
public void onRunJobNow(JobStatus jobStatus);
}
diff --git a/services/core/java/com/android/server/job/controllers/BatteryController.java b/services/core/java/com/android/server/job/controllers/BatteryController.java
index 538a252..309e034 100644
--- a/services/core/java/com/android/server/job/controllers/BatteryController.java
+++ b/services/core/java/com/android/server/job/controllers/BatteryController.java
@@ -84,15 +84,15 @@
@Override
public void maybeStartTrackingJob(JobStatus taskStatus) {
+ final boolean isOnStablePower = mChargeTracker.isOnStablePower();
if (taskStatus.hasChargingConstraint()) {
- final boolean isOnStablePower = mChargeTracker.isOnStablePower();
synchronized (mTrackedTasks) {
mTrackedTasks.add(taskStatus);
taskStatus.chargingConstraintSatisfied.set(isOnStablePower);
}
- if (isOnStablePower) {
- mStateChangedListener.onControllerStateChanged();
- }
+ }
+ if (isOnStablePower) {
+ mChargeTracker.setStableChargingAlarm();
}
}
@@ -119,9 +119,15 @@
}
}
}
+ // Let the scheduler know that state has changed. This may or may not result in an
+ // execution.
if (reportChange) {
mStateChangedListener.onControllerStateChanged();
}
+ // Also tell the scheduler that any ready jobs should be flushed.
+ if (stablePower) {
+ mStateChangedListener.onRunJobNow(null);
+ }
}
public class ChargingTracker extends BroadcastReceiver {
@@ -196,9 +202,7 @@
}
// Set up an alarm for ACTION_CHARGING_STABLE - we don't want to kick off tasks
// here if the user unplugs the phone immediately.
- mAlarm.set(AlarmManager.ELAPSED_REALTIME_WAKEUP,
- SystemClock.elapsedRealtime() + STABLE_CHARGING_THRESHOLD_MILLIS,
- mStableChargingTriggerIntent);
+ setStableChargingAlarm();
mCharging = true;
} else if (Intent.ACTION_POWER_DISCONNECTED.equals(action)) {
if (DEBUG) {
@@ -211,7 +215,7 @@
}else if (ACTION_CHARGING_STABLE.equals(action)) {
// Here's where we actually do the notify for a task being ready.
if (DEBUG) {
- Slog.d(TAG, "Battery connected fired @ " + SystemClock.elapsedRealtime()
+ Slog.d(TAG, "Stable charging fired @ " + SystemClock.elapsedRealtime()
+ " charging: " + mCharging);
}
if (mCharging) { // Should never receive this intent if mCharging is false.
@@ -219,6 +223,17 @@
}
}
}
+
+ void setStableChargingAlarm() {
+ final long alarmTriggerElapsed =
+ SystemClock.elapsedRealtime() + STABLE_CHARGING_THRESHOLD_MILLIS;
+ if (DEBUG) {
+ Slog.d(TAG, "Setting stable alarm to go off in " +
+ (STABLE_CHARGING_THRESHOLD_MILLIS / 1000) + "s");
+ }
+ mAlarm.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, alarmTriggerElapsed,
+ mStableChargingTriggerIntent);
+ }
}
@Override
diff --git a/services/core/java/com/android/server/pm/PackageInstallerService.java b/services/core/java/com/android/server/pm/PackageInstallerService.java
index 03cb2e9..5e802de 100644
--- a/services/core/java/com/android/server/pm/PackageInstallerService.java
+++ b/services/core/java/com/android/server/pm/PackageInstallerService.java
@@ -485,17 +485,22 @@
if (params.mode == SessionParams.MODE_FULL_INSTALL) {
// Brand new install, use best resolved location. This also verifies
// that target has enough free space for the install.
- final int resolved = PackageHelper.resolveInstallLocation(mContext,
- params.appPackageName, params.installLocation, params.sizeBytes,
- params.installFlags);
- if (resolved == PackageHelper.RECOMMEND_INSTALL_INTERNAL) {
- stageInternal = true;
- } else if (resolved == PackageHelper.RECOMMEND_INSTALL_EXTERNAL) {
- stageInternal = false;
- } else {
- throw new IOException("No storage with enough free space; res=" + resolved);
- }
+ final long ident = Binder.clearCallingIdentity();
+ try {
+ final int resolved = PackageHelper.resolveInstallLocation(mContext,
+ params.appPackageName, params.installLocation, params.sizeBytes,
+ params.installFlags);
+ if (resolved == PackageHelper.RECOMMEND_INSTALL_INTERNAL) {
+ stageInternal = true;
+ } else if (resolved == PackageHelper.RECOMMEND_INSTALL_EXTERNAL) {
+ stageInternal = false;
+ } else {
+ throw new IOException("No storage with enough free space; res=" + resolved);
+ }
+ } finally {
+ Binder.restoreCallingIdentity(ident);
+ }
} else if (params.mode == SessionParams.MODE_INHERIT_EXISTING) {
// We always stage inheriting sessions on internal storage first,
// since we don't want to grow containers until we're sure that
diff --git a/services/core/java/com/android/server/power/ShutdownThread.java b/services/core/java/com/android/server/power/ShutdownThread.java
index 5f3da07..da11387 100644
--- a/services/core/java/com/android/server/power/ShutdownThread.java
+++ b/services/core/java/com/android/server/power/ShutdownThread.java
@@ -430,10 +430,10 @@
}
try {
- radioOff = phone == null || !phone.isRadioOn();
+ radioOff = phone == null || !phone.needMobileRadioShutdown();
if (!radioOff) {
- Log.w(TAG, "Turning off radio...");
- phone.setRadio(false);
+ Log.w(TAG, "Turning off cellular radios...");
+ phone.shutdownMobileRadios();
}
} catch (RemoteException ex) {
Log.e(TAG, "RemoteException during radio shutdown", ex);
@@ -456,7 +456,7 @@
}
if (!radioOff) {
try {
- radioOff = !phone.isRadioOn();
+ radioOff = !phone.needMobileRadioShutdown();
} catch (RemoteException ex) {
Log.e(TAG, "RemoteException during radio shutdown", ex);
radioOff = true;
@@ -472,7 +472,7 @@
Log.e(TAG, "RemoteException during NFC shutdown", ex);
nfcOff = true;
}
- if (radioOff) {
+ if (nfcOff) {
Log.i(TAG, "NFC turned off.");
}
}
diff --git a/services/core/java/com/android/server/tv/TvInputManagerService.java b/services/core/java/com/android/server/tv/TvInputManagerService.java
index a084cab..6481944 100644
--- a/services/core/java/com/android/server/tv/TvInputManagerService.java
+++ b/services/core/java/com/android/server/tv/TvInputManagerService.java
@@ -283,7 +283,6 @@
userState.inputMap = inputMap;
userState.ratingSystemXmlUriSet.clear();
- userState.ratingSystemXmlUriSet.add(TvContentRating.SYSTEM_CONTENT_RATING_SYSTEM_XML);
for (TvInputState state : userState.inputMap.values()) {
Uri ratingSystemXmlUri = state.mInfo.getRatingSystemXmlUri();
if (ratingSystemXmlUri != null) {
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index b57a090..32f3707 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -5801,6 +5801,29 @@
SystemProperties.set(StrictMode.VISUAL_PROPERTY, value);
}
+ private static void convertCropForSurfaceFlinger(Rect crop, int rot, int dw, int dh) {
+ if (rot == Surface.ROTATION_90) {
+ final int tmp = crop.top;
+ crop.top = dw - crop.right;
+ crop.right = crop.bottom;
+ crop.bottom = dw - crop.left;
+ crop.left = tmp;
+ } else if (rot == Surface.ROTATION_180) {
+ int tmp = crop.top;
+ crop.top = dh - crop.bottom;
+ crop.bottom = dh - tmp;
+ tmp = crop.right;
+ crop.right = dw - crop.left;
+ crop.left = dw - tmp;
+ } else if (rot == Surface.ROTATION_270) {
+ final int tmp = crop.top;
+ crop.top = crop.left;
+ crop.left = dh - crop.bottom;
+ crop.bottom = crop.right;
+ crop.right = dh - tmp;
+ }
+ }
+
/**
* Takes a snapshot of the screen. In landscape mode this grabs the whole screen.
* In portrait mode, it grabs the upper region of the screen based on the vertical dimension
@@ -5962,21 +5985,31 @@
// Constrain frame to the screen size.
frame.intersect(0, 0, dw, dh);
- // Constrain thumbnail to smaller of screen width or height. Assumes aspect
- // of thumbnail is the same as the screen (in landscape) or square.
- scale = Math.max(width / (float) frame.width(), height / (float) frame.height());
- dw = (int)(dw * scale);
- dh = (int)(dh * scale);
+
+ // Tell surface flinger what part of the image to crop. Take the top
+ // right part of the application, and crop the larger dimension to fit.
+ Rect crop = new Rect(frame);
+ if (width / (float) frame.width() < height / (float) frame.height()) {
+ int cropWidth = (int)((float)width / (float)height * frame.height());
+ crop.right = crop.left + cropWidth;
+ } else {
+ int cropHeight = (int)((float)height / (float)width * frame.width());
+ crop.bottom = crop.top + cropHeight;
+ }
// The screenshot API does not apply the current screen rotation.
rot = getDefaultDisplayContentLocked().getDisplay().getRotation();
if (rot == Surface.ROTATION_90 || rot == Surface.ROTATION_270) {
- final int tmp = dw;
- dw = dh;
- dh = tmp;
+ final int tmp = width;
+ width = height;
+ height = tmp;
rot = (rot == Surface.ROTATION_90) ? Surface.ROTATION_270 : Surface.ROTATION_90;
}
+ // Surfaceflinger is not aware of orientation, so convert our logical
+ // crop to surfaceflinger's portrait orientation.
+ convertCropForSurfaceFlinger(crop, rot, dw, dh);
+
if (DEBUG_SCREENSHOT) {
Slog.i(TAG, "Screenshot: " + dw + "x" + dh + " from " + minLayer + " to "
+ maxLayer + " appToken=" + appToken);
@@ -5995,7 +6028,7 @@
if (DEBUG_SCREENSHOT && inRotation) Slog.v(TAG,
"Taking screenshot while rotating");
- rawss = SurfaceControl.screenshot(new Rect(), dw, dh, minLayer, maxLayer,
+ rawss = SurfaceControl.screenshot(crop, width, height, minLayer, maxLayer,
inRotation);
if (rawss == null) {
Slog.w(TAG, "Screenshot failure taking screenshot for (" + dw + "x" + dh
@@ -6012,11 +6045,8 @@
if (DEBUG_SCREENSHOT) {
bm.eraseColor(0xFF000000);
}
- frame.scale(scale);
Matrix matrix = new Matrix();
- ScreenRotationAnimation.createRotationMatrix(rot, dw, dh, matrix);
- // TODO: Test for RTL vs. LTR and use frame.right-width instead of -frame.left
- matrix.postTranslate(-FloatMath.ceil(frame.left), -FloatMath.ceil(frame.top));
+ ScreenRotationAnimation.createRotationMatrix(rot, width, height, matrix);
Canvas canvas = new Canvas(bm);
canvas.drawBitmap(rawss, matrix, null);
canvas.setBitmap(null);
@@ -6042,6 +6072,7 @@
}
rawss.recycle();
+
return bm;
}
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DeviceOwner.java b/services/devicepolicy/java/com/android/server/devicepolicy/DeviceOwner.java
index 4b60c9f..5938819 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DeviceOwner.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DeviceOwner.java
@@ -267,6 +267,9 @@
if (mDeviceOwner != null) {
out.startTag(null, TAG_DEVICE_OWNER);
out.attribute(null, ATTR_PACKAGE, mDeviceOwner.packageName);
+ if (mDeviceOwner.name != null) {
+ out.attribute(null, ATTR_NAME, mDeviceOwner.name);
+ }
out.endTag(null, TAG_DEVICE_OWNER);
}
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
index 21ba31e..7baa258 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -18,6 +18,7 @@
import static android.Manifest.permission.MANAGE_CA_CERTIFICATES;
+import android.accessibilityservice.AccessibilityServiceInfo;
import android.app.Activity;
import android.app.ActivityManagerNative;
import android.app.AlarmManager;
@@ -39,14 +40,15 @@
import android.content.IntentFilter;
import android.content.pm.ApplicationInfo;
import android.content.pm.IPackageManager;
+import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
+import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.ResolveInfo;
import android.content.pm.UserInfo;
import android.media.AudioManager;
import android.media.IAudioService;
import android.net.ConnectivityManager;
import android.net.Uri;
-import android.content.pm.PackageManager.NameNotFoundException;
import android.database.ContentObserver;
import android.hardware.usb.UsbManager;
import android.net.ProxyInfo;
@@ -77,6 +79,10 @@
import android.util.Slog;
import android.util.SparseArray;
import android.util.Xml;
+import android.view.accessibility.AccessibilityManager;
+import android.view.accessibility.IAccessibilityManager;
+import android.view.inputmethod.InputMethodInfo;
+import android.view.inputmethod.InputMethodManager;
import android.view.IWindowManager;
import com.android.internal.R;
@@ -282,6 +288,8 @@
private static final String TAG_DISABLE_SCREEN_CAPTURE = "disable-screen-capture";
private static final String TAG_DISABLE_ACCOUNT_MANAGEMENT = "disable-account-management";
private static final String TAG_ACCOUNT_TYPE = "account-type";
+ private static final String TAG_PERMITTED_ACCESSIBILITY_SERVICES
+ = "permitted-accessiblity-services";
private static final String TAG_ENCRYPTION_REQUESTED = "encryption-requested";
private static final String TAG_MANAGE_TRUST_AGENT_FEATURES = "manage-trust-agent-features";
private static final String TAG_TRUST_AGENT_FEATURE = "feature";
@@ -291,6 +299,7 @@
private static final String TAG_GLOBAL_PROXY_EXCLUSION_LIST = "global-proxy-exclusion-list";
private static final String TAG_GLOBAL_PROXY_SPEC = "global-proxy-spec";
private static final String TAG_SPECIFIES_GLOBAL_PROXY = "specifies-global-proxy";
+ private static final String TAG_PERMITTED_IMES = "permitted-imes";
private static final String TAG_MAX_FAILED_PASSWORD_WIPE = "max-failed-password-wipe";
private static final String TAG_MAX_TIME_TO_UNLOCK = "max-time-to-unlock";
private static final String TAG_MIN_PASSWORD_NONLETTER = "min-password-nonletter";
@@ -307,6 +316,7 @@
private static final String TAG_CROSS_PROFILE_WIDGET_PROVIDERS =
"cross-profile-widget-providers";
private static final String TAG_PROVIDER = "provider";
+ private static final String TAG_PACKAGE_LIST_ITEM = "item";
final DeviceAdminInfo info;
@@ -358,6 +368,16 @@
Set<String> accountTypesWithManagementDisabled = new HashSet<String>();
+ // The list of permitted accessibility services package namesas set by a profile
+ // or device owner. Null means all accessibility services are allowed, empty means
+ // none except system services are allowed.
+ List<String> permittedAccessiblityServices;
+
+ // The list of permitted input methods package names as set by a profile or device owner.
+ // Null means all input methods are allowed, empty means none except system imes are
+ // allowed.
+ List<String> permittedInputMethods;
+
// TODO: review implementation decisions with frameworks team
boolean specifiesGlobalProxy = false;
String globalProxySpec = null;
@@ -521,6 +541,25 @@
}
out.endTag(null, TAG_CROSS_PROFILE_WIDGET_PROVIDERS);
}
+ writePackageListToXml(out, TAG_PERMITTED_ACCESSIBILITY_SERVICES,
+ permittedAccessiblityServices);
+ writePackageListToXml(out, TAG_PERMITTED_IMES, permittedInputMethods);
+ }
+
+ void writePackageListToXml(XmlSerializer out, String outerTag,
+ List<String> packageList)
+ throws IllegalArgumentException, IllegalStateException, IOException {
+ if (packageList == null) {
+ return;
+ }
+
+ out.startTag(null, outerTag);
+ for (String packageName : packageList) {
+ out.startTag(null, TAG_PACKAGE_LIST_ITEM);
+ out.attribute(null, ATTR_VALUE, packageName);
+ out.endTag(null, TAG_PACKAGE_LIST_ITEM);
+ }
+ out.endTag(null, outerTag);
}
void readFromXml(XmlPullParser parser)
@@ -604,6 +643,10 @@
trustAgentFeatures = getAllTrustAgentFeatures(parser, tag);
} else if (TAG_CROSS_PROFILE_WIDGET_PROVIDERS.equals(tag)) {
crossProfileWidgetProviders = getCrossProfileWidgetProviders(parser, tag);
+ } else if (TAG_PERMITTED_ACCESSIBILITY_SERVICES.equals(tag)) {
+ permittedAccessiblityServices = readPackageList(parser, tag);
+ } else if (TAG_PERMITTED_IMES.equals(tag)) {
+ permittedInputMethods = readPackageList(parser, tag);
} else {
Slog.w(LOG_TAG, "Unknown admin tag: " + tag);
}
@@ -611,6 +654,31 @@
}
}
+ private List<String> readPackageList(XmlPullParser parser,
+ String tag) throws XmlPullParserException, IOException {
+ List<String> result = new ArrayList<String>();
+ int outerDepth = parser.getDepth();
+ int outerType;
+ while ((outerType=parser.next()) != XmlPullParser.END_DOCUMENT
+ && (outerType != XmlPullParser.END_TAG || parser.getDepth() > outerDepth)) {
+ if (outerType == XmlPullParser.END_TAG || outerType == XmlPullParser.TEXT) {
+ continue;
+ }
+ String outerTag = parser.getName();
+ if (TAG_PACKAGE_LIST_ITEM.equals(outerTag)) {
+ String packageName = parser.getAttributeValue(null, ATTR_VALUE);
+ if (packageName != null) {
+ result.add(packageName);
+ } else {
+ Slog.w(LOG_TAG, "Package name missing under " + outerTag);
+ }
+ } else {
+ Slog.w(LOG_TAG, "Unknown tag under " + tag + ": " + outerTag);
+ }
+ }
+ return result;
+ }
+
private Set<String> readDisableAccountInfo(XmlPullParser parser, String tag)
throws XmlPullParserException, IOException {
int outerDepthDAM = parser.getDepth();
@@ -754,6 +822,14 @@
pw.println(disabledKeyguardFeatures);
pw.print(prefix); pw.print("crossProfileWidgetProviders=");
pw.println(crossProfileWidgetProviders);
+ if (!(permittedAccessiblityServices == null)) {
+ pw.print(prefix); pw.print("permittedAccessibilityServices=");
+ pw.println(permittedAccessiblityServices.toString());
+ }
+ if (!(permittedInputMethods == null)) {
+ pw.print(prefix); pw.print("permittedInputMethods=");
+ pw.println(permittedInputMethods.toString());
+ }
}
}
@@ -3971,6 +4047,343 @@
}
}
+ /**
+ * @return true if all packages in enabledPackages are either in the list
+ * permittedList or are a system app.
+ */
+ private boolean checkPackagesInPermittedListOrSystem(List<String> enabledPackages,
+ List<String> permittedList) {
+ int userIdToCheck = UserHandle.getCallingUserId();
+ long id = Binder.clearCallingIdentity();
+ try {
+ // If we have an enabled packages list for a managed profile the packages
+ // we should check are installed for the parent user.
+ UserInfo user = mUserManager.getUserInfo(userIdToCheck);
+ if (user.isManagedProfile()) {
+ userIdToCheck = user.profileGroupId;
+ }
+
+ IPackageManager pm = AppGlobals.getPackageManager();
+ for (String enabledPackage : enabledPackages) {
+ boolean systemService = false;
+ try {
+ ApplicationInfo applicationInfo = pm.getApplicationInfo(enabledPackage,
+ PackageManager.GET_UNINSTALLED_PACKAGES, userIdToCheck);
+ systemService = (applicationInfo.flags
+ & ApplicationInfo.FLAG_SYSTEM) != 0;
+ } catch (RemoteException e) {
+ Log.i(LOG_TAG, "Can't talk to package managed", e);
+ }
+ if (!systemService && !permittedList.contains(enabledPackage)) {
+ return false;
+ }
+ }
+ } finally {
+ restoreCallingIdentity(id);
+ }
+ return true;
+ }
+
+ private AccessibilityManager getAccessibilityManagerForUser(int userId) {
+ // Not using AccessibilityManager.getInstance because that guesses
+ // at the user you require based on callingUid and caches for a given
+ // process.
+ IBinder iBinder = ServiceManager.getService(Context.ACCESSIBILITY_SERVICE);
+ IAccessibilityManager service = iBinder == null
+ ? null : IAccessibilityManager.Stub.asInterface(iBinder);
+ return new AccessibilityManager(mContext, service, userId);
+ }
+
+ @Override
+ public boolean setPermittedAccessibilityServices(ComponentName who, List packageList) {
+ if (!mHasFeature) {
+ return false;
+ }
+ if (who == null) {
+ throw new NullPointerException("ComponentName is null");
+ }
+
+ if (packageList != null) {
+ int userId = UserHandle.getCallingUserId();
+ List<AccessibilityServiceInfo> enabledServices = null;
+ long id = Binder.clearCallingIdentity();
+ try {
+ UserInfo user = mUserManager.getUserInfo(userId);
+ if (user.isManagedProfile()) {
+ userId = user.profileGroupId;
+ }
+ AccessibilityManager accessibilityManager = getAccessibilityManagerForUser(userId);
+ enabledServices = accessibilityManager.getEnabledAccessibilityServiceList(
+ AccessibilityServiceInfo.FEEDBACK_ALL_MASK);
+ } finally {
+ restoreCallingIdentity(id);
+ }
+
+ if (enabledServices != null) {
+ List<String> enabledPackages = new ArrayList<String>();
+ for (AccessibilityServiceInfo service : enabledServices) {
+ enabledPackages.add(service.getResolveInfo().serviceInfo.packageName);
+ }
+ if (!checkPackagesInPermittedListOrSystem(enabledPackages, packageList)) {
+ Slog.e(LOG_TAG, "Cannot set permitted accessibility services, "
+ + "because it contains already enabled accesibility services.");
+ return false;
+ }
+ }
+ }
+
+ synchronized (this) {
+ ActiveAdmin admin = getActiveAdminForCallerLocked(who,
+ DeviceAdminInfo.USES_POLICY_PROFILE_OWNER);
+ admin.permittedAccessiblityServices = packageList;
+ saveSettingsLocked(UserHandle.getCallingUserId());
+ }
+ return true;
+ }
+
+ @Override
+ public List getPermittedAccessibilityServices(ComponentName who) {
+ if (!mHasFeature) {
+ return null;
+ }
+
+ if (who == null) {
+ throw new NullPointerException("ComponentName is null");
+ }
+
+ synchronized (this) {
+ ActiveAdmin admin = getActiveAdminForCallerLocked(who,
+ DeviceAdminInfo.USES_POLICY_PROFILE_OWNER);
+ return admin.permittedAccessiblityServices;
+ }
+ }
+
+ @Override
+ public List getPermittedAccessibilityServicesForUser(int userId) {
+ if (!mHasFeature) {
+ return null;
+ }
+ synchronized (this) {
+ List<String> result = null;
+ // If we have multiple profiles we return the intersection of the
+ // permitted lists. This can happen in cases where we have a device
+ // and profile owner.
+ List<UserInfo> profiles = mUserManager.getProfiles(userId);
+ final int PROFILES_SIZE = profiles.size();
+ for (int i = 0; i < PROFILES_SIZE; ++i) {
+ // Just loop though all admins, only device or profiles
+ // owners can have permitted lists set.
+ DevicePolicyData policy = getUserData(profiles.get(i).id);
+ final int N = policy.mAdminList.size();
+ for (int j = 0; j < N; j++) {
+ ActiveAdmin admin = policy.mAdminList.get(j);
+ List<String> fromAdmin = admin.permittedAccessiblityServices;
+ if (fromAdmin != null) {
+ if (result == null) {
+ result = new ArrayList<String>(fromAdmin);
+ } else {
+ result.retainAll(fromAdmin);
+ }
+ }
+ }
+ }
+
+ // If we have a permitted list add all system accessibility services.
+ if (result != null) {
+ long id = Binder.clearCallingIdentity();
+ try {
+ UserInfo user = mUserManager.getUserInfo(userId);
+ if (user.isManagedProfile()) {
+ userId = user.profileGroupId;
+ }
+ AccessibilityManager accessibilityManager =
+ getAccessibilityManagerForUser(userId);
+ List<AccessibilityServiceInfo> installedServices =
+ accessibilityManager.getInstalledAccessibilityServiceList();
+
+ IPackageManager pm = AppGlobals.getPackageManager();
+ if (installedServices != null) {
+ for (AccessibilityServiceInfo service : installedServices) {
+ String packageName = service.getResolveInfo().serviceInfo.packageName;
+ try {
+ ApplicationInfo applicationInfo = pm.getApplicationInfo(packageName,
+ PackageManager.GET_UNINSTALLED_PACKAGES, userId);
+ if ((applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0) {
+ result.add(packageName);
+ }
+ } catch (RemoteException e) {
+ Log.i(LOG_TAG, "Accessibility service in missing package", e);
+ }
+ }
+ }
+ } finally {
+ restoreCallingIdentity(id);
+ }
+ }
+
+ return result;
+ }
+ }
+
+ private boolean checkCallerIsCurrentUserOrProfile() {
+ int callingUserId = UserHandle.getCallingUserId();
+ long token = Binder.clearCallingIdentity();
+ try {
+ UserInfo currentUser;
+ UserInfo callingUser = mUserManager.getUserInfo(callingUserId);
+ try {
+ currentUser = ActivityManagerNative.getDefault().getCurrentUser();
+ } catch (RemoteException e) {
+ Slog.e(LOG_TAG, "Failed to talk to activity managed.", e);
+ return false;
+ }
+
+ if (callingUser.isManagedProfile() && callingUser.profileGroupId != currentUser.id) {
+ Slog.e(LOG_TAG, "Cannot set permitted input methods for managed profile "
+ + "of a user that isn't the foreground user.");
+ return false;
+ }
+ if (!callingUser.isManagedProfile() && callingUserId != currentUser.id ) {
+ Slog.e(LOG_TAG, "Cannot set permitted input methods "
+ + "of a user that isn't the foreground user.");
+ return false;
+ }
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
+ return true;
+ }
+
+ @Override
+ public boolean setPermittedInputMethods(ComponentName who, List packageList) {
+ if (!mHasFeature) {
+ return false;
+ }
+ if (who == null) {
+ throw new NullPointerException("ComponentName is null");
+ }
+
+ // TODO When InputMethodManager supports per user calls remove
+ // this restriction.
+ if (!checkCallerIsCurrentUserOrProfile()) {
+ return false;
+ }
+
+ if (packageList != null) {
+ // InputMethodManager fetches input methods for current user.
+ // So this can only be set when calling user is the current user
+ // or parent is current user in case of managed profiles.
+ InputMethodManager inputMethodManager = (InputMethodManager) mContext
+ .getSystemService(Context.INPUT_METHOD_SERVICE);
+ List<InputMethodInfo> enabledImes = inputMethodManager.getEnabledInputMethodList();
+
+ if (enabledImes != null) {
+ List<String> enabledPackages = new ArrayList<String>();
+ for (InputMethodInfo ime : enabledImes) {
+ enabledPackages.add(ime.getPackageName());
+ }
+ if (!checkPackagesInPermittedListOrSystem(enabledPackages, packageList)) {
+ Slog.e(LOG_TAG, "Cannot set permitted input methods, "
+ + "because it contains already enabled input method.");
+ return false;
+ }
+ }
+ }
+
+ synchronized (this) {
+ ActiveAdmin admin = getActiveAdminForCallerLocked(who,
+ DeviceAdminInfo.USES_POLICY_PROFILE_OWNER);
+ admin.permittedInputMethods = packageList;
+ saveSettingsLocked(UserHandle.getCallingUserId());
+ }
+ return true;
+ }
+
+ @Override
+ public List getPermittedInputMethods(ComponentName who) {
+ if (!mHasFeature) {
+ return null;
+ }
+
+ if (who == null) {
+ throw new NullPointerException("ComponentName is null");
+ }
+
+ synchronized (this) {
+ ActiveAdmin admin = getActiveAdminForCallerLocked(who,
+ DeviceAdminInfo.USES_POLICY_PROFILE_OWNER);
+ return admin.permittedInputMethods;
+ }
+ }
+
+ @Override
+ public List getPermittedInputMethodsForCurrentUser() {
+ UserInfo currentUser;
+ try {
+ currentUser = ActivityManagerNative.getDefault().getCurrentUser();
+ } catch (RemoteException e) {
+ Slog.e(LOG_TAG, "Failed to make remote calls to get current user", e);
+ // Activity managed is dead, just allow all IMEs
+ return null;
+ }
+
+ int userId = currentUser.id;
+ synchronized (this) {
+ List<String> result = null;
+ // If we have multiple profiles we return the intersection of the
+ // permitted lists. This can happen in cases where we have a device
+ // and profile owner.
+ List<UserInfo> profiles = mUserManager.getProfiles(userId);
+ final int PROFILES_SIZE = profiles.size();
+ for (int i = 0; i < PROFILES_SIZE; ++i) {
+ // Just loop though all admins, only device or profiles
+ // owners can have permitted lists set.
+ DevicePolicyData policy = getUserData(profiles.get(i).id);
+ final int N = policy.mAdminList.size();
+ for (int j = 0; j < N; j++) {
+ ActiveAdmin admin = policy.mAdminList.get(j);
+ List<String> fromAdmin = admin.permittedInputMethods;
+ if (fromAdmin != null) {
+ if (result == null) {
+ result = new ArrayList<String>(fromAdmin);
+ } else {
+ result.retainAll(fromAdmin);
+ }
+ }
+ }
+ }
+
+ // If we have a permitted list add all system input methods.
+ if (result != null) {
+ InputMethodManager inputMethodManager = (InputMethodManager) mContext
+ .getSystemService(Context.INPUT_METHOD_SERVICE);
+ List<InputMethodInfo> imes = inputMethodManager.getInputMethodList();
+ long id = Binder.clearCallingIdentity();
+ try {
+ IPackageManager pm = AppGlobals.getPackageManager();
+ if (imes != null) {
+ for (InputMethodInfo ime : imes) {
+ String packageName = ime.getPackageName();
+ try {
+ ApplicationInfo applicationInfo = pm.getApplicationInfo(
+ packageName, PackageManager.GET_UNINSTALLED_PACKAGES,
+ userId);
+ if ((applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0) {
+ result.add(packageName);
+ }
+ } catch (RemoteException e) {
+ Log.i(LOG_TAG, "Input method for missing package", e);
+ }
+ }
+ }
+ } finally {
+ restoreCallingIdentity(id);
+ }
+ }
+ return result;
+ }
+ }
+
@Override
public UserHandle createUser(ComponentName who, String name) {
synchronized (this) {
@@ -4181,46 +4594,6 @@
}
@Override
- public int setApplicationsHidden(ComponentName who, Intent intent, boolean hidden) {
- int callingUserId = UserHandle.getCallingUserId();
- synchronized (this) {
- if (who == null) {
- throw new NullPointerException("ComponentName is null");
- }
- getActiveAdminForCallerLocked(who, DeviceAdminInfo.USES_POLICY_PROFILE_OWNER);
-
- long id = Binder.clearCallingIdentity();
- try {
- IPackageManager pm = AppGlobals.getPackageManager();
- List<ResolveInfo> activitiesToEnable = pm.queryIntentActivities(intent,
- intent.resolveTypeIfNeeded(mContext.getContentResolver()),
- PackageManager.GET_DISABLED_COMPONENTS
- | PackageManager.GET_UNINSTALLED_PACKAGES,
- callingUserId);
-
- if (DBG) Slog.d(LOG_TAG, "Enabling activities: " + activitiesToEnable);
- int numberOfAppsUnhidden = 0;
- if (activitiesToEnable != null) {
- for (ResolveInfo info : activitiesToEnable) {
- if (info.activityInfo != null) {
- numberOfAppsUnhidden++;
- pm.setApplicationHiddenSettingAsUser(info.activityInfo.packageName,
- hidden, callingUserId);
- }
- }
- }
- return numberOfAppsUnhidden;
- } catch (RemoteException re) {
- // shouldn't happen
- Slog.e(LOG_TAG, "Failed to setApplicationsHiddenSettingsWithIntent", re);
- } finally {
- restoreCallingIdentity(id);
- }
- return 0;
- }
- }
-
- @Override
public boolean isApplicationHidden(ComponentName who, String packageName) {
int callingUserId = UserHandle.getCallingUserId();
synchronized (this) {
@@ -4396,7 +4769,8 @@
}
@Override
- public void setBlockUninstall(ComponentName who, String packageName, boolean blockUninstall) {
+ public void setUninstallBlocked(ComponentName who, String packageName,
+ boolean uninstallBlocked) {
final int userId = UserHandle.getCallingUserId();
synchronized (this) {
@@ -4408,7 +4782,7 @@
long id = Binder.clearCallingIdentity();
try {
IPackageManager pm = AppGlobals.getPackageManager();
- pm.setBlockUninstallForUser(packageName, blockUninstall, userId);
+ pm.setBlockUninstallForUser(packageName, uninstallBlocked, userId);
} catch (RemoteException re) {
// Shouldn't happen.
Slog.e(LOG_TAG, "Failed to setBlockUninstallForUser", re);
@@ -4419,7 +4793,7 @@
}
@Override
- public boolean getBlockUninstall(ComponentName who, String packageName) {
+ public boolean getUninstallBlocked(ComponentName who, String packageName) {
final int userId = UserHandle.getCallingUserId();
synchronized (this) {
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 0eb170c..71b796a 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -3056,6 +3056,42 @@
/** @hide */
@SystemApi
+ public String getCdmaMdn() {
+ return getCdmaMdn(getDefaultSubscription());
+ }
+
+ /** @hide */
+ @SystemApi
+ public String getCdmaMdn(long subId) {
+ try {
+ return getITelephony().getCdmaMdn(subId);
+ } catch (RemoteException ex) {
+ return null;
+ } catch (NullPointerException ex) {
+ return null;
+ }
+ }
+
+ /** @hide */
+ @SystemApi
+ public String getCdmaMin() {
+ return getCdmaMin(getDefaultSubscription());
+ }
+
+ /** @hide */
+ @SystemApi
+ public String getCdmaMin(long subId) {
+ try {
+ return getITelephony().getCdmaMin(subId);
+ } catch (RemoteException ex) {
+ return null;
+ } catch (NullPointerException ex) {
+ return null;
+ }
+ }
+
+ /** @hide */
+ @SystemApi
public int checkCarrierPrivilegesForPackage(String pkgname) {
try {
return getITelephony().checkCarrierPrivilegesForPackage(pkgname);
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index d256f9d..b1c3c4a 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -677,6 +677,18 @@
void setImsRegistrationState(boolean registered);
/**
+ * Return MDN string for CDMA phone.
+ * @param subId user preferred subId.
+ */
+ String getCdmaMdn(long subId);
+
+ /**
+ * Return MIN string for CDMA phone.
+ * @param subId user preferred subId.
+ */
+ String getCdmaMin(long subId);
+
+ /**
* Has the calling application been granted special privileges by the carrier.
*
* If any of the packages in the calling UID has carrier privileges, the
@@ -781,5 +793,16 @@
* positive value success, data length of response
*/
int invokeOemRilRequestRaw(in byte[] oemReq, out byte[] oemResp);
-}
+ /**
+ * Check if any mobile Radios need to be shutdown.
+ *
+ * @return true is any mobile radio needs to be shutdown
+ */
+ boolean needMobileRadioShutdown();
+
+ /**
+ * Shutdown Mobile Radios
+ */
+ void shutdownMobileRadios();
+}
diff --git a/telephony/java/com/android/internal/telephony/RILConstants.java b/telephony/java/com/android/internal/telephony/RILConstants.java
index a8a9057..e730bde 100644
--- a/telephony/java/com/android/internal/telephony/RILConstants.java
+++ b/telephony/java/com/android/internal/telephony/RILConstants.java
@@ -287,7 +287,10 @@
int RIL_REQUEST_ALLOW_DATA = 123;
int RIL_REQUEST_GET_HARDWARE_CONFIG = 124;
int RIL_REQUEST_SIM_AUTHENTICATION = 125;
+ int RIL_REQUEST_GET_DC_RT_INFO = 126;
+ int RIL_REQUEST_SET_DC_RT_INFO_RATE = 127;
int RIL_REQUEST_SET_DATA_PROFILE = 128;
+ int RIL_REQUEST_SHUTDOWN = 129;
int RIL_UNSOL_RESPONSE_BASE = 1000;
int RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED = 1000;
diff --git a/tests/ActivityTests/res/drawable-hdpi/icon.png b/tests/ActivityTests/res/drawable-hdpi/icon.png
new file mode 100644
index 0000000..2eab6f2
--- /dev/null
+++ b/tests/ActivityTests/res/drawable-hdpi/icon.png
Binary files differ
diff --git a/tests/ActivityTests/res/drawable-mdpi/icon.png b/tests/ActivityTests/res/drawable-mdpi/icon.png
new file mode 100644
index 0000000..63aec6f
--- /dev/null
+++ b/tests/ActivityTests/res/drawable-mdpi/icon.png
Binary files differ
diff --git a/tests/ActivityTests/res/drawable-xhdpi/icon.png b/tests/ActivityTests/res/drawable-xhdpi/icon.png
new file mode 100644
index 0000000..8ea9c48
--- /dev/null
+++ b/tests/ActivityTests/res/drawable-xhdpi/icon.png
Binary files differ
diff --git a/tests/ActivityTests/src/com/google/android/test/activity/ActivityTestMain.java b/tests/ActivityTests/src/com/google/android/test/activity/ActivityTestMain.java
index 9002125..7f3aa77 100644
--- a/tests/ActivityTests/src/com/google/android/test/activity/ActivityTestMain.java
+++ b/tests/ActivityTests/src/com/google/android/test/activity/ActivityTestMain.java
@@ -28,6 +28,7 @@
import android.content.ContentProviderClient;
import android.content.Intent;
import android.content.ServiceConnection;
+import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.os.IBinder;
import android.os.RemoteException;
@@ -219,7 +220,7 @@
@Override public boolean onMenuItemClick(MenuItem item) {
Intent intent = new Intent(ActivityTestMain.this, UserTarget.class);
sendOrderedBroadcastAsUser(intent, new UserHandle(mSecondUser), null,
- new BroadcastResultReceiver(),
+ new BroadcastResultReceiver(),
null, Activity.RESULT_OK, null, null);
return true;
}
@@ -291,6 +292,30 @@
return true;
}
});
+ menu.add("Add App Recent").setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
+ @Override public boolean onMenuItemClick(MenuItem item) {
+ addAppRecents(1);
+ return true;
+ }
+ });
+ menu.add("Add App 10x Recent").setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
+ @Override public boolean onMenuItemClick(MenuItem item) {
+ addAppRecents(10);
+ return true;
+ }
+ });
+ menu.add("Exclude!").setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
+ @Override public boolean onMenuItemClick(MenuItem item) {
+ setExclude(true);
+ return true;
+ }
+ });
+ menu.add("Include!").setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
+ @Override public boolean onMenuItemClick(MenuItem item) {
+ setExclude(false);
+ return true;
+ }
+ });
return true;
}
@@ -317,7 +342,36 @@
mConnections.clear();
}
- private View scrollWrap(View view) {
+ void addAppRecents(int count) {
+ ActivityManager am = (ActivityManager)getSystemService(Context.ACTIVITY_SERVICE);
+ Intent intent = new Intent(Intent.ACTION_MAIN);
+ intent.addCategory(Intent.CATEGORY_LAUNCHER);
+ intent.addFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT);
+ intent.setComponent(new ComponentName(this, ActivityTestMain.class));
+ for (int i=0; i<count; i++) {
+ ActivityManager.TaskDescription desc = new ActivityManager.TaskDescription();
+ desc.setLabel("Added #" + i);
+ Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.icon);
+ if ((i&1) == 0) {
+ desc.setIcon(bitmap);
+ }
+ int taskId = am.addAppTask(this, intent, desc, bitmap);
+ Log.i(TAG, "Added new task id #" + taskId);
+ }
+ }
+
+ void setExclude(boolean exclude) {
+ ActivityManager am = (ActivityManager)getSystemService(Context.ACTIVITY_SERVICE);
+ List<ActivityManager.AppTask> tasks = am.getAppTasks();
+ int taskId = getTaskId();
+ for (int i=0; i<tasks.size(); i++) {
+ ActivityManager.AppTask task = tasks.get(i);
+ if (task.getTaskInfo().id == taskId) {
+ task.setExcludeFromRecents(exclude);
+ }
+ }
+ }
+ private View scrollWrap(View view) {
ScrollView scroller = new ScrollView(this);
scroller.addView(view, new ScrollView.LayoutParams(ScrollView.LayoutParams.MATCH_PARENT,
ScrollView.LayoutParams.MATCH_PARENT));
diff --git a/tests/Split/Android.mk b/tests/Split/Android.mk
index 7884d4d..b068bef 100644
--- a/tests/Split/Android.mk
+++ b/tests/Split/Android.mk
@@ -20,8 +20,7 @@
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := Split
-LOCAL_AAPT_FLAGS := --split fr,de
-LOCAL_AAPT_FLAGS += -v
+LOCAL_PACKAGE_SPLITS := mdpi-v4 hdpi-v4 xhdpi-v4 xxhdpi-v4
LOCAL_MODULE_TAGS := tests
diff --git a/tests/Split/AndroidManifest.xml b/tests/Split/AndroidManifest.xml
index a4956a7..0de8344 100644
--- a/tests/Split/AndroidManifest.xml
+++ b/tests/Split/AndroidManifest.xml
@@ -16,7 +16,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.example.split">
- <application android:label="@string/app_title">
+ <application android:label="@string/app_title"
+ android:icon="@mipmap/ic_app">
<activity android:name="ActivityMain">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
diff --git a/tests/Split/res/drawable-hdpi/image.png b/tests/Split/res/drawable-hdpi/image.png
new file mode 100644
index 0000000..dcf4242
--- /dev/null
+++ b/tests/Split/res/drawable-hdpi/image.png
Binary files differ
diff --git a/tests/Split/res/drawable-mdpi/image.png b/tests/Split/res/drawable-mdpi/image.png
new file mode 100644
index 0000000..3437952
--- /dev/null
+++ b/tests/Split/res/drawable-mdpi/image.png
Binary files differ
diff --git a/tests/Split/res/drawable-xhdpi/image.png b/tests/Split/res/drawable-xhdpi/image.png
new file mode 100644
index 0000000..68b2f8e
--- /dev/null
+++ b/tests/Split/res/drawable-xhdpi/image.png
Binary files differ
diff --git a/tests/Split/res/drawable-xxhdpi/image.png b/tests/Split/res/drawable-xxhdpi/image.png
new file mode 100644
index 0000000..4bff9b9
--- /dev/null
+++ b/tests/Split/res/drawable-xxhdpi/image.png
Binary files differ
diff --git a/tests/Split/res/layout/main.xml b/tests/Split/res/layout/main.xml
index 36992a2..607cdb0 100644
--- a/tests/Split/res/layout/main.xml
+++ b/tests/Split/res/layout/main.xml
@@ -14,6 +14,12 @@
limitations under the License.
-->
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
- android:layout_height="match_parent"/>
+ android:layout_height="match_parent">
+ <ImageView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_centerInParent="true"
+ android:src="@drawable/image"/>
+</RelativeLayout>
diff --git a/tests/Split/res/mipmap-hdpi/ic_app.png b/tests/Split/res/mipmap-hdpi/ic_app.png
new file mode 100644
index 0000000..ffcb9e5
--- /dev/null
+++ b/tests/Split/res/mipmap-hdpi/ic_app.png
Binary files differ
diff --git a/tests/Split/res/mipmap-mdpi/ic_app.png b/tests/Split/res/mipmap-mdpi/ic_app.png
new file mode 100644
index 0000000..35f5b45
--- /dev/null
+++ b/tests/Split/res/mipmap-mdpi/ic_app.png
Binary files differ
diff --git a/tests/Split/res/mipmap-xhdpi/ic_app.png b/tests/Split/res/mipmap-xhdpi/ic_app.png
new file mode 100644
index 0000000..bfe71fe
--- /dev/null
+++ b/tests/Split/res/mipmap-xhdpi/ic_app.png
Binary files differ
diff --git a/tests/Split/res/mipmap-xxhdpi/ic_app.png b/tests/Split/res/mipmap-xxhdpi/ic_app.png
new file mode 100644
index 0000000..b65532c
--- /dev/null
+++ b/tests/Split/res/mipmap-xxhdpi/ic_app.png
Binary files differ
diff --git a/tests/Split/res/mipmap-xxxhdpi/ic_app.png b/tests/Split/res/mipmap-xxxhdpi/ic_app.png
new file mode 100644
index 0000000..2679b49
--- /dev/null
+++ b/tests/Split/res/mipmap-xxxhdpi/ic_app.png
Binary files differ
diff --git a/tests/Split/src/java/com/android/example/split/ActivityMain.java b/tests/Split/src/java/com/android/example/split/ActivityMain.java
index a15fb3c..63963a2 100644
--- a/tests/Split/src/java/com/android/example/split/ActivityMain.java
+++ b/tests/Split/src/java/com/android/example/split/ActivityMain.java
@@ -24,8 +24,6 @@
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- TextView text = new TextView(this);
- text.setText(R.string.test);
- setContentView(text);
+ setContentView(R.layout.main);
}
}
diff --git a/tools/aapt/Resource.cpp b/tools/aapt/Resource.cpp
index 0a80805..869a6fc 100644
--- a/tools/aapt/Resource.cpp
+++ b/tools/aapt/Resource.cpp
@@ -770,7 +770,14 @@
if (!addTagAttribute(root, RESOURCES_ANDROID_NAMESPACE, "versionCode",
bundle->getVersionCode(), errorOnFailedInsert, replaceVersion)) {
return UNKNOWN_ERROR;
+ } else {
+ const XMLNode::attribute_entry* attr = root->getAttribute(
+ String16(RESOURCES_ANDROID_NAMESPACE), String16("versionCode"));
+ if (attr != NULL) {
+ bundle->setVersionCode(strdup(String8(attr->string).string()));
+ }
}
+
if (!addTagAttribute(root, RESOURCES_ANDROID_NAMESPACE, "versionName",
bundle->getVersionName(), errorOnFailedInsert, replaceVersion)) {
return UNKNOWN_ERROR;
diff --git a/tools/aapt/ResourceTable.cpp b/tools/aapt/ResourceTable.cpp
index c98808f..49d8699 100644
--- a/tools/aapt/ResourceTable.cpp
+++ b/tools/aapt/ResourceTable.cpp
@@ -2712,6 +2712,16 @@
// The libraries this table references.
Vector<sp<Package> > libraryPackages;
+ const ResTable& table = mAssets->getIncludedResources();
+ const size_t basePackageCount = table.getBasePackageCount();
+ for (size_t i = 0; i < basePackageCount; i++) {
+ size_t packageId = table.getBasePackageId(i);
+ String16 packageName(table.getBasePackageName(i));
+ if (packageId > 0x01 && packageId != 0x7f &&
+ packageName != String16("android")) {
+ libraryPackages.add(sp<Package>(new Package(packageName, packageId)));
+ }
+ }
// Iterate through all data, collecting all values (strings,
// references, etc).
@@ -2720,22 +2730,7 @@
for (pi=0; pi<N; pi++) {
sp<Package> p = mOrderedPackages.itemAt(pi);
if (p->getTypes().size() == 0) {
- // Empty, this is an imported package being used as
- // a shared library. We do not flatten this package.
- if (p->getAssignedId() != 0x01 && p->getName() != String16("android")) {
- // This is not the base Android package, and it is a library
- // so we must add a reference to the library when flattening.
- libraryPackages.add(p);
- }
continue;
- } else if (p->getAssignedId() == 0x00) {
- if (mPackageType != SharedLibrary) {
- fprintf(stderr, "ERROR: Package %s can not have ID=0x00 unless building a shared library.",
- String8(p->getName()).string());
- return UNKNOWN_ERROR;
- }
- // If this is a shared library, we also include ourselves as an entry.
- libraryPackages.add(p);
}
StringPool typeStrings(useUTF8);
@@ -3147,7 +3142,8 @@
const size_t libStart = dest->getSize();
const size_t count = libs.size();
- ResTable_lib_header* libHeader = (ResTable_lib_header*) dest->editDataInRange(libStart, sizeof(ResTable_lib_header));
+ ResTable_lib_header* libHeader = (ResTable_lib_header*) dest->editDataInRange(
+ libStart, sizeof(ResTable_lib_header));
memset(libHeader, 0, sizeof(*libHeader));
libHeader->header.type = htods(RES_TABLE_LIBRARY_TYPE);
@@ -3163,7 +3159,8 @@
String8(libPackage->getName()).string(),
(uint8_t)libPackage->getAssignedId()));
- ResTable_lib_entry* entry = (ResTable_lib_entry*) dest->editDataInRange(entryStart, sizeof(ResTable_lib_entry));
+ ResTable_lib_entry* entry = (ResTable_lib_entry*) dest->editDataInRange(
+ entryStart, sizeof(ResTable_lib_entry));
memset(entry, 0, sizeof(*entry));
entry->packageId = htodl(libPackage->getAssignedId());
strcpy16_htod(entry->packageName, libPackage->getName().string());
diff --git a/wifi/java/android/net/wifi/ScanResult.java b/wifi/java/android/net/wifi/ScanResult.java
index a01a6b6..f2db206 100644
--- a/wifi/java/android/net/wifi/ScanResult.java
+++ b/wifi/java/android/net/wifi/ScanResult.java
@@ -106,7 +106,24 @@
* Status: indicating join status
* @hide
*/
- public int status;
+ public int autoJoinStatus;
+
+ /**
+ * @hide
+ * Last time we blacklisted the ScanResult
+ */
+ public long blackListTimestamp;
+
+ /** @hide **/
+ public void setAutoJoinStatus(int status) {
+ if (status < 0) status = 0;
+ if (status == 0) {
+ blackListTimestamp = 0;
+ } else if (status > autoJoinStatus) {
+ blackListTimestamp = System.currentTimeMillis();
+ }
+ autoJoinStatus = status;
+ }
/**
* Status: indicating the scan result is not a result
@@ -244,7 +261,7 @@
distanceSdCm = source.distanceSdCm;
seen = source.seen;
passpoint = source.passpoint;
- status = source.status;
+ autoJoinStatus = source.autoJoinStatus;
untrusted = source.untrusted;
numConnection = source.numConnection;
numUsage = source.numUsage;
@@ -282,8 +299,8 @@
append("(cm)");
sb.append(", passpoint: ").append(passpoint != null ? "yes" : "no");
- if (status != 0) {
- sb.append(", status: ").append(status);
+ if (autoJoinStatus != 0) {
+ sb.append(", status: ").append(autoJoinStatus);
}
return sb.toString();
}
@@ -309,7 +326,7 @@
dest.writeInt(distanceCm);
dest.writeInt(distanceSdCm);
dest.writeLong(seen);
- dest.writeInt(status);
+ dest.writeInt(autoJoinStatus);
dest.writeInt(untrusted ? 1 : 0);
dest.writeInt(numConnection);
dest.writeInt(numUsage);
@@ -350,7 +367,7 @@
in.readInt()
);
sr.seen = in.readLong();
- sr.status = in.readInt();
+ sr.autoJoinStatus = in.readInt();
sr.untrusted = in.readInt() != 0;
sr.numConnection = in.readInt();
sr.numUsage = in.readInt();
diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java
index 3d976e7..e27bd7e 100644
--- a/wifi/java/android/net/wifi/WifiManager.java
+++ b/wifi/java/android/net/wifi/WifiManager.java
@@ -1696,7 +1696,6 @@
*
* @hide
*/
- @SystemApi
public void connect(WifiConfiguration config, ActionListener listener) {
if (config == null) throw new IllegalArgumentException("config cannot be null");
validateChannel();
@@ -1719,7 +1718,6 @@
* initialized again
* @hide
*/
- @SystemApi
public void connect(int networkId, ActionListener listener) {
if (networkId < 0) throw new IllegalArgumentException("Network id cannot be negative");
validateChannel();
@@ -1744,7 +1742,6 @@
* initialized again
* @hide
*/
- @SystemApi
public void save(WifiConfiguration config, ActionListener listener) {
if (config == null) throw new IllegalArgumentException("config cannot be null");
validateChannel();
@@ -1764,7 +1761,6 @@
* initialized again
* @hide
*/
- @SystemApi
public void forget(int netId, ActionListener listener) {
if (netId < 0) throw new IllegalArgumentException("Network id cannot be negative");
validateChannel();
@@ -1780,7 +1776,6 @@
* initialized again
* @hide
*/
- @SystemApi
public void disable(int netId, ActionListener listener) {
if (netId < 0) throw new IllegalArgumentException("Network id cannot be negative");
validateChannel();