Merge "[Telephony Mainline] Hide TelephonyServiceManager and TelephonyFrameworkInitializer" into rvc-dev
diff --git a/apex/statsd/aidl/android/os/IStatsd.aidl b/apex/statsd/aidl/android/os/IStatsd.aidl
index 445ae1d..d5b5949 100644
--- a/apex/statsd/aidl/android/os/IStatsd.aidl
+++ b/apex/statsd/aidl/android/os/IStatsd.aidl
@@ -196,7 +196,7 @@
*
* Enforces the REGISTER_STATS_PULL_ATOM permission.
*/
- oneway void registerNativePullAtomCallback(int atomTag, long coolDownNs, long timeoutNs,
+ oneway void registerNativePullAtomCallback(int atomTag, long coolDownMillis, long timeoutMillis,
in int[] additiveFields, IPullAtomCallback pullerCallback);
/**
diff --git a/apex/statsd/tests/libstatspull/jni/stats_pull_helper.cpp b/apex/statsd/tests/libstatspull/jni/stats_pull_helper.cpp
index 9e5aa95..166592d 100644
--- a/apex/statsd/tests/libstatspull/jni/stats_pull_helper.cpp
+++ b/apex/statsd/tests/libstatspull/jni/stats_pull_helper.cpp
@@ -44,30 +44,27 @@
return sPullReturnVal;
}
-extern "C"
-JNIEXPORT void JNICALL
-Java_com_android_internal_os_statsd_libstats_LibStatsPullTests_registerStatsPuller(
- JNIEnv* /*env*/, jobject /* this */, jint atomTag, jlong timeoutNs, jlong coolDownNs,
- jint pullRetVal, jlong latencyMillis, int atomsPerPull)
-{
+extern "C" JNIEXPORT void JNICALL
+Java_com_android_internal_os_statsd_libstats_LibStatsPullTests_setStatsPuller(
+ JNIEnv* /*env*/, jobject /* this */, jint atomTag, jlong timeoutMillis,
+ jlong coolDownMillis, jint pullRetVal, jlong latencyMillis, int atomsPerPull) {
sAtomTag = atomTag;
sPullReturnVal = pullRetVal;
sLatencyMillis = latencyMillis;
sAtomsPerPull = atomsPerPull;
sNumPulls = 0;
AStatsManager_PullAtomMetadata* metadata = AStatsManager_PullAtomMetadata_obtain();
- AStatsManager_PullAtomMetadata_setCoolDownNs(metadata, coolDownNs);
- AStatsManager_PullAtomMetadata_setTimeoutNs(metadata, timeoutNs);
+ AStatsManager_PullAtomMetadata_setCoolDownMillis(metadata, coolDownMillis);
+ AStatsManager_PullAtomMetadata_setTimeoutMillis(metadata, timeoutMillis);
- AStatsManager_registerPullAtomCallback(sAtomTag, &pullAtomCallback, metadata, nullptr);
+ AStatsManager_setPullAtomCallback(sAtomTag, metadata, &pullAtomCallback, nullptr);
AStatsManager_PullAtomMetadata_release(metadata);
}
-extern "C"
-JNIEXPORT void JNICALL
-Java_com_android_internal_os_statsd_libstats_LibStatsPullTests_unregisterStatsPuller(
- JNIEnv* /*env*/, jobject /* this */, jint /*atomTag*/)
-{
- AStatsManager_unregisterPullAtomCallback(sAtomTag);
+extern "C" JNIEXPORT void JNICALL
+Java_com_android_internal_os_statsd_libstats_LibStatsPullTests_clearStatsPuller(JNIEnv* /*env*/,
+ jobject /* this */,
+ jint /*atomTag*/) {
+ AStatsManager_clearPullAtomCallback(sAtomTag);
}
} // namespace
diff --git a/apex/statsd/tests/libstatspull/src/com/android/internal/os/statsd/libstats/LibStatsPullTests.java b/apex/statsd/tests/libstatspull/src/com/android/internal/os/statsd/libstats/LibStatsPullTests.java
index d4e51e0..3f199e8 100644
--- a/apex/statsd/tests/libstatspull/src/com/android/internal/os/statsd/libstats/LibStatsPullTests.java
+++ b/apex/statsd/tests/libstatspull/src/com/android/internal/os/statsd/libstats/LibStatsPullTests.java
@@ -58,8 +58,8 @@
private static int sPullReturnValue;
private static long sConfigId;
private static long sPullLatencyMillis;
- private static long sPullTimeoutNs;
- private static long sCoolDownNs;
+ private static long sPullTimeoutMillis;
+ private static long sCoolDownMillis;
private static int sAtomsPerPull;
static {
@@ -75,8 +75,8 @@
assertThat(InstrumentationRegistry.getInstrumentation()).isNotNull();
sPullReturnValue = StatsManager.PULL_SUCCESS;
sPullLatencyMillis = 0;
- sPullTimeoutNs = 10_000_000_000L;
- sCoolDownNs = 1_000_000_000L;
+ sPullTimeoutMillis = 10_000L;
+ sCoolDownMillis = 1_000L;
sAtomsPerPull = 1;
}
@@ -85,7 +85,7 @@
*/
@After
public void tearDown() throws Exception {
- unregisterStatsPuller(PULL_ATOM_TAG);
+ clearStatsPuller(PULL_ATOM_TAG);
StatsManager statsManager = (StatsManager) mContext.getSystemService(
Context.STATS_MANAGER);
statsManager.removeConfig(sConfigId);
@@ -102,14 +102,14 @@
createAndAddConfigToStatsd(statsManager);
// Add the puller.
- registerStatsPuller(PULL_ATOM_TAG, sPullTimeoutNs, sCoolDownNs, sPullReturnValue,
+ setStatsPuller(PULL_ATOM_TAG, sPullTimeoutMillis, sCoolDownMillis, sPullReturnValue,
sPullLatencyMillis, sAtomsPerPull);
Thread.sleep(SHORT_SLEEP_MILLIS);
StatsLog.logStart(APP_BREADCRUMB_LABEL);
// Let the current bucket finish.
Thread.sleep(LONG_SLEEP_MILLIS);
List<Atom> data = StatsConfigUtils.getGaugeMetricDataList(statsManager, sConfigId);
- unregisterStatsPuller(PULL_ATOM_TAG);
+ clearStatsPuller(PULL_ATOM_TAG);
assertThat(data.size()).isEqualTo(1);
TestAtoms.PullCallbackAtomWrapper atomWrapper = null;
try {
@@ -135,14 +135,14 @@
createAndAddConfigToStatsd(statsManager);
sPullReturnValue = StatsManager.PULL_SKIP;
// Add the puller.
- registerStatsPuller(PULL_ATOM_TAG, sPullTimeoutNs, sCoolDownNs, sPullReturnValue,
+ setStatsPuller(PULL_ATOM_TAG, sPullTimeoutMillis, sCoolDownMillis, sPullReturnValue,
sPullLatencyMillis, sAtomsPerPull);
Thread.sleep(SHORT_SLEEP_MILLIS);
StatsLog.logStart(APP_BREADCRUMB_LABEL);
// Let the current bucket finish.
Thread.sleep(LONG_SLEEP_MILLIS);
List<Atom> data = StatsConfigUtils.getGaugeMetricDataList(statsManager, sConfigId);
- unregisterStatsPuller(PULL_ATOM_TAG);
+ clearStatsPuller(PULL_ATOM_TAG);
assertThat(data.size()).isEqualTo(0);
}
@@ -157,17 +157,17 @@
// The puller will sleep for 1.5 sec.
sPullLatencyMillis = 1_500;
// 1 second timeout
- sPullTimeoutNs = 1_000_000_000;
+ sPullTimeoutMillis = 1_000;
// Add the puller.
- registerStatsPuller(PULL_ATOM_TAG, sPullTimeoutNs, sCoolDownNs, sPullReturnValue,
+ setStatsPuller(PULL_ATOM_TAG, sPullTimeoutMillis, sCoolDownMillis, sPullReturnValue,
sPullLatencyMillis, sAtomsPerPull);
Thread.sleep(SHORT_SLEEP_MILLIS);
StatsLog.logStart(APP_BREADCRUMB_LABEL);
// Let the current bucket finish and the pull timeout.
Thread.sleep(sPullLatencyMillis * 2);
List<Atom> data = StatsConfigUtils.getGaugeMetricDataList(statsManager, sConfigId);
- unregisterStatsPuller(PULL_ATOM_TAG);
+ clearStatsPuller(PULL_ATOM_TAG);
assertThat(data.size()).isEqualTo(0);
}
@@ -181,9 +181,9 @@
createAndAddConfigToStatsd(statsManager);
// Set the cooldown to 10 seconds
- sCoolDownNs = 10_000_000_000L;
+ sCoolDownMillis = 10_000L;
// Add the puller.
- registerStatsPuller(PULL_ATOM_TAG, sPullTimeoutNs, sCoolDownNs, sPullReturnValue,
+ setStatsPuller(PULL_ATOM_TAG, sPullTimeoutMillis, sCoolDownMillis, sPullReturnValue,
sPullLatencyMillis, sAtomsPerPull);
Thread.sleep(SHORT_SLEEP_MILLIS);
@@ -192,7 +192,7 @@
StatsLog.logStart(APP_BREADCRUMB_LABEL);
Thread.sleep(LONG_SLEEP_MILLIS);
List<Atom> data = StatsConfigUtils.getGaugeMetricDataList(statsManager, sConfigId);
- unregisterStatsPuller(PULL_ATOM_TAG);
+ clearStatsPuller(PULL_ATOM_TAG);
assertThat(data.size()).isEqualTo(2);
for (int i = 0; i < data.size(); i++) {
TestAtoms.PullCallbackAtomWrapper atomWrapper = null;
@@ -221,7 +221,7 @@
createAndAddConfigToStatsd(statsManager);
sAtomsPerPull = 1000;
// Add the puller.
- registerStatsPuller(PULL_ATOM_TAG, sPullTimeoutNs, sCoolDownNs, sPullReturnValue,
+ setStatsPuller(PULL_ATOM_TAG, sPullTimeoutMillis, sCoolDownMillis, sPullReturnValue,
sPullLatencyMillis, sAtomsPerPull);
Thread.sleep(SHORT_SLEEP_MILLIS);
@@ -229,7 +229,7 @@
// Let the current bucket finish.
Thread.sleep(LONG_SLEEP_MILLIS);
List<Atom> data = StatsConfigUtils.getGaugeMetricDataList(statsManager, sConfigId);
- unregisterStatsPuller(PULL_ATOM_TAG);
+ clearStatsPuller(PULL_ATOM_TAG);
assertThat(data.size()).isEqualTo(sAtomsPerPull);
for (int i = 0; i < data.size(); i++) {
@@ -276,9 +276,9 @@
assertThat(StatsConfigUtils.verifyValidConfigExists(statsManager, sConfigId)).isTrue();
}
- private native void registerStatsPuller(int atomTag, long timeoutNs, long coolDownNs,
+ private native void setStatsPuller(int atomTag, long timeoutMillis, long coolDownMillis,
int pullReturnVal, long latencyMillis, int atomPerPull);
- private native void unregisterStatsPuller(int atomTag);
+ private native void clearStatsPuller(int atomTag);
}
diff --git a/api/current.txt b/api/current.txt
index 26d91f4..5c0fc0b 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -278,6 +278,7 @@
field public static final int activityCloseExitAnimation = 16842939; // 0x10100bb
field public static final int activityOpenEnterAnimation = 16842936; // 0x10100b8
field public static final int activityOpenExitAnimation = 16842937; // 0x10100b9
+ field public static final int actor = 16844313; // 0x1010619
field public static final int addPrintersActivity = 16843750; // 0x10103e6
field public static final int addStatesFromChildren = 16842992; // 0x10100f0
field public static final int adjustViewBounds = 16843038; // 0x101011e
@@ -17229,8 +17230,8 @@
field @NonNull public static final android.hardware.camera2.CameraCharacteristics.Key<android.util.Rational> CONTROL_AE_COMPENSATION_STEP;
field @NonNull public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Boolean> CONTROL_AE_LOCK_AVAILABLE;
field @NonNull public static final android.hardware.camera2.CameraCharacteristics.Key<int[]> CONTROL_AF_AVAILABLE_MODES;
- field @NonNull public static final android.hardware.camera2.CameraCharacteristics.Key<android.hardware.camera2.params.Capability[]> CONTROL_AVAILABLE_BOKEH_CAPABILITIES;
field @NonNull public static final android.hardware.camera2.CameraCharacteristics.Key<int[]> CONTROL_AVAILABLE_EFFECTS;
+ field @NonNull public static final android.hardware.camera2.CameraCharacteristics.Key<android.hardware.camera2.params.Capability[]> CONTROL_AVAILABLE_EXTENDED_SCENE_MODE_CAPABILITIES;
field @NonNull public static final android.hardware.camera2.CameraCharacteristics.Key<int[]> CONTROL_AVAILABLE_MODES;
field @NonNull public static final android.hardware.camera2.CameraCharacteristics.Key<int[]> CONTROL_AVAILABLE_SCENE_MODES;
field @NonNull public static final android.hardware.camera2.CameraCharacteristics.Key<int[]> CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES;
@@ -17451,9 +17452,6 @@
field public static final int CONTROL_AWB_STATE_INACTIVE = 0; // 0x0
field public static final int CONTROL_AWB_STATE_LOCKED = 3; // 0x3
field public static final int CONTROL_AWB_STATE_SEARCHING = 1; // 0x1
- field public static final int CONTROL_BOKEH_MODE_CONTINUOUS = 2; // 0x2
- field public static final int CONTROL_BOKEH_MODE_OFF = 0; // 0x0
- field public static final int CONTROL_BOKEH_MODE_STILL_CAPTURE = 1; // 0x1
field public static final int CONTROL_CAPTURE_INTENT_CUSTOM = 0; // 0x0
field public static final int CONTROL_CAPTURE_INTENT_MANUAL = 6; // 0x6
field public static final int CONTROL_CAPTURE_INTENT_MOTION_TRACKING = 7; // 0x7
@@ -17471,9 +17469,13 @@
field public static final int CONTROL_EFFECT_MODE_SEPIA = 4; // 0x4
field public static final int CONTROL_EFFECT_MODE_SOLARIZE = 3; // 0x3
field public static final int CONTROL_EFFECT_MODE_WHITEBOARD = 6; // 0x6
+ field public static final int CONTROL_EXTENDED_SCENE_MODE_BOKEH_CONTINUOUS = 2; // 0x2
+ field public static final int CONTROL_EXTENDED_SCENE_MODE_BOKEH_STILL_CAPTURE = 1; // 0x1
+ field public static final int CONTROL_EXTENDED_SCENE_MODE_DISABLED = 0; // 0x0
field public static final int CONTROL_MODE_AUTO = 1; // 0x1
field public static final int CONTROL_MODE_OFF = 0; // 0x0
field public static final int CONTROL_MODE_OFF_KEEP_STATE = 3; // 0x3
+ field public static final int CONTROL_MODE_USE_EXTENDED_SCENE_MODE = 4; // 0x4
field public static final int CONTROL_MODE_USE_SCENE_MODE = 2; // 0x2
field public static final int CONTROL_SCENE_MODE_ACTION = 2; // 0x2
field public static final int CONTROL_SCENE_MODE_BARCODE = 16; // 0x10
@@ -17665,10 +17667,10 @@
field @NonNull public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Boolean> CONTROL_AWB_LOCK;
field @NonNull public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> CONTROL_AWB_MODE;
field @NonNull public static final android.hardware.camera2.CaptureRequest.Key<android.hardware.camera2.params.MeteringRectangle[]> CONTROL_AWB_REGIONS;
- field @NonNull public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> CONTROL_BOKEH_MODE;
field @NonNull public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> CONTROL_CAPTURE_INTENT;
field @NonNull public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> CONTROL_EFFECT_MODE;
field @NonNull public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Boolean> CONTROL_ENABLE_ZSL;
+ field @NonNull public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> CONTROL_EXTENDED_SCENE_MODE;
field @NonNull public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> CONTROL_MODE;
field @NonNull public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> CONTROL_POST_RAW_SENSITIVITY_BOOST;
field @NonNull public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> CONTROL_SCENE_MODE;
@@ -17752,10 +17754,10 @@
field @NonNull public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> CONTROL_AWB_MODE;
field @NonNull public static final android.hardware.camera2.CaptureResult.Key<android.hardware.camera2.params.MeteringRectangle[]> CONTROL_AWB_REGIONS;
field @NonNull public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> CONTROL_AWB_STATE;
- field @NonNull public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> CONTROL_BOKEH_MODE;
field @NonNull public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> CONTROL_CAPTURE_INTENT;
field @NonNull public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> CONTROL_EFFECT_MODE;
field @NonNull public static final android.hardware.camera2.CaptureResult.Key<java.lang.Boolean> CONTROL_ENABLE_ZSL;
+ field @NonNull public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> CONTROL_EXTENDED_SCENE_MODE;
field @NonNull public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> CONTROL_MODE;
field @NonNull public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> CONTROL_POST_RAW_SENSITIVITY_BOOST;
field @NonNull public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> CONTROL_SCENE_MODE;
@@ -26869,9 +26871,11 @@
field public static final int CONNECTION_STATE_CONNECTING = 1; // 0x1
field public static final int CONNECTION_STATE_DISCONNECTED = 0; // 0x0
field @NonNull public static final android.os.Parcelable.Creator<android.media.MediaRoute2Info> CREATOR;
- field public static final String FEATURE_LIVE_AUDIO = "android.media.intent.category.LIVE_AUDIO";
- field public static final String FEATURE_LIVE_VIDEO = "android.media.intent.category.LIVE_VIDEO";
- field public static final String FEATURE_REMOTE_PLAYBACK = "android.media.intent.category.REMOTE_PLAYBACK";
+ field public static final String FEATURE_LIVE_AUDIO = "android.media.route.feature.LIVE_AUDIO";
+ field public static final String FEATURE_LIVE_VIDEO = "android.media.route.feature.LIVE_VIDEO";
+ field public static final String FEATURE_REMOTE_AUDIO_PLAYBACK = "android.media.route.feature.REMOTE_AUDIO_PLAYBACK";
+ field public static final String FEATURE_REMOTE_PLAYBACK = "android.media.route.feature.REMOTE_PLAYBACK";
+ field public static final String FEATURE_REMOTE_VIDEO_PLAYBACK = "android.media.route.feature.REMOTE_VIDEO_PLAYBACK";
field public static final int PLAYBACK_VOLUME_FIXED = 0; // 0x0
field public static final int PLAYBACK_VOLUME_VARIABLE = 1; // 0x1
}
@@ -27093,9 +27097,9 @@
public abstract static class MediaRouter2.TransferCallback {
ctor public MediaRouter2.TransferCallback();
- method public void onStopped(@NonNull android.media.MediaRouter2.RoutingController);
- method public void onTransferFailed(@NonNull android.media.MediaRoute2Info);
- method public void onTransferred(@NonNull android.media.MediaRouter2.RoutingController, @NonNull android.media.MediaRouter2.RoutingController);
+ method public void onStop(@NonNull android.media.MediaRouter2.RoutingController);
+ method public void onTransfer(@NonNull android.media.MediaRouter2.RoutingController, @NonNull android.media.MediaRouter2.RoutingController);
+ method public void onTransferFailure(@NonNull android.media.MediaRoute2Info);
}
public class MediaScannerConnection implements android.content.ServiceConnection {
@@ -47787,7 +47791,7 @@
method @Deprecated public void sendMultimediaMessage(android.content.Context, android.net.Uri, String, android.os.Bundle, android.app.PendingIntent);
method public void sendMultipartTextMessage(String, String, java.util.ArrayList<java.lang.String>, java.util.ArrayList<android.app.PendingIntent>, java.util.ArrayList<android.app.PendingIntent>);
method public void sendMultipartTextMessage(@NonNull String, @Nullable String, @NonNull java.util.List<java.lang.String>, @Nullable java.util.List<android.app.PendingIntent>, @Nullable java.util.List<android.app.PendingIntent>, long);
- method public void sendMultipartTextMessage(@NonNull String, @Nullable String, @NonNull java.util.List<java.lang.String>, @Nullable java.util.List<android.app.PendingIntent>, @Nullable java.util.List<android.app.PendingIntent>, @NonNull String);
+ method public void sendMultipartTextMessage(@NonNull String, @Nullable String, @NonNull java.util.List<java.lang.String>, @Nullable java.util.List<android.app.PendingIntent>, @Nullable java.util.List<android.app.PendingIntent>, @NonNull String, @Nullable String);
method public void sendTextMessage(String, String, String, android.app.PendingIntent, android.app.PendingIntent);
method public void sendTextMessage(@NonNull String, @Nullable String, @NonNull String, @Nullable android.app.PendingIntent, @Nullable android.app.PendingIntent, long);
method @RequiresPermission(allOf={android.Manifest.permission.MODIFY_PHONE_STATE, android.Manifest.permission.SEND_SMS}) public void sendTextMessageWithoutPersisting(String, String, String, android.app.PendingIntent, android.app.PendingIntent);
diff --git a/api/system-current.txt b/api/system-current.txt
index a6a7137..e932ef3 100755
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -10555,9 +10555,6 @@
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean isInEmergencyCall();
method @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isRinging();
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setUserSelectedOutgoingPhoneAccount(@Nullable android.telecom.PhoneAccountHandle);
- field public static final int CALL_SOURCE_EMERGENCY_DIALPAD = 1; // 0x1
- field public static final int CALL_SOURCE_EMERGENCY_SHORTCUT = 2; // 0x2
- field public static final int CALL_SOURCE_UNSPECIFIED = 0; // 0x0
field public static final String EXTRA_CALL_BACK_INTENT = "android.telecom.extra.CALL_BACK_INTENT";
field public static final String EXTRA_CLEAR_MISSED_CALLS_INTENT = "android.telecom.extra.CLEAR_MISSED_CALLS_INTENT";
field public static final String EXTRA_CONNECTION_SERVICE = "android.telecom.extra.CONNECTION_SERVICE";
@@ -11400,6 +11397,7 @@
method public boolean isDataConnectivityPossible();
method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isDataEnabledForApn(int);
method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isEmergencyAssistanceEnabled();
+ method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @WorkerThread public boolean isIccLockEnabled();
method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isIdle();
method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isInEmergencySmsMode();
method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isLteCdmaEvdoGsmWcdmaEnabled();
diff --git a/cmds/statsd/src/StatsService.cpp b/cmds/statsd/src/StatsService.cpp
index 7ad9826..812d10b 100644
--- a/cmds/statsd/src/StatsService.cpp
+++ b/cmds/statsd/src/StatsService.cpp
@@ -1209,9 +1209,10 @@
return Status::ok();
}
-Status StatsService::registerNativePullAtomCallback(int32_t atomTag, int64_t coolDownNs,
- int64_t timeoutNs, const std::vector<int32_t>& additiveFields,
- const shared_ptr<IPullAtomCallback>& pullerCallback) {
+Status StatsService::registerNativePullAtomCallback(
+ int32_t atomTag, int64_t coolDownMillis, int64_t timeoutMillis,
+ const std::vector<int32_t>& additiveFields,
+ const shared_ptr<IPullAtomCallback>& pullerCallback) {
if (!checkPermission(kPermissionRegisterPullAtom)) {
return exception(
EX_SECURITY,
@@ -1220,7 +1221,8 @@
}
VLOG("StatsService::registerNativePullAtomCallback called.");
int32_t uid = AIBinder_getCallingUid();
- mPullerManager->RegisterPullAtomCallback(uid, atomTag, coolDownNs, timeoutNs, additiveFields,
+ mPullerManager->RegisterPullAtomCallback(uid, atomTag, MillisToNano(coolDownMillis),
+ MillisToNano(timeoutMillis), additiveFields,
pullerCallback);
return Status::ok();
}
diff --git a/cmds/statsd/src/StatsService.h b/cmds/statsd/src/StatsService.h
index c256e1f..114c84f 100644
--- a/cmds/statsd/src/StatsService.h
+++ b/cmds/statsd/src/StatsService.h
@@ -175,8 +175,9 @@
/**
* Binder call to register a callback function for a pulled atom.
*/
- virtual Status registerNativePullAtomCallback(int32_t atomTag, int64_t coolDownNs,
- int64_t timeoutNs, const std::vector<int32_t>& additiveFields,
+ virtual Status registerNativePullAtomCallback(
+ int32_t atomTag, int64_t coolDownMillis, int64_t timeoutMillis,
+ const std::vector<int32_t>& additiveFields,
const shared_ptr<IPullAtomCallback>& pullerCallback) override;
/**
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index f6ab9af4..31fc2d0 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -7583,7 +7583,10 @@
isOneToOne = !isGroupConversation();
}
boolean isConversationLayout = mConversationType != CONVERSATION_TYPE_LEGACY;
- Icon largeIcon = isConversationLayout ? mShortcutIcon : mBuilder.mN.mLargeIcon;
+ boolean isImportantConversation = mConversationType == CONVERSATION_TYPE_IMPORTANT;
+ Icon largeIcon = isConversationLayout && mShortcutIcon != null
+ ? mShortcutIcon
+ : mBuilder.mN.mLargeIcon;
TemplateBindResult bindResult = new TemplateBindResult();
StandardTemplateParams p = mBuilder.mParams.reset()
.hasProgress(false)
@@ -7625,6 +7628,10 @@
isOneToOne);
contentView.setCharSequence(R.id.status_bar_latest_event_content,
"setConversationTitle", conversationTitle);
+ if (isConversationLayout) {
+ contentView.setBoolean(R.id.status_bar_latest_event_content,
+ "setIsImportantConversation", isImportantConversation);
+ }
contentView.setIcon(R.id.status_bar_latest_event_content, "setLargeIcon",
largeIcon);
contentView.setBundle(R.id.status_bar_latest_event_content, "setData",
diff --git a/core/java/android/bluetooth/BluetoothHearingAid.java b/core/java/android/bluetooth/BluetoothHearingAid.java
index 38498bc..5891072 100644
--- a/core/java/android/bluetooth/BluetoothHearingAid.java
+++ b/core/java/android/bluetooth/BluetoothHearingAid.java
@@ -496,17 +496,20 @@
}
/**
- * Get the CustomerId of the device.
+ * Get the HiSyncId (unique hearing aid device identifier) of the device.
+ *
+ * <a href=https://source.android.com/devices/bluetooth/asha#hisyncid>HiSyncId documentation
+ * can be found here</a>
*
* @param device Bluetooth device
- * @return the CustomerId of the device
+ * @return the HiSyncId of the device
* @hide
*/
@SystemApi
@RequiresPermission(Manifest.permission.BLUETOOTH)
public long getHiSyncId(@Nullable BluetoothDevice device) {
if (VDBG) {
- log("getCustomerId(" + device + ")");
+ log("getHiSyncId(" + device + ")");
}
final IBluetoothHearingAid service = getService();
try {
diff --git a/core/java/android/hardware/camera2/CameraCharacteristics.java b/core/java/android/hardware/camera2/CameraCharacteristics.java
index 6539c68..34a40ae 100644
--- a/core/java/android/hardware/camera2/CameraCharacteristics.java
+++ b/core/java/android/hardware/camera2/CameraCharacteristics.java
@@ -1125,42 +1125,43 @@
new Key<android.util.Range<Integer>>("android.control.postRawSensitivityBoostRange", new TypeReference<android.util.Range<Integer>>() {{ }});
/**
- * <p>The list of bokeh modes for {@link CaptureRequest#CONTROL_BOKEH_MODE android.control.bokehMode} that are supported by this camera
- * device, and each bokeh mode's maximum streaming (non-stall) size with bokeh effect.</p>
- * <p>For OFF mode, the camera behaves normally with no bokeh effect.</p>
- * <p>For STILL_CAPTURE mode, the maximum streaming dimension specifies the limit under which
- * bokeh is effective when capture intent is PREVIEW. Note that when capture intent is
- * PREVIEW, the bokeh effect may not be as high quality compared to STILL_CAPTURE intent
- * in order to maintain reasonable frame rate. The maximum streaming dimension must be one
- * of the YUV_420_888 or PRIVATE resolutions in availableStreamConfigurations, or (0, 0)
- * if preview bokeh is not supported. If the application configures a stream larger than
- * the maximum streaming dimension, bokeh effect may not be applied for this stream for
- * PREVIEW intent.</p>
- * <p>For CONTINUOUS mode, the maximum streaming dimension specifies the limit under which
- * bokeh is effective. This dimension must be one of the YUV_420_888 or PRIVATE resolutions
- * in availableStreamConfigurations, and if the sensor maximum resolution is larger than or
- * equal to 1080p, the maximum streaming dimension must be at least 1080p. If the
- * application configures a stream with larger dimension, the stream may not have bokeh
- * effect applied.</p>
+ * <p>The list of extended scene modes for {@link CaptureRequest#CONTROL_EXTENDED_SCENE_MODE android.control.extendedSceneMode} that are supported
+ * by this camera device, and each extended scene mode's maximum streaming (non-stall) size
+ * with effect.</p>
+ * <p>For DISABLED mode, the camera behaves normally with no extended scene mode enabled.</p>
+ * <p>For BOKEH_STILL_CAPTURE mode, the maximum streaming dimension specifies the limit
+ * under which bokeh is effective when capture intent is PREVIEW. Note that when capture
+ * intent is PREVIEW, the bokeh effect may not be as high in quality compared to
+ * STILL_CAPTURE intent in order to maintain reasonable frame rate. The maximum streaming
+ * dimension must be one of the YUV_420_888 or PRIVATE resolutions in
+ * availableStreamConfigurations, or (0, 0) if preview bokeh is not supported. If the
+ * application configures a stream larger than the maximum streaming dimension, bokeh
+ * effect may not be applied for this stream for PREVIEW intent.</p>
+ * <p>For BOKEH_CONTINUOUS mode, the maximum streaming dimension specifies the limit under
+ * which bokeh is effective. This dimension must be one of the YUV_420_888 or PRIVATE
+ * resolutions in availableStreamConfigurations, and if the sensor maximum resolution is
+ * larger than or equal to 1080p, the maximum streaming dimension must be at least 1080p.
+ * If the application configures a stream with larger dimension, the stream may not have
+ * bokeh effect applied.</p>
* <p><b>Units</b>: (mode, width, height)</p>
* <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
* <p><b>Limited capability</b> -
* Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
* {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
*
- * @see CaptureRequest#CONTROL_BOKEH_MODE
+ * @see CaptureRequest#CONTROL_EXTENDED_SCENE_MODE
* @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
* @hide
*/
- public static final Key<int[]> CONTROL_AVAILABLE_BOKEH_MAX_SIZES =
- new Key<int[]>("android.control.availableBokehMaxSizes", int[].class);
+ public static final Key<int[]> CONTROL_AVAILABLE_EXTENDED_SCENE_MODE_MAX_SIZES =
+ new Key<int[]>("android.control.availableExtendedSceneModeMaxSizes", int[].class);
/**
- * <p>The ranges of supported zoom ratio for non-OFF {@link CaptureRequest#CONTROL_BOKEH_MODE android.control.bokehMode}.</p>
- * <p>When bokeh mode is enabled, the camera device may have limited range of zoom ratios
- * compared to when bokeh mode is disabled. This tag lists the zoom ratio ranges for all
- * supported non-OFF bokeh modes, in the same order as in
- * {@link CameraCharacteristics#CONTROL_AVAILABLE_BOKEH_CAPABILITIES android.control.availableBokehCapabilities}.</p>
+ * <p>The ranges of supported zoom ratio for non-DISABLED {@link CaptureRequest#CONTROL_EXTENDED_SCENE_MODE android.control.extendedSceneMode}.</p>
+ * <p>When extended scene mode is set, the camera device may have limited range of zoom ratios
+ * compared to when extended scene mode is DISABLED. This tag lists the zoom ratio ranges
+ * for all supported non-DISABLED extended scene modes, in the same order as in
+ * android.control.availableExtended.</p>
* <p>Range [1.0, 1.0] means that no zoom (optical or digital) is supported.</p>
* <p><b>Units</b>: (minZoom, maxZoom)</p>
* <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
@@ -1168,46 +1169,45 @@
* Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
* {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
*
- * @see CameraCharacteristics#CONTROL_AVAILABLE_BOKEH_CAPABILITIES
- * @see CaptureRequest#CONTROL_BOKEH_MODE
+ * @see CaptureRequest#CONTROL_EXTENDED_SCENE_MODE
* @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
* @hide
*/
- public static final Key<float[]> CONTROL_AVAILABLE_BOKEH_ZOOM_RATIO_RANGES =
- new Key<float[]>("android.control.availableBokehZoomRatioRanges", float[].class);
+ public static final Key<float[]> CONTROL_AVAILABLE_EXTENDED_SCENE_MODE_ZOOM_RATIO_RANGES =
+ new Key<float[]>("android.control.availableExtendedSceneModeZoomRatioRanges", float[].class);
/**
- * <p>The list of bokeh modes for {@link CaptureRequest#CONTROL_BOKEH_MODE android.control.bokehMode} that are supported by
- * this camera device, and each bokeh mode's capabilities such as maximum streaming size
- * with bokeh effect, and supported zoom ratio ranges.</p>
- * <p>For OFF mode, the camera behaves normally with no bokeh effect.</p>
- * <p>For STILL_CAPTURE mode, the maximum streaming dimension specifies the limit under which
- * bokeh is effective when capture intent is PREVIEW. Note that when capture intent is
- * PREVIEW, the bokeh effect may not be as high quality compared to STILL_CAPTURE intent
- * in order to maintain reasonable frame rate. The maximum streaming dimension must be one
- * of the YUV_420_888 or PRIVATE resolutions in availableStreamConfigurations, or (0, 0)
- * if preview bokeh is not supported. If the application configures a stream larger than
- * the maximum streaming dimension, bokeh effect may not be applied for this stream for
- * PREVIEW intent.</p>
- * <p>For CONTINUOUS mode, the maximum streaming dimension specifies the limit under which
- * bokeh is effective. This dimension must be one of the YUV_420_888 or PRIVATE resolutions
- * in availableStreamConfigurations, and if the sensor maximum resolution is larger than or
- * equal to 1080p, the maximum streaming dimension must be at least 1080p. If the
- * application configures a stream with larger dimension, the stream may not have bokeh
- * effect applied.</p>
- * <p>When bokeh mode is enabled, the camera device may have limited range of zoom ratios
- * compared to when bokeh mode is disabled. availableBokehCapabilities lists the zoom
- * ranges for all supported bokeh modes. A range of (1.0, 1.0) means that no zoom
+ * <p>The list of extended scene modes for {@link CaptureRequest#CONTROL_EXTENDED_SCENE_MODE android.control.extendedSceneMode} that
+ * are supported by this camera device, and each extended scene mode's capabilities such
+ * as maximum streaming size, and supported zoom ratio ranges.</p>
+ * <p>For DISABLED mode, the camera behaves normally with no extended scene mdoe enabled.</p>
+ * <p>For BOKEH_STILL_CAPTURE mode, the maximum streaming dimension specifies the limit
+ * under which bokeh is effective when capture intent is PREVIEW. Note that when capture
+ * intent is PREVIEW, the bokeh effect may not be as high quality compared to STILL_CAPTURE
+ * intent in order to maintain reasonable frame rate. The maximum streaming dimension must
+ * be one of the YUV_420_888 or PRIVATE resolutions in availableStreamConfigurations, or
+ * (0, 0) if preview bokeh is not supported. If the application configures a stream
+ * larger than the maximum streaming dimension, bokeh effect may not be applied for this
+ * stream for PREVIEW intent.</p>
+ * <p>For BOKEH_CONTINUOUS mode, the maximum streaming dimension specifies the limit under
+ * which bokeh is effective. This dimension must be one of the YUV_420_888 or PRIVATE
+ * resolutions in availableStreamConfigurations, and if the sensor maximum resolution is
+ * larger than or equal to 1080p, the maximum streaming dimension must be at least 1080p.
+ * If the application configures a stream with larger dimension, the stream may not have
+ * bokeh effect applied.</p>
+ * <p>When extended scene mode is set, the camera device may have limited range of zoom ratios
+ * compared to when the mode is DISABLED. availableExtendedSceneModeCapabilities lists the
+ * zoom ranges for all supported extended modes. A range of (1.0, 1.0) means that no zoom
* (optical or digital) is supported.</p>
* <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
*
- * @see CaptureRequest#CONTROL_BOKEH_MODE
+ * @see CaptureRequest#CONTROL_EXTENDED_SCENE_MODE
*/
@PublicKey
@NonNull
@SyntheticKey
- public static final Key<android.hardware.camera2.params.Capability[]> CONTROL_AVAILABLE_BOKEH_CAPABILITIES =
- new Key<android.hardware.camera2.params.Capability[]>("android.control.availableBokehCapabilities", android.hardware.camera2.params.Capability[].class);
+ public static final Key<android.hardware.camera2.params.Capability[]> CONTROL_AVAILABLE_EXTENDED_SCENE_MODE_CAPABILITIES =
+ new Key<android.hardware.camera2.params.Capability[]>("android.control.availableExtendedSceneModeCapabilities", android.hardware.camera2.params.Capability[].class);
/**
* <p>Minimum and maximum zoom ratios supported by this camera device.</p>
diff --git a/core/java/android/hardware/camera2/CameraMetadata.java b/core/java/android/hardware/camera2/CameraMetadata.java
index 7bf819f..91dae66 100644
--- a/core/java/android/hardware/camera2/CameraMetadata.java
+++ b/core/java/android/hardware/camera2/CameraMetadata.java
@@ -2190,6 +2190,7 @@
* This setting can only be used if scene mode is supported (i.e.
* {@link CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES android.control.availableSceneModes}
* contain some modes other than DISABLED).</p>
+ * <p>For extended scene modes such as BOKEH, please use USE_EXTENDED_SCENE_MODE instead.</p>
*
* @see CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES
* @see CaptureRequest#CONTROL_MODE
@@ -2209,6 +2210,19 @@
*/
public static final int CONTROL_MODE_OFF_KEEP_STATE = 3;
+ /**
+ * <p>Use a specific extended scene mode.</p>
+ * <p>When extended scene mode is on, the camera device may override certain control
+ * parameters, such as targetFpsRange, AE, AWB, and AF modes, to achieve best power and
+ * quality tradeoffs. Only the mandatory stream combinations of LIMITED hardware level
+ * are guaranteed.</p>
+ * <p>This setting can only be used if extended scene mode is supported (i.e.
+ * android.control.availableExtendedSceneModes
+ * contains some modes other than DISABLED).</p>
+ * @see CaptureRequest#CONTROL_MODE
+ */
+ public static final int CONTROL_MODE_USE_EXTENDED_SCENE_MODE = 4;
+
//
// Enumeration values for CaptureRequest#CONTROL_SCENE_MODE
//
@@ -2540,32 +2554,39 @@
public static final int CONTROL_VIDEO_STABILIZATION_MODE_ON = 1;
//
- // Enumeration values for CaptureRequest#CONTROL_BOKEH_MODE
+ // Enumeration values for CaptureRequest#CONTROL_EXTENDED_SCENE_MODE
//
/**
- * <p>Bokeh mode is disabled.</p>
- * @see CaptureRequest#CONTROL_BOKEH_MODE
+ * <p>Extended scene mode is disabled.</p>
+ * @see CaptureRequest#CONTROL_EXTENDED_SCENE_MODE
*/
- public static final int CONTROL_BOKEH_MODE_OFF = 0;
+ public static final int CONTROL_EXTENDED_SCENE_MODE_DISABLED = 0;
/**
* <p>High quality bokeh mode is enabled for all non-raw streams (including YUV,
* JPEG, and IMPLEMENTATION_DEFINED) when capture intent is STILL_CAPTURE. Due to the
* extra image processing, this mode may introduce additional stall to non-raw streams.
* This mode should be used in high quality still capture use case.</p>
- * @see CaptureRequest#CONTROL_BOKEH_MODE
+ * @see CaptureRequest#CONTROL_EXTENDED_SCENE_MODE
*/
- public static final int CONTROL_BOKEH_MODE_STILL_CAPTURE = 1;
+ public static final int CONTROL_EXTENDED_SCENE_MODE_BOKEH_STILL_CAPTURE = 1;
/**
* <p>Bokeh effect must not slow down capture rate relative to sensor raw output,
* and the effect is applied to all processed streams no larger than the maximum
* streaming dimension. This mode should be used if performance and power are a
* priority, such as video recording.</p>
- * @see CaptureRequest#CONTROL_BOKEH_MODE
+ * @see CaptureRequest#CONTROL_EXTENDED_SCENE_MODE
*/
- public static final int CONTROL_BOKEH_MODE_CONTINUOUS = 2;
+ public static final int CONTROL_EXTENDED_SCENE_MODE_BOKEH_CONTINUOUS = 2;
+
+ /**
+ * <p>Vendor defined extended scene modes. These depend on vendor implementation.</p>
+ * @see CaptureRequest#CONTROL_EXTENDED_SCENE_MODE
+ * @hide
+ */
+ public static final int CONTROL_EXTENDED_SCENE_MODE_VENDOR_START = 0x40;
//
// Enumeration values for CaptureRequest#EDGE_MODE
diff --git a/core/java/android/hardware/camera2/CaptureRequest.java b/core/java/android/hardware/camera2/CaptureRequest.java
index c1554af..0ee7482 100644
--- a/core/java/android/hardware/camera2/CaptureRequest.java
+++ b/core/java/android/hardware/camera2/CaptureRequest.java
@@ -1911,10 +1911,10 @@
* capture parameters itself.</p>
* <p>When set to AUTO, the individual algorithm controls in
* android.control.* are in effect, such as {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}.</p>
- * <p>When set to USE_SCENE_MODE, the individual controls in
+ * <p>When set to USE_SCENE_MODE or USE_EXTENDED_SCENE_MODE, the individual controls in
* android.control.* are mostly disabled, and the camera device
- * implements one of the scene mode settings (such as ACTION,
- * SUNSET, or PARTY) as it wishes. The camera device scene mode
+ * implements one of the scene mode or extended scene mode settings (such as ACTION,
+ * SUNSET, PARTY, or BOKEH) as it wishes. The camera device scene mode
* 3A settings are provided by {@link android.hardware.camera2.CaptureResult capture results}.</p>
* <p>When set to OFF_KEEP_STATE, it is similar to OFF mode, the only difference
* is that this frame will not be used by camera device background 3A statistics
@@ -1927,6 +1927,7 @@
* <li>{@link #CONTROL_MODE_AUTO AUTO}</li>
* <li>{@link #CONTROL_MODE_USE_SCENE_MODE USE_SCENE_MODE}</li>
* <li>{@link #CONTROL_MODE_OFF_KEEP_STATE OFF_KEEP_STATE}</li>
+ * <li>{@link #CONTROL_MODE_USE_EXTENDED_SCENE_MODE USE_EXTENDED_SCENE_MODE}</li>
* </ul></p>
* <p><b>Available values for this device:</b><br>
* {@link CameraCharacteristics#CONTROL_AVAILABLE_MODES android.control.availableModes}</p>
@@ -1938,6 +1939,7 @@
* @see #CONTROL_MODE_AUTO
* @see #CONTROL_MODE_USE_SCENE_MODE
* @see #CONTROL_MODE_OFF_KEEP_STATE
+ * @see #CONTROL_MODE_USE_EXTENDED_SCENE_MODE
*/
@PublicKey
@NonNull
@@ -2127,52 +2129,49 @@
new Key<Boolean>("android.control.enableZsl", boolean.class);
/**
- * <p>Whether bokeh mode is enabled for a particular capture request.</p>
+ * <p>Whether extended scene mode is enabled for a particular capture request.</p>
* <p>With bokeh mode, the camera device may blur out the parts of scene that are not in
* focus, creating a bokeh (or shallow depth of field) effect for people or objects.</p>
- * <p>When set to STILL_CAPTURE bokeh mode with STILL_CAPTURE capture intent, due to the extra
+ * <p>When set to BOKEH_STILL_CAPTURE mode with STILL_CAPTURE capture intent, due to the extra
* processing needed for high quality bokeh effect, the stall may be longer than when
* capture intent is not STILL_CAPTURE.</p>
- * <p>When set to STILL_CAPTURE bokeh mode with PREVIEW capture intent,</p>
+ * <p>When set to BOKEH_STILL_CAPTURE mode with PREVIEW capture intent,</p>
* <ul>
* <li>If the camera device has BURST_CAPTURE capability, the frame rate requirement of
* BURST_CAPTURE must still be met.</li>
- * <li>All streams not larger than the maximum streaming dimension for STILL_CAPTURE mode
- * (queried via {@link android.hardware.camera2.CameraCharacteristics#CONTROL_AVAILABLE_BOKEH_CAPABILITIES })
+ * <li>All streams not larger than the maximum streaming dimension for BOKEH_STILL_CAPTURE mode
+ * (queried via {@link android.hardware.camera2.CameraCharacteristics#CONTROL_AVAILABLE_EXTENDED_SCENE_MODE_CAPABILITIES })
* will have preview bokeh effect applied.</li>
* </ul>
- * <p>When set to CONTINUOUS mode, configured streams dimension should not exceed this mode's
+ * <p>When set to BOKEH_CONTINUOUS mode, configured streams dimension should not exceed this mode's
* maximum streaming dimension in order to have bokeh effect applied. Bokeh effect may not
* be available for streams larger than the maximum streaming dimension.</p>
- * <p>Switching between different bokeh modes may involve reconfiguration of the camera
+ * <p>Switching between different extended scene modes may involve reconfiguration of the camera
* pipeline, resulting in long latency. The application should check this key against the
* available session keys queried via
* {@link android.hardware.camera2.CameraCharacteristics#getAvailableSessionKeys }.</p>
- * <p>When bokeh mode is on, the camera device may override certain control parameters, such as
- * reduce frame rate or use face priority scene mode, to achieve best power and quality
- * tradeoffs. When turned on, AE, AWB, and AF run in auto modes, and only the mandatory
- * stream combinations of LIMITED hardware level are guaranteed.</p>
* <p>For a logical multi-camera, bokeh may be implemented by stereo vision from sub-cameras
* with different field of view. As a result, when bokeh mode is enabled, the camera device
- * may override {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}, and the field of view will be smaller than when
- * bokeh mode is off.</p>
+ * may override {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} or {@link CaptureRequest#CONTROL_ZOOM_RATIO android.control.zoomRatio}, and the field of
+ * view may be smaller than when bokeh mode is off.</p>
* <p><b>Possible values:</b>
* <ul>
- * <li>{@link #CONTROL_BOKEH_MODE_OFF OFF}</li>
- * <li>{@link #CONTROL_BOKEH_MODE_STILL_CAPTURE STILL_CAPTURE}</li>
- * <li>{@link #CONTROL_BOKEH_MODE_CONTINUOUS CONTINUOUS}</li>
+ * <li>{@link #CONTROL_EXTENDED_SCENE_MODE_DISABLED DISABLED}</li>
+ * <li>{@link #CONTROL_EXTENDED_SCENE_MODE_BOKEH_STILL_CAPTURE BOKEH_STILL_CAPTURE}</li>
+ * <li>{@link #CONTROL_EXTENDED_SCENE_MODE_BOKEH_CONTINUOUS BOKEH_CONTINUOUS}</li>
* </ul></p>
* <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
*
+ * @see CaptureRequest#CONTROL_ZOOM_RATIO
* @see CaptureRequest#SCALER_CROP_REGION
- * @see #CONTROL_BOKEH_MODE_OFF
- * @see #CONTROL_BOKEH_MODE_STILL_CAPTURE
- * @see #CONTROL_BOKEH_MODE_CONTINUOUS
+ * @see #CONTROL_EXTENDED_SCENE_MODE_DISABLED
+ * @see #CONTROL_EXTENDED_SCENE_MODE_BOKEH_STILL_CAPTURE
+ * @see #CONTROL_EXTENDED_SCENE_MODE_BOKEH_CONTINUOUS
*/
@PublicKey
@NonNull
- public static final Key<Integer> CONTROL_BOKEH_MODE =
- new Key<Integer>("android.control.bokehMode", int.class);
+ public static final Key<Integer> CONTROL_EXTENDED_SCENE_MODE =
+ new Key<Integer>("android.control.extendedSceneMode", int.class);
/**
* <p>The desired zoom ratio</p>
diff --git a/core/java/android/hardware/camera2/CaptureResult.java b/core/java/android/hardware/camera2/CaptureResult.java
index b4c1d72..096aa0c 100644
--- a/core/java/android/hardware/camera2/CaptureResult.java
+++ b/core/java/android/hardware/camera2/CaptureResult.java
@@ -2118,10 +2118,10 @@
* capture parameters itself.</p>
* <p>When set to AUTO, the individual algorithm controls in
* android.control.* are in effect, such as {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}.</p>
- * <p>When set to USE_SCENE_MODE, the individual controls in
+ * <p>When set to USE_SCENE_MODE or USE_EXTENDED_SCENE_MODE, the individual controls in
* android.control.* are mostly disabled, and the camera device
- * implements one of the scene mode settings (such as ACTION,
- * SUNSET, or PARTY) as it wishes. The camera device scene mode
+ * implements one of the scene mode or extended scene mode settings (such as ACTION,
+ * SUNSET, PARTY, or BOKEH) as it wishes. The camera device scene mode
* 3A settings are provided by {@link android.hardware.camera2.CaptureResult capture results}.</p>
* <p>When set to OFF_KEEP_STATE, it is similar to OFF mode, the only difference
* is that this frame will not be used by camera device background 3A statistics
@@ -2134,6 +2134,7 @@
* <li>{@link #CONTROL_MODE_AUTO AUTO}</li>
* <li>{@link #CONTROL_MODE_USE_SCENE_MODE USE_SCENE_MODE}</li>
* <li>{@link #CONTROL_MODE_OFF_KEEP_STATE OFF_KEEP_STATE}</li>
+ * <li>{@link #CONTROL_MODE_USE_EXTENDED_SCENE_MODE USE_EXTENDED_SCENE_MODE}</li>
* </ul></p>
* <p><b>Available values for this device:</b><br>
* {@link CameraCharacteristics#CONTROL_AVAILABLE_MODES android.control.availableModes}</p>
@@ -2145,6 +2146,7 @@
* @see #CONTROL_MODE_AUTO
* @see #CONTROL_MODE_USE_SCENE_MODE
* @see #CONTROL_MODE_OFF_KEEP_STATE
+ * @see #CONTROL_MODE_USE_EXTENDED_SCENE_MODE
*/
@PublicKey
@NonNull
@@ -2357,52 +2359,49 @@
new Key<Integer>("android.control.afSceneChange", int.class);
/**
- * <p>Whether bokeh mode is enabled for a particular capture request.</p>
+ * <p>Whether extended scene mode is enabled for a particular capture request.</p>
* <p>With bokeh mode, the camera device may blur out the parts of scene that are not in
* focus, creating a bokeh (or shallow depth of field) effect for people or objects.</p>
- * <p>When set to STILL_CAPTURE bokeh mode with STILL_CAPTURE capture intent, due to the extra
+ * <p>When set to BOKEH_STILL_CAPTURE mode with STILL_CAPTURE capture intent, due to the extra
* processing needed for high quality bokeh effect, the stall may be longer than when
* capture intent is not STILL_CAPTURE.</p>
- * <p>When set to STILL_CAPTURE bokeh mode with PREVIEW capture intent,</p>
+ * <p>When set to BOKEH_STILL_CAPTURE mode with PREVIEW capture intent,</p>
* <ul>
* <li>If the camera device has BURST_CAPTURE capability, the frame rate requirement of
* BURST_CAPTURE must still be met.</li>
- * <li>All streams not larger than the maximum streaming dimension for STILL_CAPTURE mode
- * (queried via {@link android.hardware.camera2.CameraCharacteristics#CONTROL_AVAILABLE_BOKEH_CAPABILITIES })
+ * <li>All streams not larger than the maximum streaming dimension for BOKEH_STILL_CAPTURE mode
+ * (queried via {@link android.hardware.camera2.CameraCharacteristics#CONTROL_AVAILABLE_EXTENDED_SCENE_MODE_CAPABILITIES })
* will have preview bokeh effect applied.</li>
* </ul>
- * <p>When set to CONTINUOUS mode, configured streams dimension should not exceed this mode's
+ * <p>When set to BOKEH_CONTINUOUS mode, configured streams dimension should not exceed this mode's
* maximum streaming dimension in order to have bokeh effect applied. Bokeh effect may not
* be available for streams larger than the maximum streaming dimension.</p>
- * <p>Switching between different bokeh modes may involve reconfiguration of the camera
+ * <p>Switching between different extended scene modes may involve reconfiguration of the camera
* pipeline, resulting in long latency. The application should check this key against the
* available session keys queried via
* {@link android.hardware.camera2.CameraCharacteristics#getAvailableSessionKeys }.</p>
- * <p>When bokeh mode is on, the camera device may override certain control parameters, such as
- * reduce frame rate or use face priority scene mode, to achieve best power and quality
- * tradeoffs. When turned on, AE, AWB, and AF run in auto modes, and only the mandatory
- * stream combinations of LIMITED hardware level are guaranteed.</p>
* <p>For a logical multi-camera, bokeh may be implemented by stereo vision from sub-cameras
* with different field of view. As a result, when bokeh mode is enabled, the camera device
- * may override {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}, and the field of view will be smaller than when
- * bokeh mode is off.</p>
+ * may override {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} or {@link CaptureRequest#CONTROL_ZOOM_RATIO android.control.zoomRatio}, and the field of
+ * view may be smaller than when bokeh mode is off.</p>
* <p><b>Possible values:</b>
* <ul>
- * <li>{@link #CONTROL_BOKEH_MODE_OFF OFF}</li>
- * <li>{@link #CONTROL_BOKEH_MODE_STILL_CAPTURE STILL_CAPTURE}</li>
- * <li>{@link #CONTROL_BOKEH_MODE_CONTINUOUS CONTINUOUS}</li>
+ * <li>{@link #CONTROL_EXTENDED_SCENE_MODE_DISABLED DISABLED}</li>
+ * <li>{@link #CONTROL_EXTENDED_SCENE_MODE_BOKEH_STILL_CAPTURE BOKEH_STILL_CAPTURE}</li>
+ * <li>{@link #CONTROL_EXTENDED_SCENE_MODE_BOKEH_CONTINUOUS BOKEH_CONTINUOUS}</li>
* </ul></p>
* <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
*
+ * @see CaptureRequest#CONTROL_ZOOM_RATIO
* @see CaptureRequest#SCALER_CROP_REGION
- * @see #CONTROL_BOKEH_MODE_OFF
- * @see #CONTROL_BOKEH_MODE_STILL_CAPTURE
- * @see #CONTROL_BOKEH_MODE_CONTINUOUS
+ * @see #CONTROL_EXTENDED_SCENE_MODE_DISABLED
+ * @see #CONTROL_EXTENDED_SCENE_MODE_BOKEH_STILL_CAPTURE
+ * @see #CONTROL_EXTENDED_SCENE_MODE_BOKEH_CONTINUOUS
*/
@PublicKey
@NonNull
- public static final Key<Integer> CONTROL_BOKEH_MODE =
- new Key<Integer>("android.control.bokehMode", int.class);
+ public static final Key<Integer> CONTROL_EXTENDED_SCENE_MODE =
+ new Key<Integer>("android.control.extendedSceneMode", int.class);
/**
* <p>The desired zoom ratio</p>
diff --git a/core/java/android/hardware/camera2/impl/CameraMetadataNative.java b/core/java/android/hardware/camera2/impl/CameraMetadataNative.java
index df77f52..786db6e 100644
--- a/core/java/android/hardware/camera2/impl/CameraMetadataNative.java
+++ b/core/java/android/hardware/camera2/impl/CameraMetadataNative.java
@@ -714,12 +714,12 @@
}
});
sGetCommandMap.put(
- CameraCharacteristics.CONTROL_AVAILABLE_BOKEH_CAPABILITIES.getNativeKey(),
+ CameraCharacteristics.CONTROL_AVAILABLE_EXTENDED_SCENE_MODE_CAPABILITIES.getNativeKey(),
new GetCommand() {
@Override
@SuppressWarnings("unchecked")
public <T> T getValue(CameraMetadataNative metadata, Key<T> key) {
- return (T) metadata.getBokehCapabilities();
+ return (T) metadata.getExtendedSceneModeCapabilities();
}
});
}
@@ -1442,53 +1442,55 @@
return samples;
}
- private Capability[] getBokehCapabilities() {
- int[] bokehMaxSizes = getBase(CameraCharacteristics.CONTROL_AVAILABLE_BOKEH_MAX_SIZES);
- float[] bokehZoomRanges = getBase(
- CameraCharacteristics.CONTROL_AVAILABLE_BOKEH_ZOOM_RATIO_RANGES);
+ private Capability[] getExtendedSceneModeCapabilities() {
+ int[] maxSizes =
+ getBase(CameraCharacteristics.CONTROL_AVAILABLE_EXTENDED_SCENE_MODE_MAX_SIZES);
+ float[] zoomRanges = getBase(
+ CameraCharacteristics.CONTROL_AVAILABLE_EXTENDED_SCENE_MODE_ZOOM_RATIO_RANGES);
Range<Float> zoomRange = getBase(CameraCharacteristics.CONTROL_ZOOM_RATIO_RANGE);
float maxDigitalZoom = getBase(CameraCharacteristics.SCALER_AVAILABLE_MAX_DIGITAL_ZOOM);
- if (bokehMaxSizes == null) {
+ if (maxSizes == null) {
return null;
}
- if (bokehMaxSizes.length % 3 != 0) {
- throw new AssertionError("availableBokehMaxSizes must be tuples of " +
- "[mode, width, height]");
+ if (maxSizes.length % 3 != 0) {
+ throw new AssertionError("availableExtendedSceneModeMaxSizes must be tuples of "
+ + "[mode, width, height]");
}
- int numBokehModes = bokehMaxSizes.length / 3;
- int numBokehZoomRanges = 0;
- if (bokehZoomRanges != null) {
- if (bokehZoomRanges.length % 2 != 0) {
- throw new AssertionError("availableBokehZoomRanges must be tuples of " +
- "[minZoom, maxZoom]");
+ int numExtendedSceneModes = maxSizes.length / 3;
+ int numExtendedSceneModeZoomRanges = 0;
+ if (zoomRanges != null) {
+ if (zoomRanges.length % 2 != 0) {
+ throw new AssertionError("availableExtendedSceneModeZoomRanges must be tuples of "
+ + "[minZoom, maxZoom]");
}
- numBokehZoomRanges = bokehZoomRanges.length / 2;
- if (numBokehModes - numBokehZoomRanges != 1) {
- throw new AssertionError("Number of bokeh zoom ranges must be 1 less than " +
- "number of supported bokeh modes");
+ numExtendedSceneModeZoomRanges = zoomRanges.length / 2;
+ if (numExtendedSceneModes - numExtendedSceneModeZoomRanges != 1) {
+ throw new AssertionError("Number of extended scene mode zoom ranges must be 1 "
+ + "less than number of supported modes");
}
}
- float bokehOffMinZoomRatio = 1.0f;
- float bokehOffMaxZoomRatio = maxDigitalZoom;
+ float modeOffMinZoomRatio = 1.0f;
+ float modeOffMaxZoomRatio = maxDigitalZoom;
if (zoomRange != null) {
- bokehOffMinZoomRatio = zoomRange.getLower();
- bokehOffMaxZoomRatio = zoomRange.getUpper();
+ modeOffMinZoomRatio = zoomRange.getLower();
+ modeOffMaxZoomRatio = zoomRange.getUpper();
}
- Capability[] capabilities = new Capability[numBokehModes];
- for (int i = 0, j = 0; i < numBokehModes; i++) {
- int mode = bokehMaxSizes[3 * i];
- int width = bokehMaxSizes[3 * i + 1];
- int height = bokehMaxSizes[3 * i + 2];
- if (mode != CameraMetadata.CONTROL_BOKEH_MODE_OFF && j < numBokehZoomRanges) {
- capabilities[i] = new Capability(mode, width, height, bokehZoomRanges[2 * j],
- bokehZoomRanges[2 * j + 1]);
+ Capability[] capabilities = new Capability[numExtendedSceneModes];
+ for (int i = 0, j = 0; i < numExtendedSceneModes; i++) {
+ int mode = maxSizes[3 * i];
+ int width = maxSizes[3 * i + 1];
+ int height = maxSizes[3 * i + 2];
+ if (mode != CameraMetadata.CONTROL_EXTENDED_SCENE_MODE_DISABLED
+ && j < numExtendedSceneModeZoomRanges) {
+ capabilities[i] = new Capability(mode, width, height, zoomRanges[2 * j],
+ zoomRanges[2 * j + 1]);
j++;
} else {
- capabilities[i] = new Capability(mode, width, height, bokehOffMinZoomRatio,
- bokehOffMaxZoomRatio);
+ capabilities[i] = new Capability(mode, width, height, modeOffMinZoomRatio,
+ modeOffMaxZoomRatio);
}
}
diff --git a/core/java/android/hardware/camera2/params/Capability.java b/core/java/android/hardware/camera2/params/Capability.java
index 367690c..6f59c5f 100644
--- a/core/java/android/hardware/camera2/params/Capability.java
+++ b/core/java/android/hardware/camera2/params/Capability.java
@@ -30,7 +30,7 @@
* Immutable class to store the camera capability, its corresponding maximum
* streaming dimension and zoom range.
*
- * @see CameraCharacteristics#CONTROL_AVAILABLE_BOKEH_CAPABILITIES
+ * @see CameraCharacteristics#CONTROL_AVAILABLE_EXTENDED_SCENE_MODE_CAPABILITIES
*/
public final class Capability {
@@ -72,10 +72,10 @@
/**
* Return the supported mode for this capability.
*
- * @return One of supported modes for the capability. For example, for available bokeh modes,
- * this will be one of {@link CameraMetadata#CONTROL_BOKEH_MODE_OFF},
- * {@link CameraMetadata#CONTROL_BOKEH_MODE_STILL_CAPTURE}, and
- * {@link CameraMetadata#CONTROL_BOKEH_MODE_CONTINUOUS}.
+ * @return One of supported modes for the capability. For example, for available extended
+ * scene modes, this will be one of {@link CameraMetadata#CONTROL_EXTENDED_SCENE_MODE_DISABLED},
+ * {@link CameraMetadata#CONTROL_EXTENDED_SCENE_MODE_BOKEH_STILL_CAPTURE}, and
+ * {@link CameraMetadata#CONTROL_EXTENDED_SCENE_MODE_BOKEH_CONTINUOUS}.
*/
public int getMode() {
return mMode;
diff --git a/core/java/android/hardware/soundtrigger/KeyphraseEnrollmentInfo.java b/core/java/android/hardware/soundtrigger/KeyphraseEnrollmentInfo.java
index 1aeb76a3..0593545 100644
--- a/core/java/android/hardware/soundtrigger/KeyphraseEnrollmentInfo.java
+++ b/core/java/android/hardware/soundtrigger/KeyphraseEnrollmentInfo.java
@@ -43,7 +43,6 @@
import java.util.List;
import java.util.Locale;
import java.util.Map;
-import java.util.Set;
/**
* Enrollment information about the different available keyphrases.
@@ -120,11 +119,6 @@
private final KeyphraseMetadata[] mKeyphrases;
/**
- * Set of UIDs associated with the detected enrollment applications.
- */
- private final Set<Integer> mEnrollmentApplicationUids;
-
- /**
* Map between KeyphraseMetadata and the package name of the enrollment app that provides it.
*/
final private Map<KeyphraseMetadata, String> mKeyphrasePackageMap;
@@ -142,13 +136,11 @@
mParseError = "No enrollment applications found";
mKeyphrasePackageMap = Collections.<KeyphraseMetadata, String>emptyMap();
mKeyphrases = null;
- mEnrollmentApplicationUids = Collections.emptySet();
return;
}
List<String> parseErrors = new LinkedList<String>();
mKeyphrasePackageMap = new HashMap<KeyphraseMetadata, String>();
- mEnrollmentApplicationUids = new ArraySet<>();
for (ResolveInfo ri : ris) {
try {
ApplicationInfo ai = pm.getApplicationInfo(
@@ -170,7 +162,6 @@
getKeyphraseMetadataFromApplicationInfo(pm, ai, parseErrors);
if (metadata != null) {
mKeyphrasePackageMap.put(metadata, ai.packageName);
- mEnrollmentApplicationUids.add(ai.uid);
}
} catch (PackageManager.NameNotFoundException e) {
String error = "error parsing voice enrollment meta-data for "
@@ -373,21 +364,9 @@
return null;
}
- /**
- * Tests if the input UID matches a supported enrollment application.
- *
- * @param uid UID of the caller to test against.
- * @return Returns true if input uid matches the uid of a supported enrollment application.
- * False if not.
- */
- public boolean isUidSupportedEnrollmentApplication(int uid) {
- return mEnrollmentApplicationUids.contains(uid);
- }
-
@Override
public String toString() {
return "KeyphraseEnrollmentInfo [KeyphrasePackageMap=" + mKeyphrasePackageMap.toString()
- + ", enrollmentApplicationUids=" + mEnrollmentApplicationUids.toString()
+ ", ParseError=" + mParseError + "]";
}
}
diff --git a/core/java/com/android/internal/widget/ConversationLayout.java b/core/java/com/android/internal/widget/ConversationLayout.java
index 4028fda..4e7ae8a 100644
--- a/core/java/com/android/internal/widget/ConversationLayout.java
+++ b/core/java/com/android/internal/widget/ConversationLayout.java
@@ -120,6 +120,7 @@
private int mIconSizeBadged;
private int mIconSizeCentered;
private CachingIconView mIcon;
+ private View mImportanceRingView;
private int mExpandedGroupTopMargin;
private View mConversationFacePile;
private int mNotificationBackgroundColor;
@@ -132,6 +133,7 @@
private boolean mExpandable = true;
private int mContentMarginEnd;
private Rect mMessagingClipRect;
+ private TextView mAppName;
public ConversationLayout(@NonNull Context context) {
super(context);
@@ -169,6 +171,7 @@
mTextPaint.setAntiAlias(true);
mConversationIcon = findViewById(R.id.conversation_icon);
mIcon = findViewById(R.id.icon);
+ mImportanceRingView = findViewById(R.id.conversation_icon_badge_ring);
mConversationIconBadge = findViewById(R.id.conversation_icon_badge);
mIcon.setOnVisibilityChangedListener((visibility) -> {
// Always keep the badge visibility in sync with the icon. This is necessary in cases
@@ -200,6 +203,7 @@
R.string.conversation_title_fallback_one_to_one);
mFallbackGroupChatName = getResources().getString(
R.string.conversation_title_fallback_group_chat);
+ mAppName = findViewById(R.id.app_name_text);
}
@RemotableViewMethod
@@ -213,6 +217,14 @@
}
/**
+ * Sets this conversation as "important", adding some additional UI treatment.
+ */
+ @RemotableViewMethod
+ public void setIsImportantConversation(boolean isImportantConversation) {
+ mImportanceRingView.setVisibility(isImportantConversation ? VISIBLE : GONE);
+ }
+
+ /**
* Set this layout to show the collapsed representation.
*
* @param isCollapsed is it collapsed
@@ -309,14 +321,12 @@
updateTitleAndNamesDisplay();
updateConversationLayout();
-
}
/**
* Update the layout according to the data provided (i.e mIsOneToOne, expanded etc);
*/
private void updateConversationLayout() {
- // TODO: resolve this from shortcuts
// Set avatar and name
CharSequence conversationText = mConversationTitle;
// TODO: display the secondary text somewhere
@@ -376,6 +386,7 @@
}
updateIconPositionAndSize();
updateImageMessages();
+ updateAppName();
}
private void updateImageMessages() {
@@ -454,6 +465,14 @@
topView.setImageIcon(secondLastIcon);
}
+ private void updateAppName() {
+ mAppName.setVisibility(mIsCollapsed ? GONE : VISIBLE);
+ }
+
+ public boolean shouldHideAppName() {
+ return mIsCollapsed;
+ }
+
/**
* update the icon position and sizing
*/
@@ -463,7 +482,7 @@
int marginTop;
int iconSize;
if (mIsOneToOne || mIsCollapsed) {
- // Baded format
+ // Badged format
gravity = Gravity.LEFT;
marginStart = mBadgedSideMargins;
marginTop = mBadgedSideMargins;
@@ -479,11 +498,9 @@
layoutParams.gravity = gravity;
layoutParams.topMargin = marginTop;
layoutParams.setMarginStart(marginStart);
+ layoutParams.width = iconSize;
+ layoutParams.height = iconSize;
mConversationIconBadge.setLayoutParams(layoutParams);
- ViewGroup.LayoutParams iconParams = mIcon.getLayoutParams();
- iconParams.width = iconSize;
- iconParams.height = iconSize;
- mIcon.setLayoutParams(iconParams);
}
@RemotableViewMethod
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 68c51b9..84d9ce2 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -3447,12 +3447,25 @@
<permission android:name="android.permission.BIND_AUGMENTED_AUTOFILL_SERVICE"
android:protectionLevel="signature" />
- <!-- Must be required by hotword enrollment application,
- to ensure that only the system can interact with it.
- @hide <p>Not for use by third-party applications.</p> -->
+ <!-- Must be required by a {@link android.service.voice.VoiceInteractionService} implementation
+ to enroll its own sound models. This is a more restrictive permission than the higher-level
+ permission KEYPHRASE_ENROLLMENT_APPLICATION. For the caller to enroll sound models with
+ this permission, it must hold the permission and be the active VoiceInteractionService in
+ the system.
+ {@see Settings.Secure.VOICE_INTERACTION_SERVICE}
+ @hide -->
<permission android:name="android.permission.MANAGE_VOICE_KEYPHRASES"
android:protectionLevel="signature|privileged" />
+ <!-- Must be required by a keyphrase enrollment application, to enroll sound models. This is
+ treated as a higher-level permission to MANAGE_VOICE_KEYPHRASES as a caller can enroll
+ sound models at any time. This permission should be reserved for system enrollment
+ applications detected by {@link android.hardware.soundtrigger.KeyphraseEnrollmentInfo}
+ only.
+ @hide <p>Not for use by third-party applications.</p> -->
+ <permission android:name="android.permission.KEYPHRASE_ENROLLMENT_APPLICATION"
+ android:protectionLevel="signature|privileged" />
+
<!-- Must be required by a {@link com.android.media.remotedisplay.RemoteDisplayProvider},
to ensure that only the system can bind to it.
@hide -->
diff --git a/core/res/res/drawable/conversation_badge_ring.xml b/core/res/res/drawable/conversation_badge_ring.xml
new file mode 100644
index 0000000..11ba8ad
--- /dev/null
+++ b/core/res/res/drawable/conversation_badge_ring.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2020 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
+ -->
+
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="oval">
+
+ <solid
+ android:color="@color/transparent"/>
+
+ <stroke
+ android:color="@color/conversation_important_highlight"
+ android:width="2dp"/>
+
+ <size
+ android:width="26dp"
+ android:height="26dp"/>
+</shape>
+
diff --git a/core/res/res/layout/notification_template_material_conversation.xml b/core/res/res/layout/notification_template_material_conversation.xml
index 8246583..7bf13ec 100644
--- a/core/res/res/layout/notification_template_material_conversation.xml
+++ b/core/res/res/layout/notification_template_material_conversation.xml
@@ -58,18 +58,31 @@
<FrameLayout
android:id="@+id/conversation_icon_badge"
- android:layout_width="20dp"
- android:layout_height="20dp"
+ android:layout_width="@dimen/conversation_icon_size_badged"
+ android:layout_height="@dimen/conversation_icon_size_badged"
android:layout_marginLeft="@dimen/conversation_badge_side_margin"
android:layout_marginTop="@dimen/conversation_badge_side_margin"
- android:background="@drawable/conversation_badge_background" >
- <!-- Badge: 20x20, 48dp padding left + top -->
+ >
+ <ImageView
+ android:id="@+id/conversation_icon_badge_bg"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:src="@drawable/conversation_badge_background"
+ />
<com.android.internal.widget.CachingIconView
android:id="@+id/icon"
- android:layout_width="@dimen/conversation_icon_size_badged"
- android:layout_height="@dimen/conversation_icon_size_badged"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_margin="4dp"
android:layout_gravity="center"
/>
+ <ImageView
+ android:id="@+id/conversation_icon_badge_ring"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:src="@drawable/conversation_badge_ring"
+ android:visibility="gone"
+ />
</FrameLayout>
</FrameLayout>
</FrameLayout>
@@ -108,6 +121,7 @@
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="16dp"
+ android:layout_marginBottom="2dp"
android:paddingStart="@dimen/conversation_content_start"
>
<TextView
@@ -160,12 +174,22 @@
/>
</LinearLayout>
+ <!-- App Name -->
+ <TextView
+ android:id="@+id/app_name_text"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="@dimen/conversation_content_start"
+ android:textSize="12sp"
+ android:layout_marginBottom="16dp"
+ android:textAppearance="@style/TextAppearance.DeviceDefault.Notification"
+ />
+
<!-- Messages -->
<com.android.internal.widget.MessagingLinearLayout
android:id="@+id/notification_messaging"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="2dp"
android:spacing="@dimen/notification_messaging_spacing"
android:clipToPadding="false"
android:clipChildren="false"
diff --git a/core/res/res/values/attrs_manifest.xml b/core/res/res/values/attrs_manifest.xml
index fe08f9c..d6e200a 100644
--- a/core/res/res/values/attrs_manifest.xml
+++ b/core/res/res/values/attrs_manifest.xml
@@ -2121,6 +2121,35 @@
<declare-styleable name="AndroidManifestQueriesProvider" parent="AndroidManifestQueries" >
<attr name="authorities" />
</declare-styleable>
+ <!--
+ Matches an overlayable, its overlays, its actor, and/or its containing target.
+ A target or actor must always be specified, but can be combined for more specificity.
+ Valid combinations and what they match are:
+
+ targetPackage:
+ - All overlays targeting any overlayables inside 'targetPackage'
+
+ targetPackage + targetName:
+ - All overlays targeting the overlayable 'targetName' inside 'targetPackage'
+
+ targetPackage + targetName + actor:
+ - All overlays targeting the overlayable 'targetName' inside 'targetPackage' if the
+ overlayable specifies 'actor'
+
+ targetPackage + actor:
+ - All overlays targeting overlayables inside 'targetPackage' that specify `actor`
+ - The actor itself if the above matches
+
+ actor:
+ - All overlays targeting overlayables that specify `actor`
+ - All targets that contain an overlayable that specifies `actor`
+ - The actor itself
+ -->
+ <declare-styleable name="AndroidManifestQueriesOverlayable">
+ <attr name="targetPackage" />
+ <attr name="targetName"/>
+ <attr name="actor" format="string" />
+ </declare-styleable>
<!-- The <code>static-library</code> tag declares that this apk is providing itself
diff --git a/core/res/res/values/colors.xml b/core/res/res/values/colors.xml
index 91248f1..831da6f 100644
--- a/core/res/res/values/colors.xml
+++ b/core/res/res/values/colors.xml
@@ -226,4 +226,6 @@
<color name="resolver_text_color_secondary_dark">#ffC4C6C6</color>
<color name="resolver_empty_state_text">#FF202124</color>
<color name="resolver_empty_state_icon">#FF5F6368</color>
+
+ <color name="conversation_important_highlight">#F9AB00</color>
</resources>
diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml
index 6fdc223..f2e2599 100644
--- a/core/res/res/values/dimens.xml
+++ b/core/res/res/values/dimens.xml
@@ -692,12 +692,12 @@
<dimen name="conversation_expand_button_top_margin_expanded">18dp</dimen>
<!-- Side margins of the conversation badge in relation to the conversation icon -->
<dimen name="conversation_badge_side_margin">36dp</dimen>
- <!-- size of the notification icon when badged in a conversation -->
- <dimen name="conversation_icon_size_badged">15dp</dimen>
- <!-- size of the notification icon when centered in a conversation -->
- <dimen name="conversation_icon_size_centered">20dp</dimen>
+ <!-- size of the notification badge when applied to the conversation icon -->
+ <dimen name="conversation_icon_size_badged">20dp</dimen>
+ <!-- size of the notification badge when centered in a conversation -->
+ <dimen name="conversation_icon_size_centered">26dp</dimen>
<!-- margin on the top when the icon is centered for group conversations -->
- <dimen name="conversation_icon_margin_top_centered">5dp</dimen>
+ <dimen name="conversation_icon_margin_top_centered">12dp</dimen>
<!-- The padding of the conversation header when expanded. This is calculated from the expand button size + notification_content_margin_end -->
<dimen name="conversation_header_expanded_padding_end">38dp</dimen>
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index 9f4b344..f02d54f 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -3019,6 +3019,7 @@
<public name="preserveLegacyExternalStorage" />
<public name="mimeGroup" />
<public name="gwpAsanMode" />
+ <public name="actor" />
</public-group>
<public-group type="drawable" first-id="0x010800b5">
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 892a803..aa00f43 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -1166,7 +1166,7 @@
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. [CHAR_LIMIT=NONE] -->
<string name="permlab_systemCamera">Allow an application or service access to system cameras to take pictures and videos</string>
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. [CHAR_LIMIT=NONE] -->
- <string name="permdesc_systemCamera">This privileged | system app can take pictures and record videos using a system camera at any time. Requires the android.permission.CAMERA permission to be held by the app as well</string>
+ <string name="permdesc_systemCamera">This privileged or system app can take pictures and record videos using a system camera at any time. Requires the android.permission.CAMERA permission to be held by the app as well</string>
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. [CHAR_LIMIT=NONE] -->
<string name="permlab_cameraOpenCloseListener">Allow an application or service to receive callbacks about camera devices being opened or closed.</string>
@@ -5474,4 +5474,237 @@
<string name="permlab_accessCallAudio">Record or play audio in telephony calls</string>
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. [CHAR LIMIT=NONE] -->
<string name="permdesc_accessCallAudio">Allows this app, when assigned as default dialer application, to record or play audio in telephony calls.</string>
+
+ <!-- Icc depersonalization related strings -->
+ <!-- Label text for PIN entry widget on SIM Network Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_NETWORK_ENTRY">SIM network unlock PIN</string>
+ <!-- Label text for PIN entry widget on SIM Network Subset Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_NETWORK_SUBSET_ENTRY">SIM network subset unlock PIN</string>
+ <!-- Label text for PIN entry widget on SIM Corporate Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_CORPORATE_ENTRY">SIM corporate unlock PIN</string>
+ <!-- Label text for PIN entry widget on SIM Service Provider Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_SERVICE_PROVIDER_ENTRY">SIM service provider unlock PIN</string>
+ <!-- Label text for PIN entry widget on SIM SIM Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_SIM_ENTRY">SIM unlock PIN</string>
+ <!-- Label text for PUK entry widget on Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_NETWORK_PUK_ENTRY">Enter PUK</string>
+ <!-- Label text for Subset PUK entry widget on Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK_ENTRY">Enter PUK</string>
+ <!-- Label text for Corporate PUK entry widget on Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_CORPORATE_PUK_ENTRY">Enter PUK</string>
+ <!-- Label text for SIM service provider PUK entry widget on Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK_ENTRY">Enter PUK</string>
+ <!-- Label text for SIM PUK entry widget on Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_SIM_PUK_ENTRY">Enter PUK</string>
+ <!-- Label text for PIN entry widget on RUIM Network1 Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_NETWORK1_ENTRY">RUIM network1 unlock PIN</string>
+ <!-- Label text for PIN entry widget on RUIM Network2 Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_NETWORK2_ENTRY">RUIM network2 unlock PIN</string>
+ <!-- Label text for PIN entry widget on RUIM Hrpd Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_HRPD_ENTRY">RUIM hrpd unlock PIN</string>
+ <!-- Label text for PIN entry widget on RUIM Corporate Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_CORPORATE_ENTRY">RUIM corporate unlock PIN</string>
+ <!-- Label text for PIN entry widget on RUIM Service Provider Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_ENTRY">RUIM service provider unlock PIN</string>
+ <!-- Label text for PIN entry widget on RUIM RUIM Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_RUIM_ENTRY">RUIM unlock PIN</string>
+ <!-- Label text for PUK entry widget on Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_NETWORK1_PUK_ENTRY">Enter PUK</string>
+ <!-- Label text for PUK entry widget on Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_NETWORK2_PUK_ENTRY">Enter PUK</string>
+ <!-- Label text for PUK entry widget on Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_HRPD_PUK_ENTRY">Enter PUK</string>
+ <!-- Label text for PUK entry widget on Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK_ENTRY">Enter PUK</string>
+ <!-- Label text for PUK entry widget on Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_RUIM_PUK_ENTRY">Enter PUK</string>
+ <!-- Label text for PUK entry widget on Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_CORPORATE_PUK_ENTRY">Enter PUK</string>
+
+ <!-- Label text for PIN entry widget on SIM SPN Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_SPN_ENTRY">SPN unlock PIN</string>
+ <!-- Label text for PIN entry widget on SIM SP EHPLMN Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_SP_EHPLMN_ENTRY">SP Equivalent Home PLMN unlock PIN</string>
+ <!-- Label text for PIN entry widget on SIM ICCID Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_ICCID_ENTRY">ICCID unlock PIN</string>
+ <!-- Label text for PIN entry widget on SIM IMPI Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_IMPI_ENTRY">IMPI unlock PIN</string>
+ <!-- Label text for PIN entry widget on SIM NS_SP Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_NS_SP_ENTRY">Network subset service provider unlock PIN</string>
+
+ <!-- Status message displayed on SIM Network Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_NETWORK_IN_PROGRESS">Requesting SIM network unlock\u2026</string>
+ <!-- Status message displayed on SIM Network Subset Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_NETWORK_SUBSET_IN_PROGRESS">Requesting SIM network subset unlock
+\u2026</string>
+ <!-- Status message displayed on SIM Service Provider Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_SERVICE_PROVIDER_IN_PROGRESS">Requesting SIM service provider un
+lock\u2026</string>
+ <!-- Status message displayed on SIM Corporate Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_CORPORATE_IN_PROGRESS">Requesting SIM corporate unlock\u2026</string>
+ <!-- Status message displayed on PUK Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_NETWORK_PUK_IN_PROGRESS">Requesting PUK unlock\u2026</string>
+ <!-- Status message displayed on PUK Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK_IN_PROGRESS">Requesting PUK unlock\u2026</string>
+ <!-- Status message displayed on Corporate PUK entry widget on Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_CORPORATE_PUK_IN_PROGRESS">Requesting PUK unlock\u2026</string>
+ <!-- Status message displayed on SIM Service provider PUK entry widget on Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK_IN_PROGRESS">Requesting PUK unlock\u2026</string>
+ <!-- Status message displayed on SIM PUK entry widget on Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_SIM_PUK_IN_PROGRESS">Requesting PUK unlock\u2026</string>
+ <!-- Status message displayed on SIM SIM Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_SIM_IN_PROGRESS">Requesting SIM unlock\u2026</string>
+ <!-- Status message displayed on RUIM Network1 Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_NETWORK1_IN_PROGRESS">Requesting RUIM network1 unlock\u2026</string>
+ <!-- Status message displayed on RUIM Network2 Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_NETWORK2_IN_PROGRESS">Requesting RUIM network2 unlock\u2026</string>
+ <!-- Status message displayed on RUIM Hrpd Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_HRPD_IN_PROGRESS">Requesting RUIM hrpd unlock\u2026</string>
+ <!-- Status message displayed on RUIM Service Provider Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_IN_PROGRESS">Requesting RUIM service provider
+unlock\u2026</string>
+ <!-- Status message displayed on RUIM Corporate Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_CORPORATE_IN_PROGRESS">Requesting RUIM corporate unlock\u2026</string>
+
+ <!-- Status message displayed on SIM SPN Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_SPN_IN_PROGRESS">Requesting SPN unlock\u2026</string>
+ <!-- Status message displayed on SIM SP EHPLMN Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_SP_EHPLMN_IN_PROGRESS">Requesting SP Equivalent Home PLMN unlock\u2026</string>
+ <!-- Status message displayed on SIM ICCID Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_ICCID_IN_PROGRESS">Requesting ICCID unlock\u2026</string>
+ <!-- Status message displayed on SIM IMPI Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_IMPI_IN_PROGRESS">Requesting IMPI unlock\u2026</string>
+ <!-- Status message displayed on SIM NS_SP Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_NS_SP_IN_PROGRESS">Requesting Network subset service provider unlock\u2026</string>
+
+ <!-- Status message displayed on RUIM RUIM Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_RUIM_IN_PROGRESS">Requesting RUIM unlock\u2026</string>
+ <!-- Status message displayed on PUK Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_NETWORK1_PUK_IN_PROGRESS">Requesting PUK unlock\u2026</string>
+ <!-- Status message displayed on PUK Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_NETWORK2_PUK_IN_PROGRESS">Requesting PUK unlock\u2026</string>
+ <!-- Status message displayed on PUK Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_HRPD_PUK_IN_PROGRESS">Requesting PUK unlock\u2026</string>
+ <!-- Status message displayed on PUK Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_CORPORATE_PUK_IN_PROGRESS">Requesting PUK unlock\u2026</string>
+ <!-- Status message displayed on PUK Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK_IN_PROGRESS">Requesting PUK unlock\u2026</string>
+ <!-- Status message displayed on PUK Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_RUIM_PUK_IN_PROGRESS">Requesting PUK unlock\u2026</string>
+ <!-- Error message displayed on SIM Network Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_NETWORK_ERROR">SIM Network unlock request unsuccessful.</string>
+ <!-- Error message displayed on SIM Network Subset Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_NETWORK_SUBSET_ERROR">SIM Network Subset unlock request unsucces
+sful.</string>
+ <!-- Error message displayed on SIM Service Provider Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_SERVICE_PROVIDER_ERROR">SIM Service Provider unlock request unsu
+ccessful.</string>
+ <!-- Error message displayed on SIM Corporate Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_CORPORATE_ERROR">SIM Corporate unlock request unsuccessful.</string>
+ <!-- Error message displayed on SIM SIM Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_SIM_ERROR">SIM unlock request unsuccessful.</string>
+ <!-- Error message displayed on RUIM Network1 Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_NETWORK1_ERROR">RUIM Network1 unlock request unsuccessful.</string>
+ <!-- Error message displayed on RUIM Network2 Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_NETWORK2_ERROR">RUIM Network2 unlock request unsuccessful.</string>
+ <!-- Error message displayed on RUIM Hrpd Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_HRPD_ERROR">RUIM Hrpd unlock request unsuccessful.</string>
+ <!-- Error message displayed on RUIM Corporate Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_CORPORATE_ERROR">RUIM Corporate unlock request unsuccessful.</string>
+ <!-- Error message displayed on RUIM Service Provider Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_ERROR">RUIM Service Provider unlock request un
+successful.</string>
+ <!-- Error message displayed on RUIM RUIM Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_RUIM_ERROR">RUIM unlock request unsuccessful.</string>
+ <!-- Error message displayed on PUK Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_NETWORK_PUK_ERROR">PUK unlock unsuccessful.</string>
+ <!-- Error message displayed on PUK Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK_ERROR">PUK unlock unsuccessful.</string>
+ <!-- Error message displayed on PUK Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_CORPORATE_PUK_ERROR">PUK unlock unsuccessful.</string>
+ <!-- Error message displayed on PUK Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK_ERROR">PUK unlock unsuccessful.</string>
+ <!-- Error message displayed on PUK Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_SIM_PUK_ERROR">PUK unlock unsuccessful.</string>
+ <!-- Error message displayed on PUK Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_NETWORK1_PUK_ERROR">PUK unlock unsuccessful.</string>
+ <!-- Error message displayed on PUK Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_NETWORK2_PUK_ERROR">PUK unlock unsuccessful.</string>
+ <!-- Error message displayed on PUK Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_HRPD_PUK_ERROR">PUK unlock unsuccessful.</string>
+ <!-- Error message displayed on PUK Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK_ERROR">PUK unlock unsuccessful.</string>
+ <!-- Error message displayed on PUK Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_RUIM_PUK_ERROR">PUK unlock unsuccessful.</string>
+ <!-- Error message displayed on PUK Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_CORPORATE_PUK_ERROR">PUK unlock unsuccessful.</string>
+
+ <!-- Error message displayed on SIM SPN Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_SPN_ERROR">SPN unlock request unsuccessful.</string>
+ <!-- Error message displayed on SIM SP EHPLMN Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_SP_EHPLMN_ERROR">SP Equivalent Home PLMN unlock request unsuccessful.</string>
+ <!-- Error message displayed on SIM ICCID Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_ICCID_ERROR">ICCID unlock request unsuccessful.</string>
+ <!-- Error message displayed on SIM IMPI Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_IMPI_ERROR">IMPI unlock request unsuccessful.</string>
+ <!-- Error message displayed on SIM NS_SP Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_NS_SP_ERROR">Network subset service provider unlock request unsuccessful.</string>
+
+ <!-- Success message displayed on SIM Network Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_NETWORK_SUCCESS">SIM Network unlock successful.</string>
+ <!-- Success message displayed on SIM Network Subset Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_NETWORK_SUBSET_SUCCESS">SIM Network Subset unlock successful.</string>
+ <!-- Success message displayed on SIM Service Provider Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_SERVICE_PROVIDER_SUCCESS">SIM Service Provider unlock successful
+.</string>
+ <!-- Success message displayed on SIM Corporate Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_CORPORATE_SUCCESS">SIM Corporate unlock successful.</string>
+ <!-- Success message displayed on SIM SIM Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_SIM_SUCCESS">SIM unlock successful.</string>
+ <!-- Success message displayed on RUIM Network1 Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_NETWORK1_SUCCESS">RUIM Network1 unlock successful.</string>
+ <!-- Success message displayed on RUIM Network2 Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_NETWORK2_SUCCESS">RUIM Network2 unlock successful.</string>
+ <!-- Success message displayed on RUIM Hrpd Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_HRPD_SUCCESS">RUIM Hrpd unlock successful.</string>
+ <!-- Success message displayed on RUIM Service Provider Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_SUCCESS">RUIM Service Provider unlock successf
+ul.</string>
+ <!-- Success message displayed on RUIM Corporate Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_CORPORATE_SUCCESS">RUIM Corporate unlock successful.</string>
+ <!-- Success message displayed on RUIM RUIM Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_RUIM_SUCCESS">RUIM unlock successful.</string>
+ <!-- Success message displayed on PUK Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_NETWORK_PUK_SUCCESS">PUK unlock successful.</string>
+ <!-- Success message displayed on PUK Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK_SUCCESS">PUK unlock successful.</string>
+ <!-- Success message displayed on PUK Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_CORPORATE_PUK_SUCCESS">PUK unlock successful.</string>
+ <!-- Success message displayed on PUK Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK_SUCCESS">PUK unlock successful.</string>
+ <!-- Success message displayed on PUK Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_SIM_PUK_SUCCESS">PUK unlock successful.</string>
+ <!-- Success message displayed on PUK Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_NETWORK1_PUK_SUCCESS">PUK unlock successful.</string>
+ <!-- Success message displayed on PUK Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_NETWORK2_PUK_SUCCESS">PUK unlock successful.</string>
+ <!-- Success message displayed on PUK Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_HRPD_PUK_SUCCESS">PUK unlock successful.</string>
+ <!-- Success message displayed on PUK Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_CORPORATE_PUK_SUCCESS">PUK unlock successful.</string>
+ <!-- Success message displayed on PUK Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK_SUCCESS">PUK unlock successful.</string>
+ <!-- Success message displayed on PUK Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_RUIM_RUIM_PUK_SUCCESS">PUK unlock successful.</string>
+
+ <!-- Success message displayed on SIM SPN Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_SPN_SUCCESS">SPN unlock successful.</string>
+ <!-- Success message displayed on SIM SP EHPLMN Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_SP_EHPLMN_SUCCESS">SP Equivalent Home PLMN unlock successful.</string>
+ <!-- Success message displayed on SIM ICCID Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_ICCID_SUCCESS">ICCID unlock successful.</string>
+ <!-- Success message displayed on SIM IMPI Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_IMPI_SUCCESS">IMPI unlock successful.</string>
+ <!-- Success message displayed on SIM NS_SP Depersonalization panel [CHAR LIMIT=none] -->
+ <string name="PERSOSUBSTATE_SIM_NS_SP_SUCCESS">Network subset service provider unlock successful.</string>
</resources>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 46fbe22..e0e6074 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -3860,6 +3860,8 @@
<java-symbol type="string" name="conversation_title_fallback_group_chat" />
<java-symbol type="id" name="conversation_icon" />
<java-symbol type="id" name="conversation_icon_badge" />
+ <java-symbol type="id" name="conversation_icon_badge_ring" />
+ <java-symbol type="id" name="conversation_icon_badge_bg" />
<java-symbol type="id" name="expand_button_container" />
<java-symbol type="id" name="messaging_group_content_container" />
<java-symbol type="id" name="expand_button_and_content_container" />
diff --git a/libs/hwui/jni/GraphicsStatsService.cpp b/libs/hwui/jni/GraphicsStatsService.cpp
index 6076552..1591ffa 100644
--- a/libs/hwui/jni/GraphicsStatsService.cpp
+++ b/libs/hwui/jni/GraphicsStatsService.cpp
@@ -158,17 +158,17 @@
static void nativeInit(JNIEnv* env, jobject javaObject) {
gGraphicsStatsServiceObject = env->NewGlobalRef(javaObject);
AStatsManager_PullAtomMetadata* metadata = AStatsManager_PullAtomMetadata_obtain();
- AStatsManager_PullAtomMetadata_setCoolDownNs(metadata, 10 * 1000000); // 10 milliseconds
- AStatsManager_PullAtomMetadata_setTimeoutNs(metadata, 2 * NS_PER_SEC); // 2 seconds
+ AStatsManager_PullAtomMetadata_setCoolDownMillis(metadata, 10); // 10 milliseconds
+ AStatsManager_PullAtomMetadata_setTimeoutMillis(metadata, 2 * MS_PER_SEC); // 2 seconds
- AStatsManager_registerPullAtomCallback(android::util::GRAPHICS_STATS,
- &graphicsStatsPullCallback, metadata, nullptr);
+ AStatsManager_setPullAtomCallback(android::util::GRAPHICS_STATS, metadata,
+ &graphicsStatsPullCallback, nullptr);
AStatsManager_PullAtomMetadata_release(metadata);
}
static void nativeDestructor(JNIEnv* env, jobject javaObject) {
- AStatsManager_unregisterPullAtomCallback(android::util::GRAPHICS_STATS);
+ AStatsManager_clearPullAtomCallback(android::util::GRAPHICS_STATS);
env->DeleteGlobalRef(gGraphicsStatsServiceObject);
gGraphicsStatsServiceObject = nullptr;
}
diff --git a/media/java/android/media/MediaRoute2Info.java b/media/java/android/media/MediaRoute2Info.java
index 36ccf00..9985613 100644
--- a/media/java/android/media/MediaRoute2Info.java
+++ b/media/java/android/media/MediaRoute2Info.java
@@ -238,7 +238,7 @@
* Refer to the class documentation for details about live audio routes.
* </p>
*/
- public static final String FEATURE_LIVE_AUDIO = "android.media.intent.category.LIVE_AUDIO";
+ public static final String FEATURE_LIVE_AUDIO = "android.media.route.feature.LIVE_AUDIO";
/**
* Media feature: Live video.
@@ -259,13 +259,15 @@
*
* @see android.app.Presentation
*/
- public static final String FEATURE_LIVE_VIDEO = "android.media.intent.category.LIVE_VIDEO";
+ public static final String FEATURE_LIVE_VIDEO = "android.media.route.feature.LIVE_VIDEO";
/**
* Media feature: Remote playback.
* <p>
* A route that supports remote playback routing will allow an application to send
* requests to play content remotely to supported destinations.
+ * A route may only support {@link #FEATURE_REMOTE_AUDIO_PLAYBACK audio playback} or
+ * {@link #FEATURE_REMOTE_VIDEO_PLAYBACK video playback}.
* </p><p>
* Remote playback routes destinations operate independently of the local device.
* When a remote playback route is selected, the application can control the content
@@ -274,9 +276,35 @@
* </p><p>
* Refer to the class documentation for details about remote playback routes.
* </p>
+ * @see #FEATURE_REMOTE_AUDIO_PLAYBACK
+ * @see #FEATURE_REMOTE_VIDEO_PLAYBACK
*/
public static final String FEATURE_REMOTE_PLAYBACK =
- "android.media.intent.category.REMOTE_PLAYBACK";
+ "android.media.route.feature.REMOTE_PLAYBACK";
+
+ /**
+ * Media feature: Remote audio playback.
+ * <p>
+ * A route that supports remote audio playback routing will allow an application to send
+ * requests to play audio content remotely to supported destinations.
+ *
+ * @see #FEATURE_REMOTE_PLAYBACK
+ * @see #FEATURE_REMOTE_VIDEO_PLAYBACK
+ */
+ public static final String FEATURE_REMOTE_AUDIO_PLAYBACK =
+ "android.media.route.feature.REMOTE_AUDIO_PLAYBACK";
+
+ /**
+ * Media feature: Remote video playback.
+ * <p>
+ * A route that supports remote video playback routing will allow an application to send
+ * requests to play video content remotely to supported destinations.
+ *
+ * @see #FEATURE_REMOTE_PLAYBACK
+ * @see #FEATURE_REMOTE_AUDIO_PLAYBACK
+ */
+ public static final String FEATURE_REMOTE_VIDEO_PLAYBACK =
+ "android.media.route.feature.REMOTE_VIDEO_PLAYBACK";
final String mId;
final CharSequence mName;
diff --git a/media/java/android/media/MediaRouter2.java b/media/java/android/media/MediaRouter2.java
index bde45d7..25f6059 100644
--- a/media/java/android/media/MediaRouter2.java
+++ b/media/java/android/media/MediaRouter2.java
@@ -374,8 +374,8 @@
* @param route the route you want to transfer the current media to. Pass {@code null} to
* stop routing of the current media.
*
- * @see TransferCallback#onTransferred
- * @see TransferCallback#onTransferFailed
+ * @see TransferCallback#onTransfer
+ * @see TransferCallback#onTransferFailure
*/
public void transferTo(@NonNull MediaRoute2Info route) {
Objects.requireNonNull(route, "route must not be null");
@@ -565,9 +565,9 @@
}
/**
- * Creates a controller and calls the {@link TransferCallback#onTransferred}.
+ * Creates a controller and calls the {@link TransferCallback#onTransfer}.
* If the controller creation has failed, then it calls
- * {@link TransferCallback#onTransferFailed}.
+ * {@link TransferCallback#onTransferFailure}.
* <p>
* Pass {@code null} to sessionInfo for the failure case.
*/
@@ -740,21 +740,21 @@
RoutingController newController) {
for (TransferCallbackRecord record: mTransferCallbackRecords) {
record.mExecutor.execute(
- () -> record.mTransferCallback.onTransferred(oldController, newController));
+ () -> record.mTransferCallback.onTransfer(oldController, newController));
}
}
private void notifyTransferFailed(MediaRoute2Info route) {
for (TransferCallbackRecord record: mTransferCallbackRecords) {
record.mExecutor.execute(
- () -> record.mTransferCallback.onTransferFailed(route));
+ () -> record.mTransferCallback.onTransferFailure(route));
}
}
private void notifyStopped(RoutingController controller) {
for (TransferCallbackRecord record: mTransferCallbackRecords) {
record.mExecutor.execute(
- () -> record.mTransferCallback.onStopped(controller));
+ () -> record.mTransferCallback.onStop(controller));
}
}
@@ -805,7 +805,7 @@
* @param newController the new controller to control routing
* @see #transferTo(MediaRoute2Info)
*/
- public void onTransferred(@NonNull RoutingController oldController,
+ public void onTransfer(@NonNull RoutingController oldController,
@NonNull RoutingController newController) {}
/**
@@ -813,14 +813,14 @@
*
* @param requestedRoute the route info which was used for the transfer
*/
- public void onTransferFailed(@NonNull MediaRoute2Info requestedRoute) {}
+ public void onTransferFailure(@NonNull MediaRoute2Info requestedRoute) {}
/**
* Called when a media routing stops. It can be stopped by a user or a provider.
*
* @param controller the controller that controlled the stopped media routing.
*/
- public void onStopped(@NonNull RoutingController controller) { }
+ public void onStop(@NonNull RoutingController controller) { }
}
/**
diff --git a/media/tests/MediaRouter/src/com/android/mediaroutertest/MediaRouter2ManagerTest.java b/media/tests/MediaRouter/src/com/android/mediaroutertest/MediaRouter2ManagerTest.java
index a97baaf..77e8f97 100644
--- a/media/tests/MediaRouter/src/com/android/mediaroutertest/MediaRouter2ManagerTest.java
+++ b/media/tests/MediaRouter/src/com/android/mediaroutertest/MediaRouter2ManagerTest.java
@@ -204,7 +204,7 @@
addRouterCallback(new MediaRouter2.RouteCallback() {});
addTransferCallback(new MediaRouter2.TransferCallback() {
@Override
- public void onTransferred(MediaRouter2.RoutingController oldController,
+ public void onTransfer(MediaRouter2.RoutingController oldController,
MediaRouter2.RoutingController newController) {
if (newController == null) {
return;
diff --git a/packages/SystemUI/res/layout/controls_management.xml b/packages/SystemUI/res/layout/controls_management.xml
index 34a966c..9d5eb63 100644
--- a/packages/SystemUI/res/layout/controls_management.xml
+++ b/packages/SystemUI/res/layout/controls_management.xml
@@ -105,7 +105,7 @@
android:id="@+id/done"
android:layout_width="wrap_content"
android:layout_height="match_parent"
- android:text="Done"
+ android:text="@string/save"
style="@*android:style/Widget.DeviceDefault.Button.Colored"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
@@ -114,4 +114,4 @@
</FrameLayout>
-</LinearLayout>
\ No newline at end of file
+</LinearLayout>
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index 6905de2..f71c0b3 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -2635,13 +2635,15 @@
<string name="magnification_controls_title">Magnification Window Controls</string>
<!-- Quick Controls strings -->
- <!-- Quick Controls view header [CHAR LIMIT=30] -->
+ <!-- Quick Controls empty state, title [CHAR LIMIT=30] -->
<string name="quick_controls_title">Quick Controls</string>
+ <!-- Quick Controls empty state, subtitle [CHAR LIMIT=100] -->
+ <string name="quick_controls_subtitle">Add controls for your connected devices</string>
<!-- Controls management providers screen title [CHAR LIMIT=30]-->
<string name="controls_providers_title">Add Controls</string>
<!-- Controls management providers screen subtitle [CHAR LIMIT=NONE] -->
- <string name="controls_providers_subtitle">Choose an app from which to add controls</string>
+ <string name="controls_providers_subtitle">Choose app to add controls</string>
<!-- Number of favorites for controls management screen [CHAR LIMIT=NONE]-->
<plurals name="controls_number_of_favorites">
<item quantity="one"><xliff:g id="number" example="1">%s</xliff:g> control added.</item>
@@ -2651,7 +2653,9 @@
<!-- Controls management controls screen default title [CHAR LIMIT=30] -->
<string name="controls_favorite_default_title">Controls</string>
<!-- Controls management controls screen subtitle [CHAR LIMIT=NONE] -->
- <string name="controls_favorite_subtitle">Choose controls for quick access</string>
+ <string name="controls_favorite_subtitle">Choose controls to access from the power menu</string>
+ <!-- Controls management controls screen, user direction for rearranging controls [CHAR LIMIT=NONE] -->
+ <string name="controls_favorite_rearrange">Hold and drag a control to move it</string>
<!-- Controls management controls screen error on load message [CHAR LIMIT=60] -->
<string name="controls_favorite_load_error">The list of all controls could not be loaded.</string>
@@ -2659,21 +2663,35 @@
<string name="controls_favorite_other_zone_header">Other</string>
<!-- Controls dialog title [CHAR LIMIT=30] -->
- <string name="controls_dialog_title">Add to Quick Controls</string>
+ <string name="controls_dialog_title">Add to quick controls</string>
<!-- Controls dialog add to favorites [CHAR LIMIT=30] -->
<string name="controls_dialog_ok">Add to favorites</string>
<!-- Controls dialog message [CHAR LIMIT=NONE] -->
<string name="controls_dialog_message"><xliff:g id="app" example="System UI">%s</xliff:g> suggested this control to add to your favorites.</string>
+ <!-- Controls dialog confirmation [CHAR LIMIT=30] -->
+ <string name="controls_dialog_confirmation">Controls updated</string>
<!-- Controls PIN entry dialog, switch to alphanumeric keyboard [CHAR LIMIT=100] -->
<string name="controls_pin_use_alphanumeric">PIN contains letters or symbols</string>
<!-- Controls PIN entry dialog, title [CHAR LIMIT=30] -->
- <string name="controls_pin_verify">Verify device PIN</string>
+ <string name="controls_pin_verify">Verify <xliff:g id="device" example="Backdoor lock">%s</xliff:g></string>
+ <!-- Controls PIN entry dialog, waiting to verify [CHAR LIMIT=30] -->
+ <string name="controls_pin_verifying">Verifying\u2026</string>
<!-- Controls PIN entry dialog, text hint [CHAR LIMIT=30] -->
<string name="controls_pin_instructions">Enter PIN</string>
+ <!-- Controls passphrase entry dialog, text hint [CHAR LIMIT=30] -->
+ <string name="controls_passphrase_instructions">Enter passphrase</string>
+ <!-- Controls PIN entry dialog, text hint, retry [CHAR LIMIT=30] -->
+ <string name="controls_pin_instructions_retry">Try another PIN</string>
+ <!-- Controls passphrase entry dialog, text hint, retry [CHAR LIMIT=50] -->
+ <string name="controls_passphrase_instructions_retry">Try another passphrase</string>
+ <!-- Controls confirmation dialog, waiting to confirm [CHAR LIMIT=30] -->
+ <string name="controls_confirmation_confirming">Confirming\u2026</string>
+ <!-- Controls confirmation dialog, user prompt [CHAR LIMIT=NONE] -->
+ <string name="controls_confirmation_message">Confirm change for <xliff:g id="device" example="Backdoor lock">%s</xliff:g></string>
<!-- Tooltip to show in management screen when there are multiple structures [CHAR_LIMIT=50] -->
- <string name="controls_structure_tooltip">Swipe to see other structures</string>
+ <string name="controls_structure_tooltip">Swipe to see more</string>
<!-- Message to tell the user to wait while systemui attempts to load a set of
recommended controls [CHAR_LIMIT=30] -->
@@ -2681,4 +2699,18 @@
<!-- Close the controls associated with a specific media session [CHAR_LIMIT=NONE] -->
<string name="controls_media_close_session">Close this media session</string>
+
+ <!-- Error message indicating that a control timed out while waiting for an update [CHAR_LIMIT=30] -->
+ <string name="controls_error_timeout">Inactive, check app</string>
+ <!-- Error message indicating that a control action failed [CHAR_LIMIT=30] -->
+ <string name="controls_error_failed">Error, try again</string>
+ <!-- Stateless control message informing the user that a routine has started [CHAR_LIMIT=30] -->
+ <string name="controls_in_progress">In progress</string>
+ <!-- Tooltip informing user where the recently added controls are [CHAR_LIMIT=100] -->
+ <string name="controls_added_tooltip">Hold Power button to see new controls</string>
+
+ <!-- Controls menu, add [CHAR_LIMIT=30] -->
+ <string name="controls_menu_add">Add controls</string>
+ <!-- Controls menu, edit [CHAR_LIMIT=30] -->
+ <string name="controls_menu_edit">Edit controls</string>
</resources>
diff --git a/packages/SystemUI/src/com/android/systemui/controls/ui/ChallengeDialogs.kt b/packages/SystemUI/src/com/android/systemui/controls/ui/ChallengeDialogs.kt
index 2494fd1..15c2a0a 100644
--- a/packages/SystemUI/src/com/android/systemui/controls/ui/ChallengeDialogs.kt
+++ b/packages/SystemUI/src/com/android/systemui/controls/ui/ChallengeDialogs.kt
@@ -50,7 +50,8 @@
cvh.context,
android.R.style.Theme_DeviceDefault_Dialog_Alert
).apply {
- setTitle(R.string.controls_pin_verify)
+ val res = cvh.context.resources
+ setTitle(res.getString(R.string.controls_pin_verify, *arrayOf(cvh.title.getText())))
setView(R.layout.controls_dialog_pin)
setPositiveButton(
android.R.string.ok,
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/CrossFadeHelper.java b/packages/SystemUI/src/com/android/systemui/statusbar/CrossFadeHelper.java
index 164215b..b57b22f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/CrossFadeHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/CrossFadeHelper.java
@@ -50,7 +50,9 @@
if (endRunnable != null) {
endRunnable.run();
}
- view.setVisibility(View.INVISIBLE);
+ if (view.getVisibility() != View.GONE) {
+ view.setVisibility(View.INVISIBLE);
+ }
}
});
if (view.hasOverlappingRendering()) {
@@ -75,7 +77,7 @@
*/
public static void fadeOut(View view, float fadeOutAmount, boolean remap) {
view.animate().cancel();
- if (fadeOutAmount == 1.0f) {
+ if (fadeOutAmount == 1.0f && view.getVisibility() != View.GONE) {
view.setVisibility(View.INVISIBLE);
} else if (view.getVisibility() == View.INVISIBLE) {
view.setVisibility(View.VISIBLE);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationHeaderUtil.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationHeaderUtil.java
index 4759d56..ba3db09 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationHeaderUtil.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationHeaderUtil.java
@@ -28,6 +28,7 @@
import android.widget.TextView;
import com.android.internal.util.ContrastColorUtil;
+import com.android.internal.widget.ConversationLayout;
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow;
import com.android.systemui.statusbar.notification.row.NotificationContentView;
@@ -42,6 +43,7 @@
private static final TextViewComparator sTextViewComparator = new TextViewComparator();
private static final VisibilityApplicator sVisibilityApplicator = new VisibilityApplicator();
+ private static final VisibilityApplicator sAppNameApplicator = new AppNameApplicator();
private static final DataExtractor sIconExtractor = new DataExtractor() {
@Override
public Object extractData(ExpandableNotificationRow row) {
@@ -64,7 +66,7 @@
};
private final static ResultApplicator mGreyApplicator = new ResultApplicator() {
@Override
- public void apply(View view, boolean apply) {
+ public void apply(View parent, View view, boolean apply, boolean reset) {
NotificationHeaderView header = (NotificationHeaderView) view;
ImageView icon = (ImageView) view.findViewById(
com.android.internal.R.id.icon);
@@ -132,8 +134,12 @@
}
},
sVisibilityApplicator));
- mComparators.add(HeaderProcessor.forTextView(mRow,
- com.android.internal.R.id.app_name_text));
+ mComparators.add(new HeaderProcessor(
+ mRow,
+ com.android.internal.R.id.app_name_text,
+ null,
+ sTextViewComparator,
+ sAppNameApplicator));
mComparators.add(HeaderProcessor.forTextView(mRow,
com.android.internal.R.id.header_text));
mDividers.add(com.android.internal.R.id.header_text_divider);
@@ -299,19 +305,19 @@
public void apply(ExpandableNotificationRow row, boolean reset) {
boolean apply = mApply && !reset;
if (row.isSummaryWithChildren()) {
- applyToView(apply, row.getNotificationHeader());
+ applyToView(apply, reset, row.getNotificationHeader());
return;
}
- applyToView(apply, row.getPrivateLayout().getContractedChild());
- applyToView(apply, row.getPrivateLayout().getHeadsUpChild());
- applyToView(apply, row.getPrivateLayout().getExpandedChild());
+ applyToView(apply, reset, row.getPrivateLayout().getContractedChild());
+ applyToView(apply, reset, row.getPrivateLayout().getHeadsUpChild());
+ applyToView(apply, reset, row.getPrivateLayout().getExpandedChild());
}
- private void applyToView(boolean apply, View parent) {
+ private void applyToView(boolean apply, boolean reset, View parent) {
if (parent != null) {
View view = parent.findViewById(mId);
if (view != null && !mComparator.isEmpty(view)) {
- mApplicator.apply(view, apply);
+ mApplicator.apply(parent, view, apply, reset);
}
}
}
@@ -375,14 +381,26 @@
}
private interface ResultApplicator {
- void apply(View view, boolean apply);
+ void apply(View parent, View view, boolean apply, boolean reset);
}
private static class VisibilityApplicator implements ResultApplicator {
@Override
- public void apply(View view, boolean apply) {
+ public void apply(View parent, View view, boolean apply, boolean reset) {
view.setVisibility(apply ? View.GONE : View.VISIBLE);
}
}
+
+ private static class AppNameApplicator extends VisibilityApplicator {
+
+ @Override
+ public void apply(View parent, View view, boolean apply, boolean reset) {
+ if (reset && parent instanceof ConversationLayout) {
+ ConversationLayout layout = (ConversationLayout) parent;
+ apply = layout.shouldHideAppName();
+ }
+ super.apply(parent, view, apply, reset);
+ }
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ViewTransformationHelper.java b/packages/SystemUI/src/com/android/systemui/statusbar/ViewTransformationHelper.java
index 2a45bc2..83e51cd 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/ViewTransformationHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/ViewTransformationHelper.java
@@ -49,6 +49,14 @@
mTransformedViews.put(key, transformedView);
}
+ public void addTransformedView(View transformedView) {
+ int key = transformedView.getId();
+ if (key == View.NO_ID) {
+ throw new IllegalArgumentException("View argument does not have a valid id");
+ }
+ addTransformedView(key, transformedView);
+ }
+
/**
* Add a view that transforms to a similar sibling, meaning that we should consider any mapping
* found treated as the same viewType. This is useful for imageViews, where it's hard to compare
@@ -62,6 +70,14 @@
mKeysTransformingToSimilar.add(key);
}
+ public void addViewTransformingToSimilar(View transformedView) {
+ int key = transformedView.getId();
+ if (key == View.NO_ID) {
+ throw new IllegalArgumentException("View argument does not have a valid id");
+ }
+ addViewTransformingToSimilar(key, transformedView);
+ }
+
public void reset() {
mTransformedViews.clear();
mKeysTransformingToSimilar.clear();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/MessagingLayoutTransformState.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/MessagingLayoutTransformState.java
index ccf5a0b..5ee4693 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/MessagingLayoutTransformState.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/MessagingLayoutTransformState.java
@@ -102,11 +102,11 @@
MessagingGroup matchingGroup = pairs.get(ownGroup);
if (!isGone(ownGroup)) {
if (matchingGroup != null) {
- transformGroups(ownGroup, matchingGroup, transformationAmount, to);
+ int totalTranslation = transformGroups(ownGroup, matchingGroup,
+ transformationAmount, to);
if (lastPairedGroup == null) {
lastPairedGroup = ownGroup;
if (to){
- float totalTranslation = ownGroup.getTop() - matchingGroup.getTop();
currentTranslation = matchingGroup.getAvatar().getTranslationY()
- totalTranslation;
} else {
@@ -229,14 +229,19 @@
return result;
}
- private void transformGroups(MessagingGroup ownGroup, MessagingGroup otherGroup,
+ /**
+ * Transform two groups towards each other.
+ *
+ * @return the total transformation distance that the group goes through
+ */
+ private int transformGroups(MessagingGroup ownGroup, MessagingGroup otherGroup,
float transformationAmount, boolean to) {
boolean useLinearTransformation =
otherGroup.getIsolatedMessage() == null && !mTransformInfo.isAnimating();
transformView(transformationAmount, to, ownGroup.getSenderView(), otherGroup.getSenderView(),
true /* sameAsAny */, useLinearTransformation);
- transformView(transformationAmount, to, ownGroup.getAvatar(), otherGroup.getAvatar(),
- true /* sameAsAny */, useLinearTransformation);
+ int totalAvatarTranslation = transformView(transformationAmount, to, ownGroup.getAvatar(),
+ otherGroup.getAvatar(), true /* sameAsAny */, useLinearTransformation);
List<MessagingMessage> ownMessages = ownGroup.getMessages();
List<MessagingMessage> otherMessages = otherGroup.getMessages();
float previousTranslation = 0;
@@ -264,8 +269,8 @@
messageAmount = 1.0f - messageAmount;
}
}
- transformView(messageAmount, to, child, otherChild, false, /* sameAsAny */
- useLinearTransformation);
+ int totalTranslation = transformView(messageAmount, to, child, otherChild,
+ false /* sameAsAny */, useLinearTransformation);
boolean otherIsIsolated = otherGroup.getIsolatedMessage() == otherChild;
if (messageAmount == 0.0f
&& (otherIsIsolated || otherGroup.isSingleLine())) {
@@ -278,23 +283,28 @@
} else if (ownGroup.getIsolatedMessage() == child || otherIsIsolated) {
// We don't want to add any translation for the image that is transforming
} else if (to) {
- float totalTranslation = child.getTop() + ownGroup.getTop()
- - otherChild.getTop() - otherChild.getTop();
previousTranslation = otherChild.getTranslationY() - totalTranslation;
} else {
previousTranslation = child.getTranslationY();
}
}
ownGroup.updateClipRect();
+ return totalAvatarTranslation;
}
- private void transformView(float transformationAmount, boolean to, View ownView,
+ /**
+ * Transform a view to another view.
+ *
+ * @return the total translationY this view goes through
+ */
+ private int transformView(float transformationAmount, boolean to, View ownView,
View otherView, boolean sameAsAny, boolean useLinearTransformation) {
TransformState ownState = TransformState.createFrom(ownView, mTransformInfo);
if (useLinearTransformation) {
ownState.setDefaultInterpolator(Interpolators.LINEAR);
}
ownState.setIsSameAsAnyView(sameAsAny && !isGone(otherView));
+ int totalTranslationDistance = 0;
if (to) {
if (otherView != null) {
TransformState otherState = TransformState.createFrom(otherView, mTransformInfo);
@@ -308,6 +318,8 @@
// since avatars serve as anchors for the rest of the layout transition
ownState.transformViewVerticalTo(otherState, transformationAmount);
}
+ totalTranslationDistance = ownState.getLaidOutLocationOnScreen()[1]
+ - otherState.getLaidOutLocationOnScreen()[1];
otherState.recycle();
} else {
ownState.disappear(transformationAmount, null);
@@ -325,12 +337,15 @@
// since avatars serve as anchors for the rest of the layout transition
ownState.transformViewVerticalFrom(otherState, transformationAmount);
}
+ totalTranslationDistance = ownState.getLaidOutLocationOnScreen()[1]
+ - otherState.getLaidOutLocationOnScreen()[1];
otherState.recycle();
} else {
ownState.appear(transformationAmount, null);
}
}
ownState.recycle();
+ return totalTranslationDistance;
}
private HashMap<MessagingGroup, MessagingGroup> findPairs(ArrayList<MessagingGroup> ownGroups,
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/wrapper/NotificationConversationTemplateViewWrapper.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/wrapper/NotificationConversationTemplateViewWrapper.kt
index 8b6081e..91a2e7c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/wrapper/NotificationConversationTemplateViewWrapper.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/wrapper/NotificationConversationTemplateViewWrapper.kt
@@ -30,41 +30,44 @@
import com.android.systemui.statusbar.notification.row.HybridNotificationView
/**
- * Wraps a notification containing a converation template
+ * Wraps a notification containing a conversation template
*/
class NotificationConversationTemplateViewWrapper constructor(
ctx: Context,
view: View,
row: ExpandableNotificationRow
-)
- : NotificationTemplateViewWrapper(ctx, view, row) {
+) : NotificationTemplateViewWrapper(ctx, view, row) {
- private val minHeightWithActions: Int
- private val conversationLayout: ConversationLayout
- private var conversationIcon: View? = null
- private var conversationBadge: View? = null
- private var expandButton: View? = null
+ private val minHeightWithActions: Int = NotificationUtils.getFontScaledHeight(
+ ctx,
+ R.dimen.notification_messaging_actions_min_height
+ )
+ private val conversationLayout: ConversationLayout = view as ConversationLayout
+
+ private lateinit var conversationIcon: View
+ private lateinit var conversationBadgeBg: View
+ private lateinit var expandButton: View
private lateinit var expandButtonContainer: View
private lateinit var imageMessageContainer: ViewGroup
- private var messagingLinearLayout: MessagingLinearLayout? = null
-
- init {
- conversationLayout = view as ConversationLayout
- minHeightWithActions = NotificationUtils.getFontScaledHeight(ctx,
- R.dimen.notification_messaging_actions_min_height)
- }
+ private lateinit var messagingLinearLayout: MessagingLinearLayout
+ private lateinit var conversationTitle: View
+ private lateinit var importanceRing: View
+ private lateinit var appName: View
private fun resolveViews() {
messagingLinearLayout = conversationLayout.messagingLinearLayout
imageMessageContainer = conversationLayout.imageMessageContainer
- conversationIcon = conversationLayout.requireViewById(
- com.android.internal.R.id.conversation_icon)
- conversationBadge = conversationLayout.requireViewById(
- com.android.internal.R.id.conversation_icon_badge)
- expandButton = conversationLayout.requireViewById(
- com.android.internal.R.id.expand_button)
- expandButtonContainer = conversationLayout.requireViewById(
- com.android.internal.R.id.expand_button_container)
+ with(conversationLayout) {
+ conversationIcon = requireViewById(com.android.internal.R.id.conversation_icon)
+ conversationBadgeBg =
+ requireViewById(com.android.internal.R.id.conversation_icon_badge_bg)
+ expandButton = requireViewById(com.android.internal.R.id.expand_button)
+ expandButtonContainer =
+ requireViewById(com.android.internal.R.id.expand_button_container)
+ importanceRing = requireViewById(com.android.internal.R.id.conversation_icon_badge_ring)
+ appName = requireViewById(com.android.internal.R.id.app_name_text)
+ conversationTitle = requireViewById(com.android.internal.R.id.conversation_text)
+ }
}
override fun onContentUpdated(row: ExpandableNotificationRow) {
@@ -77,71 +80,69 @@
override fun updateTransformedTypes() {
// This also clears the existing types
super.updateTransformedTypes()
- messagingLinearLayout?.let {
- mTransformationHelper.addTransformedView(it.id, it)
- }
+
+ addTransformedViews(
+ messagingLinearLayout,
+ appName,
+ conversationTitle)
// Let's ignore the image message container since that is transforming as part of the
// messages already
mTransformationHelper.setCustomTransformation(
object : ViewTransformationHelper.CustomTransformation() {
- override fun transformTo(ownState: TransformState,
- otherView: TransformableView,
- transformationAmount: Float): Boolean {
- if (otherView is HybridNotificationView) {
- return false
- }
- // we're hidden by default by the transformState
- ownState.ensureVisible();
- // Let's do nothing otherwise, this is already handled by the messages
- return true
- }
+ override fun transformTo(
+ ownState: TransformState,
+ otherView: TransformableView,
+ transformationAmount: Float
+ ): Boolean {
+ if (otherView is HybridNotificationView) {
+ return false
+ }
+ // we're hidden by default by the transformState
+ ownState.ensureVisible()
+ // Let's do nothing otherwise, this is already handled by the messages
+ return true
+ }
- override fun transformFrom(ownState: TransformState,
- otherView: TransformableView,
- transformationAmount: Float): Boolean {
- if (otherView is HybridNotificationView) {
- return false
- }
- // we're hidden by default by the transformState
- ownState.ensureVisible();
- // Let's do nothing otherwise, this is already handled by the messages
- return true
- }
- }, imageMessageContainer.id)
+ override fun transformFrom(
+ ownState: TransformState,
+ otherView: TransformableView,
+ transformationAmount: Float
+ ): Boolean =
+ transformTo(ownState, otherView, transformationAmount)
+ },
+ imageMessageContainer.id
+ )
- conversationIcon?.let {
- mTransformationHelper.addViewTransformingToSimilar(it.id, it)
- }
- conversationBadge?.let {
- mTransformationHelper.addViewTransformingToSimilar(it.id, it)
- }
- expandButton?.let {
- mTransformationHelper.addViewTransformingToSimilar(it.id, it)
- }
+ addViewsTransformingToSimilar(
+ conversationIcon,
+ conversationBadgeBg,
+ expandButton,
+ importanceRing
+ )
}
- override fun setRemoteInputVisible(visible: Boolean) {
- conversationLayout.showHistoricMessages(visible)
- }
+ override fun setRemoteInputVisible(visible: Boolean) =
+ conversationLayout.showHistoricMessages(visible)
- override fun updateExpandability(expandable: Boolean, onClickListener: View.OnClickListener?) {
- conversationLayout.updateExpandability(expandable, onClickListener)
- }
+ override fun updateExpandability(expandable: Boolean, onClickListener: View.OnClickListener?) =
+ conversationLayout.updateExpandability(expandable, onClickListener)
override fun disallowSingleClick(x: Float, y: Float): Boolean {
- if (expandButtonContainer.visibility == View.VISIBLE
- && isOnView(expandButtonContainer, x, y)) {
- return true
- }
- return super.disallowSingleClick(x, y)
+ val isOnExpandButton = expandButtonContainer.visibility == View.VISIBLE &&
+ isOnView(expandButtonContainer, x, y)
+ return isOnExpandButton || super.disallowSingleClick(x, y)
}
- override fun getMinLayoutHeight(): Int {
- if (mActionsContainer != null && mActionsContainer.visibility != View.GONE) {
- return minHeightWithActions
- } else {
- return super.getMinLayoutHeight()
- }
- }
+ override fun getMinLayoutHeight(): Int =
+ if (mActionsContainer != null && mActionsContainer.visibility != View.GONE)
+ minHeightWithActions
+ else
+ super.getMinLayoutHeight()
+
+ private fun addTransformedViews(vararg vs: View) =
+ vs.forEach(mTransformationHelper::addTransformedView)
+
+ private fun addViewsTransformingToSimilar(vararg vs: View) =
+ vs.forEach(mTransformationHelper::addViewTransformingToSimilar)
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/wrapper/NotificationHeaderViewWrapper.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/wrapper/NotificationHeaderViewWrapper.java
index 1d06198..a44ad3d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/wrapper/NotificationHeaderViewWrapper.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/wrapper/NotificationHeaderViewWrapper.java
@@ -132,11 +132,6 @@
updateCropToPaddingForImageViews();
Notification notification = row.getEntry().getSbn().getNotification();
mIcon.setTag(ImageTransformState.ICON_TAG, notification.getSmallIcon());
- if (mWorkProfileImage != null) {
- // The work profile image is always the same lets just set the icon tag for it not to
- // animate
- mWorkProfileImage.setTag(ImageTransformState.ICON_TAG, notification.getSmallIcon());
- }
// We need to reset all views that are no longer transforming in case a view was previously
// transformed, but now we decided to transform its container instead.
@@ -183,6 +178,7 @@
mTransformationHelper.reset();
mTransformationHelper.addTransformedView(TransformableView.TRANSFORMING_VIEW_ICON,
mIcon);
+ mTransformationHelper.addViewTransformingToSimilar(mWorkProfileImage);
if (mIsLowPriority && mHeaderText != null) {
mTransformationHelper.addTransformedView(TransformableView.TRANSFORMING_VIEW_TITLE,
mHeaderText);
diff --git a/services/autofill/java/com/android/server/autofill/Session.java b/services/autofill/java/com/android/server/autofill/Session.java
index 8032e9b..e942b27 100644
--- a/services/autofill/java/com/android/server/autofill/Session.java
+++ b/services/autofill/java/com/android/server/autofill/Session.java
@@ -2604,17 +2604,20 @@
@GuardedBy("mLock")
private void updateViewStateAndUiOnValueChangedLocked(AutofillId id, AutofillValue value,
ViewState viewState, int flags) {
- viewState.setCurrentValue(value);
-
- final String filterText;
+ final String textValue;
if (value == null || !value.isText()) {
- filterText = null;
+ textValue = null;
} else {
final CharSequence text = value.getTextValue();
// Text should never be null, but it doesn't hurt to check to avoid a
// system crash...
- filterText = (text == null) ? null : text.toString();
+ textValue = (text == null) ? null : text.toString();
}
+ updateFilteringStateOnValueChangedLocked(textValue, viewState);
+
+ viewState.setCurrentValue(value);
+
+ final String filterText = textValue;
final AutofillValue filledValue = viewState.getAutofilledValue();
if (filledValue != null) {
@@ -2645,6 +2648,52 @@
getUiForShowing().filterFillUi(filterText, this);
}
+ /**
+ * Disable filtering of inline suggestions for further text changes in this view if any
+ * character was removed earlier and now any character is being added. Such behaviour may
+ * indicate the IME attempting to probe the potentially sensitive content of inline suggestions.
+ */
+ @GuardedBy("mLock")
+ private void updateFilteringStateOnValueChangedLocked(@Nullable String newTextValue,
+ ViewState viewState) {
+ if (newTextValue == null) {
+ // Don't just return here, otherwise the IME can circumvent this logic using non-text
+ // values.
+ newTextValue = "";
+ }
+ final AutofillValue currentValue = viewState.getCurrentValue();
+ final String currentTextValue;
+ if (currentValue == null || !currentValue.isText()) {
+ currentTextValue = "";
+ } else {
+ currentTextValue = currentValue.getTextValue().toString();
+ }
+
+ if ((viewState.getState() & ViewState.STATE_CHAR_REMOVED) == 0) {
+ if (!containsCharsInOrder(newTextValue, currentTextValue)) {
+ viewState.setState(ViewState.STATE_CHAR_REMOVED);
+ }
+ } else if (!containsCharsInOrder(currentTextValue, newTextValue)) {
+ // Characters were added or replaced.
+ viewState.setState(ViewState.STATE_INLINE_DISABLED);
+ }
+ }
+
+ /**
+ * Returns true if {@code s1} contains all characters of {@code s2}, in order.
+ */
+ private static boolean containsCharsInOrder(String s1, String s2) {
+ int prevIndex = -1;
+ for (char ch : s2.toCharArray()) {
+ int index = TextUtils.indexOf(s1, ch, prevIndex + 1);
+ if (index == -1) {
+ return false;
+ }
+ prevIndex = index;
+ }
+ return true;
+ }
+
@Override
public void onFillReady(@NonNull FillResponse response, @NonNull AutofillId filledId,
@Nullable AutofillValue value) {
@@ -2735,6 +2784,10 @@
return false;
}
+ final ViewState currentView = mViewStates.get(mCurrentViewId);
+ if ((currentView.getState() & ViewState.STATE_INLINE_DISABLED) != 0) {
+ response.getDatasets().clear();
+ }
InlineSuggestionsResponse inlineSuggestionsResponse =
InlineSuggestionFactory.createInlineSuggestionsResponse(
inlineSuggestionsRequest.get(), response, filterText, mCurrentViewId,
diff --git a/services/autofill/java/com/android/server/autofill/ViewState.java b/services/autofill/java/com/android/server/autofill/ViewState.java
index f7c24f0..9114576 100644
--- a/services/autofill/java/com/android/server/autofill/ViewState.java
+++ b/services/autofill/java/com/android/server/autofill/ViewState.java
@@ -76,6 +76,10 @@
public static final int STATE_TRIGGERED_AUGMENTED_AUTOFILL = 0x1000;
/** Inline suggestions were shown for this View. */
public static final int STATE_INLINE_SHOWN = 0x2000;
+ /** A character was removed from the View value (not by the service). */
+ public static final int STATE_CHAR_REMOVED = 0x4000;
+ /** Showing inline suggestions is not allowed for this View. */
+ public static final int STATE_INLINE_DISABLED = 0x8000;
public final AutofillId id;
diff --git a/services/core/jni/com_android_server_stats_pull_StatsPullAtomService.cpp b/services/core/jni/com_android_server_stats_pull_StatsPullAtomService.cpp
index 43cd0a2..b1fbe64 100644
--- a/services/core/jni/com_android_server_stats_pull_StatsPullAtomService.cpp
+++ b/services/core/jni/com_android_server_stats_pull_StatsPullAtomService.cpp
@@ -46,17 +46,15 @@
static void nativeInit(JNIEnv* env, jobject javaObject) {
// on device power measurement
gPowerStatsPuller = server::stats::PowerStatsPuller();
- AStatsManager_registerPullAtomCallback(android::util::ON_DEVICE_POWER_MEASUREMENT,
- onDevicePowerMeasurementCallback,
- /* metadata= */ nullptr,
- /* cookie= */ nullptr);
+ AStatsManager_setPullAtomCallback(android::util::ON_DEVICE_POWER_MEASUREMENT,
+ /* metadata= */ nullptr, onDevicePowerMeasurementCallback,
+ /* cookie= */ nullptr);
// subsystem sleep state
gSubsystemSleepStatePuller = server::stats::SubsystemSleepStatePuller();
- AStatsManager_registerPullAtomCallback(android::util::SUBSYSTEM_SLEEP_STATE,
- subsystemSleepStateCallback,
- /* metadata= */ nullptr,
- /* cookie= */ nullptr);
+ AStatsManager_setPullAtomCallback(android::util::SUBSYSTEM_SLEEP_STATE,
+ /* metadata= */ nullptr, subsystemSleepStateCallback,
+ /* cookie= */ nullptr);
}
static const JNINativeMethod sMethods[] = {{"nativeInit", "()V", (void*)nativeInit}};
diff --git a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java
index 0eba07b..18d5819 100644
--- a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java
+++ b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java
@@ -41,7 +41,6 @@
import android.content.res.Resources;
import android.database.ContentObserver;
import android.hardware.soundtrigger.IRecognitionStatusCallback;
-import android.hardware.soundtrigger.KeyphraseEnrollmentInfo;
import android.hardware.soundtrigger.KeyphraseMetadata;
import android.hardware.soundtrigger.ModelParams;
import android.hardware.soundtrigger.SoundTrigger;
@@ -100,7 +99,7 @@
* SystemService that publishes an IVoiceInteractionManagerService.
*/
public class VoiceInteractionManagerService extends SystemService {
- static final String TAG = "VoiceInteractionManagerService";
+ static final String TAG = "VoiceInteractionManager";
static final boolean DEBUG = false;
final Context mContext;
@@ -172,17 +171,17 @@
}
@Override
- public void onStartUser(@NonNull UserInfo userInfo) {
- if (DEBUG_USER) Slog.d(TAG, "onStartUser(" + userInfo + ")");
+ public void onUserStarting(@NonNull TargetUser user) {
+ if (DEBUG_USER) Slog.d(TAG, "onUserStarting(" + user + ")");
- mServiceStub.initForUser(userInfo.id);
+ mServiceStub.initForUser(user.getUserIdentifier());
}
@Override
- public void onUnlockUser(@NonNull UserInfo userInfo) {
- if (DEBUG_USER) Slog.d(TAG, "onUnlockUser(" + userInfo + ")");
+ public void onUserUnlocking(@NonNull TargetUser user) {
+ if (DEBUG_USER) Slog.d(TAG, "onUserUnlocking(" + user + ")");
- mServiceStub.initForUser(userInfo.id);
+ mServiceStub.initForUser(user.getUserIdentifier());
mServiceStub.switchImplementationIfNeeded(false);
}
@@ -224,7 +223,6 @@
class VoiceInteractionManagerServiceStub extends IVoiceInteractionManagerService.Stub {
VoiceInteractionManagerServiceImpl mImpl;
- KeyphraseEnrollmentInfo mEnrollmentApplicationInfo;
private boolean mSafeMode;
private int mCurUser;
@@ -449,15 +447,6 @@
}
}
- private void getOrCreateEnrollmentApplicationInfo() {
- synchronized (this) {
- if (mEnrollmentApplicationInfo == null) {
- mEnrollmentApplicationInfo = new KeyphraseEnrollmentInfo(
- mContext.getPackageManager());
- }
- }
- }
-
private void setCurrentUserLocked(@UserIdInt int userHandle) {
mCurUser = userHandle;
final UserInfo userInfo = mUserManagerInternal.getUserInfo(mCurUser);
@@ -1391,11 +1380,6 @@
pw.println(" mCurUserUnlocked: " + mCurUserUnlocked);
pw.println(" mCurUserSupported: " + mCurUserSupported);
dumpSupportedUsers(pw, " ");
- if (mEnrollmentApplicationInfo == null) {
- pw.println(" (No enrollment application info)");
- } else {
- pw.println(" " + mEnrollmentApplicationInfo.toString());
- }
mDbHelper.dump(pw);
if (mImpl == null) {
pw.println(" (No active implementation)");
@@ -1425,9 +1409,13 @@
}
}
+ private boolean isCallerHoldingPermission(String permission) {
+ return mContext.checkCallingOrSelfPermission(permission)
+ == PackageManager.PERMISSION_GRANTED;
+ }
+
private void enforceCallingPermission(String permission) {
- if (mContext.checkCallingOrSelfPermission(permission)
- != PackageManager.PERMISSION_GRANTED) {
+ if (!isCallerHoldingPermission(permission)) {
throw new SecurityException("Caller does not hold the permission " + permission);
}
}
@@ -1440,12 +1428,12 @@
}
private void enforceCallerAllowedToEnrollVoiceModel() {
- enforceCallingPermission(Manifest.permission.MANAGE_VOICE_KEYPHRASES);
- if (!isCallerCurrentVoiceInteractionService()
- && !isCallerTrustedEnrollmentApplication()) {
- throw new SecurityException("Caller is required to be the current voice interaction"
- + " service or a system enrollment application to enroll voice models");
+ if (isCallerHoldingPermission(Manifest.permission.KEYPHRASE_ENROLLMENT_APPLICATION)) {
+ return;
}
+
+ enforceCallingPermission(Manifest.permission.MANAGE_VOICE_KEYPHRASES);
+ enforceIsCurrentVoiceInteractionService();
}
private boolean isCallerCurrentVoiceInteractionService() {
@@ -1453,12 +1441,6 @@
&& mImpl.mInfo.getServiceInfo().applicationInfo.uid == Binder.getCallingUid();
}
- private boolean isCallerTrustedEnrollmentApplication() {
- getOrCreateEnrollmentApplicationInfo();
- return mEnrollmentApplicationInfo.isUidSupportedEnrollmentApplication(
- Binder.getCallingUid());
- }
-
private void setImplLocked(VoiceInteractionManagerServiceImpl impl) {
mImpl = impl;
mAtmInternal.notifyActiveVoiceInteractionServiceChanged(
diff --git a/telecomm/java/android/telecom/TelecomManager.java b/telecomm/java/android/telecom/TelecomManager.java
index 1792256..e3baa0a 100644
--- a/telecomm/java/android/telecom/TelecomManager.java
+++ b/telecomm/java/android/telecom/TelecomManager.java
@@ -848,7 +848,6 @@
*
* @hide
*/
- @SystemApi
public static final int CALL_SOURCE_EMERGENCY_SHORTCUT = 2;
/**
@@ -856,7 +855,6 @@
*
* @hide
*/
- @SystemApi
public static final int CALL_SOURCE_EMERGENCY_DIALPAD = 1;
/**
@@ -864,7 +862,6 @@
*
* @hide
*/
- @SystemApi
public static final int CALL_SOURCE_UNSPECIFIED = 0;
/**
diff --git a/telephony/api/system-current.txt b/telephony/api/system-current.txt
index ef4979d..0c5d894 100644
--- a/telephony/api/system-current.txt
+++ b/telephony/api/system-current.txt
@@ -801,6 +801,7 @@
method public boolean isDataConnectivityPossible();
method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isDataEnabledForApn(int);
method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isEmergencyAssistanceEnabled();
+ method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @WorkerThread public boolean isIccLockEnabled();
method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isIdle();
method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isInEmergencySmsMode();
method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isLteCdmaEvdoGsmWcdmaEnabled();
diff --git a/telephony/java/android/telephony/SmsManager.java b/telephony/java/android/telephony/SmsManager.java
index f6552ee..c144746 100644
--- a/telephony/java/android/telephony/SmsManager.java
+++ b/telephony/java/android/telephony/SmsManager.java
@@ -424,7 +424,7 @@
String destinationAddress, String scAddress, String text,
PendingIntent sentIntent, PendingIntent deliveryIntent) {
sendTextMessageInternal(destinationAddress, scAddress, text, sentIntent, deliveryIntent,
- true /* persistMessage*/, null, 0L /* messageId */);
+ true /* persistMessage*/, null, null, 0L /* messageId */);
}
@@ -443,7 +443,7 @@
@Nullable PendingIntent sentIntent, @Nullable PendingIntent deliveryIntent,
long messageId) {
sendTextMessageInternal(destinationAddress, scAddress, text, sentIntent, deliveryIntent,
- true /* persistMessage*/, null, messageId);
+ true /* persistMessage*/, null, null, messageId);
}
/**
@@ -561,7 +561,7 @@
private void sendTextMessageInternal(String destinationAddress, String scAddress,
String text, PendingIntent sentIntent, PendingIntent deliveryIntent,
- boolean persistMessage, String packageName, long messageId) {
+ boolean persistMessage, String packageName, String attributionTag, long messageId) {
if (TextUtils.isEmpty(destinationAddress)) {
throw new IllegalArgumentException("Invalid destinationAddress");
}
@@ -586,7 +586,7 @@
public void onSuccess(int subId) {
ISms iSms = getISmsServiceOrThrow();
try {
- iSms.sendTextForSubscriber(subId, packageName,
+ iSms.sendTextForSubscriber(subId, packageName, attributionTag,
destinationAddress, scAddress, text, sentIntent, deliveryIntent,
persistMessage, messageId);
} catch (RemoteException e) {
@@ -606,7 +606,7 @@
// visible to the user.
ISms iSms = getISmsServiceOrThrow();
try {
- iSms.sendTextForSubscriber(getSubscriptionId(), packageName,
+ iSms.sendTextForSubscriber(getSubscriptionId(), packageName, attributionTag,
destinationAddress, scAddress, text, sentIntent, deliveryIntent,
persistMessage, messageId);
} catch (RemoteException e) {
@@ -653,7 +653,7 @@
String destinationAddress, String scAddress, String text,
PendingIntent sentIntent, PendingIntent deliveryIntent) {
sendTextMessageInternal(destinationAddress, scAddress, text, sentIntent, deliveryIntent,
- false /* persistMessage */, null,
+ false /* persistMessage */, null, null,
0L /* messageId */);
}
@@ -937,7 +937,7 @@
String destinationAddress, String scAddress, ArrayList<String> parts,
ArrayList<PendingIntent> sentIntents, ArrayList<PendingIntent> deliveryIntents) {
sendMultipartTextMessageInternal(destinationAddress, scAddress, parts, sentIntents,
- deliveryIntents, true /* persistMessage*/, null,
+ deliveryIntents, true /* persistMessage*/, null, null,
0L /* messageId */);
}
@@ -955,7 +955,7 @@
@NonNull List<String> parts, @Nullable List<PendingIntent> sentIntents,
@Nullable List<PendingIntent> deliveryIntents, long messageId) {
sendMultipartTextMessageInternal(destinationAddress, scAddress, parts, sentIntents,
- deliveryIntents, true /* persistMessage*/, null,
+ deliveryIntents, true /* persistMessage*/, null, null,
messageId);
}
@@ -979,15 +979,18 @@
public void sendMultipartTextMessage(
@NonNull String destinationAddress, @Nullable String scAddress,
@NonNull List<String> parts, @Nullable List<PendingIntent> sentIntents,
- @Nullable List<PendingIntent> deliveryIntents, @NonNull String packageName) {
+ @Nullable List<PendingIntent> deliveryIntents, @NonNull String packageName,
+ @Nullable String attributionTag) {
sendMultipartTextMessageInternal(destinationAddress, scAddress, parts, sentIntents,
- deliveryIntents, true /* persistMessage*/, packageName, 0L /* messageId */);
+ deliveryIntents, true /* persistMessage*/, packageName, attributionTag,
+ 0L /* messageId */);
}
private void sendMultipartTextMessageInternal(
String destinationAddress, String scAddress, List<String> parts,
List<PendingIntent> sentIntents, List<PendingIntent> deliveryIntents,
- boolean persistMessage, String packageName, long messageId) {
+ boolean persistMessage, String packageName, @Nullable String attributionTag,
+ long messageId) {
if (TextUtils.isEmpty(destinationAddress)) {
throw new IllegalArgumentException("Invalid destinationAddress");
}
@@ -1012,7 +1015,7 @@
public void onSuccess(int subId) {
try {
ISms iSms = getISmsServiceOrThrow();
- iSms.sendMultipartTextForSubscriber(subId, packageName,
+ iSms.sendMultipartTextForSubscriber(subId, packageName, attributionTag,
destinationAddress, scAddress, parts, sentIntents,
deliveryIntents, persistMessage, messageId);
} catch (RemoteException e) {
@@ -1034,8 +1037,8 @@
ISms iSms = getISmsServiceOrThrow();
if (iSms != null) {
iSms.sendMultipartTextForSubscriber(getSubscriptionId(), packageName,
- destinationAddress, scAddress, parts, sentIntents, deliveryIntents,
- persistMessage, messageId);
+ attributionTag, destinationAddress, scAddress, parts, sentIntents,
+ deliveryIntents, persistMessage, messageId);
}
} catch (RemoteException e) {
Log.e(TAG, "sendMultipartTextMessageInternal: Couldn't send SMS - "
@@ -1053,7 +1056,7 @@
deliveryIntent = deliveryIntents.get(0);
}
sendTextMessageInternal(destinationAddress, scAddress, parts.get(0),
- sentIntent, deliveryIntent, true, packageName, messageId);
+ sentIntent, deliveryIntent, true, packageName, attributionTag, messageId);
}
}
@@ -1083,7 +1086,7 @@
String destinationAddress, String scAddress, List<String> parts,
List<PendingIntent> sentIntents, List<PendingIntent> deliveryIntents) {
sendMultipartTextMessageInternal(destinationAddress, scAddress, parts, sentIntents,
- deliveryIntents, false /* persistMessage*/, null,
+ deliveryIntents, false /* persistMessage*/, null, null,
0L /* messageId */);
}
@@ -1246,7 +1249,7 @@
ISms iSms = getISmsServiceOrThrow();
if (iSms != null) {
iSms.sendMultipartTextForSubscriberWithOptions(subId,
- null, destinationAddress,
+ null, null, destinationAddress,
scAddress, parts, sentIntents, deliveryIntents,
persistMessage, finalPriority, expectMore, finalValidity);
}
@@ -1268,7 +1271,7 @@
ISms iSms = getISmsServiceOrThrow();
if (iSms != null) {
iSms.sendMultipartTextForSubscriberWithOptions(getSubscriptionId(),
- null, destinationAddress,
+ null, null, destinationAddress,
scAddress, parts, sentIntents, deliveryIntents,
persistMessage, finalPriority, expectMore, finalValidity);
}
@@ -1399,9 +1402,8 @@
public void onSuccess(int subId) {
try {
ISms iSms = getISmsServiceOrThrow();
- iSms.sendDataForSubscriber(subId, null,
- destinationAddress, scAddress, destinationPort & 0xFFFF, data,
- sentIntent, deliveryIntent);
+ iSms.sendDataForSubscriber(subId, null, null, destinationAddress, scAddress,
+ destinationPort & 0xFFFF, data, sentIntent, deliveryIntent);
} catch (RemoteException e) {
Log.e(TAG, "sendDataMessage: Couldn't send SMS - Exception: " + e.getMessage());
notifySmsError(sentIntent, RESULT_REMOTE_EXCEPTION);
@@ -1553,7 +1555,7 @@
// it here because we do not have access to the activity context that is performing this
// operation.
// Requires that the calling process has the SEND_SMS permission.
- getITelephony().enqueueSmsPickResult(null,
+ getITelephony().enqueueSmsPickResult(null, null,
new IIntegerConsumer.Stub() {
@Override
public void accept(int subId) {
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index e6001ce..0eaeda0 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -12991,6 +12991,7 @@
*/
@WorkerThread
@RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
+ @SystemApi
public boolean isIccLockEnabled() {
try {
ITelephony telephony = getITelephony();
diff --git a/telephony/java/com/android/internal/telephony/ISms.aidl b/telephony/java/com/android/internal/telephony/ISms.aidl
index fed969d..89f811e 100644
--- a/telephony/java/com/android/internal/telephony/ISms.aidl
+++ b/telephony/java/com/android/internal/telephony/ISms.aidl
@@ -86,9 +86,9 @@
* raw pdu of the status report is in the extended data ("pdu").
* @param subId the subId id.
*/
- void sendDataForSubscriber(int subId, String callingPkg, in String destAddr,
- in String scAddr, in int destPort, in byte[] data, in PendingIntent sentIntent,
- in PendingIntent deliveryIntent);
+ void sendDataForSubscriber(int subId, String callingPkg, String callingattributionTag,
+ in String destAddr, in String scAddr, in int destPort,in byte[] data,
+ in PendingIntent sentIntent, in PendingIntent deliveryIntent);
/**
* Send an SMS.
@@ -120,8 +120,8 @@
* @param messageId An id that uniquely identifies the message requested to be sent.
* Used for logging and diagnostics purposes. The id may be 0.
*/
- void sendTextForSubscriber(in int subId, String callingPkg, in String destAddr,
- in String scAddr, in String text, in PendingIntent sentIntent,
+ void sendTextForSubscriber(in int subId, String callingPkg, String callingAttributionTag,
+ in String destAddr, in String scAddr, in String text, in PendingIntent sentIntent,
in PendingIntent deliveryIntent, in boolean persistMessageForNonDefaultSmsApp,
in long messageId);
@@ -222,7 +222,7 @@
* Used for logging and diagnostics purposes. The id may be 0.
*/
void sendMultipartTextForSubscriber(in int subId, String callingPkg,
- in String destinationAddress, in String scAddress,
+ String callingAttributionTag, in String destinationAddress, in String scAddress,
in List<String> parts, in List<PendingIntent> sentIntents,
in List<PendingIntent> deliveryIntents, in boolean persistMessageForNonDefaultSmsApp,
in long messageId);
@@ -272,10 +272,10 @@
* Any Other values included Negative considered as Invalid Validity Period of the message.
*/
void sendMultipartTextForSubscriberWithOptions(in int subId, String callingPkg,
- in String destinationAddress, in String scAddress, in List<String> parts,
- in List<PendingIntent> sentIntents, in List<PendingIntent> deliveryIntents,
- in boolean persistMessageForNonDefaultSmsApp, in int priority, in boolean expectMore,
- in int validityPeriod);
+ String callingAttributionTag, in String destinationAddress, in String scAddress,
+ in List<String> parts, in List<PendingIntent> sentIntents,
+ in List<PendingIntent> deliveryIntents, in boolean persistMessageForNonDefaultSmsApp,
+ in int priority, in boolean expectMore, in int validityPeriod);
/**
* Enable reception of cell broadcast (SMS-CB) messages with the given
@@ -433,6 +433,7 @@
*
* @param subId the SIM id.
* @param callingPkg the package name of the calling app
+ * @param callingAttributionTag the attribution tag of calling context
* @param messageUri the URI of the stored message
* @param scAddress is the service center address or null to use the current default SMSC
* @param sentIntent if not NULL this <code>PendingIntent</code> is
@@ -452,8 +453,9 @@
* broadcast when the message is delivered to the recipient. The
* raw pdu of the status report is in the extended data ("pdu").
*/
- void sendStoredText(int subId, String callingPkg, in Uri messageUri, String scAddress,
- in PendingIntent sentIntent, in PendingIntent deliveryIntent);
+ void sendStoredText(int subId, String callingPkg, String callingAttributionTag,
+ in Uri messageUri, String scAddress, in PendingIntent sentIntent,
+ in PendingIntent deliveryIntent);
/**
* Send a system stored multi-part text message.
@@ -465,6 +467,7 @@
*
* @param subId the SIM id.
* @param callingPkg the package name of the calling app
+ * @param callingAttributeTag the attribute tag of the calling context
* @param messageUri the URI of the stored message
* @param scAddress is the service center address or null to use
* the current default SMSC
@@ -488,8 +491,8 @@
* to the recipient. The raw pdu of the status report is in the
* extended data ("pdu").
*/
- void sendStoredMultipartText(int subId, String callingPkg, in Uri messageUri,
- String scAddress, in List<PendingIntent> sentIntents,
+ void sendStoredMultipartText(int subId, String callingPkg, String callingAttributeTag,
+ in Uri messageUri, String scAddress, in List<PendingIntent> sentIntents,
in List<PendingIntent> deliveryIntents);
/**
diff --git a/telephony/java/com/android/internal/telephony/ISmsImplBase.java b/telephony/java/com/android/internal/telephony/ISmsImplBase.java
index 67ad23a..f1182f7 100644
--- a/telephony/java/com/android/internal/telephony/ISmsImplBase.java
+++ b/telephony/java/com/android/internal/telephony/ISmsImplBase.java
@@ -45,15 +45,15 @@
}
@Override
- public void sendDataForSubscriber(int subId, String callingPkg, String destAddr,
- String scAddr, int destPort, byte[] data, PendingIntent sentIntent,
+ public void sendDataForSubscriber(int subId, String callingPkg, String callingAttributionTag,
+ String destAddr, String scAddr, int destPort, byte[] data, PendingIntent sentIntent,
PendingIntent deliveryIntent) {
throw new UnsupportedOperationException();
}
@Override
- public void sendTextForSubscriber(int subId, String callingPkg, String destAddr,
- String scAddr, String text, PendingIntent sentIntent,
+ public void sendTextForSubscriber(int subId, String callingPkg, String callingAttributionTag,
+ String destAddr, String scAddr, String text, PendingIntent sentIntent,
PendingIntent deliveryIntent, boolean persistMessageForNonDefaultSmsApp,
long messageId) {
throw new UnsupportedOperationException();
@@ -76,7 +76,7 @@
@Override
public void sendMultipartTextForSubscriber(int subId, String callingPkg,
- String destinationAddress, String scAddress,
+ String callingAttributionTag, String destinationAddress, String scAddress,
List<String> parts, List<PendingIntent> sentIntents,
List<PendingIntent> deliveryIntents, boolean persistMessageForNonDefaultSmsApp,
long messageId) {
@@ -85,7 +85,7 @@
@Override
public void sendMultipartTextForSubscriberWithOptions(int subId, String callingPkg,
- String destinationAddress, String scAddress,
+ String callingAttributionTag, String destinationAddress, String scAddress,
List<String> parts, List<PendingIntent> sentIntents,
List<PendingIntent> deliveryIntents, boolean persistMessageForNonDefaultSmsApp,
int priority, boolean expectMore, int validityPeriod) {
@@ -162,14 +162,15 @@
}
@Override
- public void sendStoredText(int subId, String callingPkg, Uri messageUri, String scAddress,
- PendingIntent sentIntent, PendingIntent deliveryIntent) {
+ public void sendStoredText(int subId, String callingPkg, String callingAttributionTag,
+ Uri messageUri, String scAddress, PendingIntent sentIntent,
+ PendingIntent deliveryIntent) {
throw new UnsupportedOperationException();
}
@Override
- public void sendStoredMultipartText(int subId, String callingPkg, Uri messageUri,
- String scAddress, List<PendingIntent> sentIntents,
+ public void sendStoredMultipartText(int subId, String callingPkg, String callingAttributionTag,
+ Uri messageUri, String scAddress, List<PendingIntent> sentIntents,
List<PendingIntent> deliveryIntents) {
throw new UnsupportedOperationException();
}
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index 81c0895..43aeb19 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -2204,7 +2204,8 @@
* Enqueue a pending sms Consumer, which will answer with the user specified selection for an
* outgoing SmsManager operation.
*/
- oneway void enqueueSmsPickResult(String callingPackage, IIntegerConsumer subIdResult);
+ oneway void enqueueSmsPickResult(String callingPackage, String callingAttributeTag,
+ IIntegerConsumer subIdResult);
/**
* Returns the MMS user agent.