Merge "TIF: DVR API customization"
diff --git a/Android.bp b/Android.bp
index 9411eec..5292b2d 100644
--- a/Android.bp
+++ b/Android.bp
@@ -191,12 +191,20 @@
path: "telephony/java",
}
+genrule {
+ name: "statslog-telephony-common-java-gen",
+ tools: ["stats-log-api-gen"],
+ cmd: "$(location stats-log-api-gen) --java $(out) --module telephony_common"
+ + " --javaPackage com.android.internal.telephony --javaClass TelephonyCommonStatsLog",
+ out: ["com/android/internal/telephony/TelephonyCommonStatsLog.java"],
+}
+
filegroup {
name: "framework-telephony-common-sources",
srcs: [
"telephony/common/**/*.java",
+ ":statslog-telephony-common-java-gen",
],
- path: "telephony/common",
}
filegroup {
@@ -1267,7 +1275,11 @@
"--hide MissingPermission --hide BroadcastBehavior " +
"--hide HiddenSuperclass --hide DeprecationMismatch --hide UnavailableSymbol " +
"--hide SdkConstant --hide HiddenTypeParameter --hide Todo --hide Typo " +
- "--force-convert-to-warning-nullability-annotations +*:-android.*:+android.icu.*:-dalvik.*"
+ "--force-convert-to-warning-nullability-annotations +*:-android.*:+android.icu.*:-dalvik.* " +
+ "--api-lint-ignore-prefix android.icu. " +
+ "--api-lint-ignore-prefix java. " +
+ "--api-lint-ignore-prefix junit. " +
+ "--api-lint-ignore-prefix org. "
build = [
"StubLibraries.bp",
diff --git a/PREUPLOAD.cfg b/PREUPLOAD.cfg
index 4d1ac0e..9abb308 100644
--- a/PREUPLOAD.cfg
+++ b/PREUPLOAD.cfg
@@ -8,6 +8,7 @@
cmds/input/
core/jni/
libs/input/
+ services/core/jni/
[Hook Scripts]
checkstyle_hook = ${REPO_ROOT}/prebuilts/checkstyle/checkstyle.py --sha ${PREUPLOAD_COMMIT}
diff --git a/apex/jobscheduler/service/java/com/android/server/job/controllers/ConnectivityController.java b/apex/jobscheduler/service/java/com/android/server/job/controllers/ConnectivityController.java
index a0e83da..bb94275 100644
--- a/apex/jobscheduler/service/java/com/android/server/job/controllers/ConnectivityController.java
+++ b/apex/jobscheduler/service/java/com/android/server/job/controllers/ConnectivityController.java
@@ -144,14 +144,18 @@
public void startTrackingRestrictedJobLocked(JobStatus jobStatus) {
// Don't need to start tracking the job. If the job needed network, it would already be
// tracked.
- updateConstraintsSatisfied(jobStatus);
+ if (jobStatus.hasConnectivityConstraint()) {
+ updateConstraintsSatisfied(jobStatus);
+ }
}
@Override
public void stopTrackingRestrictedJobLocked(JobStatus jobStatus) {
// Shouldn't stop tracking the job here. If the job was tracked, it still needs network,
// even after being unrestricted.
- updateConstraintsSatisfied(jobStatus);
+ if (jobStatus.hasConnectivityConstraint()) {
+ updateConstraintsSatisfied(jobStatus);
+ }
}
/**
diff --git a/apex/media/framework/java/android/media/MediaParser.java b/apex/media/framework/java/android/media/MediaParser.java
index ac66d1b..d59270c 100644
--- a/apex/media/framework/java/android/media/MediaParser.java
+++ b/apex/media/framework/java/android/media/MediaParser.java
@@ -223,7 +223,7 @@
public static final class SeekPoint {
/** A {@link SeekPoint} whose time and byte offset are both set to 0. */
- public static final @NonNull SeekPoint START = new SeekPoint(0, 0);
+ @NonNull public static final SeekPoint START = new SeekPoint(0, 0);
/** The time of the seek point, in microseconds. */
public final long timeUs;
@@ -241,7 +241,8 @@
}
@Override
- public @NonNull String toString() {
+ @NonNull
+ public String toString() {
return "[timeUs=" + timeUs + ", position=" + position + "]";
}
@@ -414,7 +415,8 @@
* @return A new instance.
* @throws IllegalArgumentException If an invalid name is provided.
*/
- public static @NonNull MediaParser createByName(
+ @NonNull
+ public static MediaParser createByName(
@NonNull String name, @NonNull OutputConsumer outputConsumer) {
String[] nameAsArray = new String[] {name};
assertValidNames(nameAsArray);
@@ -431,7 +433,8 @@
* default array of names is used.
* @return A new instance.
*/
- public static @NonNull MediaParser create(
+ @NonNull
+ public static MediaParser create(
@NonNull OutputConsumer outputConsumer, @NonNull String... extractorNames) {
assertValidNames(extractorNames);
if (extractorNames.length == 0) {
@@ -448,7 +451,8 @@
*
* <p>TODO: List which properties are taken into account. E.g. MimeType.
*/
- public static @NonNull List<String> getExtractorNames(@NonNull MediaFormat mediaFormat) {
+ @NonNull
+ public static List<String> getExtractorNames(@NonNull MediaFormat mediaFormat) {
throw new UnsupportedOperationException();
}
@@ -479,7 +483,8 @@
* @return The name of the backing extractor implementation, or null if the backing extractor
* implementation has not yet been selected.
*/
- public @Nullable String getExtractorName() {
+ @Nullable
+ public String getExtractorName() {
return mExtractorName;
}
diff --git a/apex/permission/service/java/com/android/permission/persistence/RuntimePermissionsPersistenceImpl.java b/apex/permission/service/java/com/android/permission/persistence/RuntimePermissionsPersistenceImpl.java
index 1dbad45..90b1c4b 100644
--- a/apex/permission/service/java/com/android/permission/persistence/RuntimePermissionsPersistenceImpl.java
+++ b/apex/permission/service/java/com/android/permission/persistence/RuntimePermissionsPersistenceImpl.java
@@ -19,6 +19,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.content.ApexContext;
+import android.content.pm.PackageManager;
import android.os.UserHandle;
import android.util.ArrayMap;
import android.util.AtomicFile;
@@ -242,9 +243,10 @@
serializer.startTag(null, TAG_PERMISSION);
serializer.attribute(null, ATTRIBUTE_NAME, permissionState.getName());
serializer.attribute(null, ATTRIBUTE_GRANTED, Boolean.toString(
- permissionState.isGranted()));
+ permissionState.isGranted() && (permissionState.getFlags()
+ & PackageManager.FLAG_PERMISSION_ONE_TIME) == 0));
serializer.attribute(null, ATTRIBUTE_FLAGS, Integer.toHexString(
- permissionState.getFlags()));
+ permissionState.getFlags() & ~PackageManager.FLAG_PERMISSION_ONE_TIME));
serializer.endTag(null, TAG_PERMISSION);
}
}
diff --git a/apex/statsd/framework/java/android/app/StatsManager.java b/apex/statsd/framework/java/android/app/StatsManager.java
index ad1ac95..a1de330 100644
--- a/apex/statsd/framework/java/android/app/StatsManager.java
+++ b/apex/statsd/framework/java/android/app/StatsManager.java
@@ -474,17 +474,6 @@
}
/**
- * Temp registration for while the migration is in progress.
- *
- * @hide
- */
- public void registerPullAtomCallback(int atomTag, @Nullable PullAtomMetadata metadata,
- @NonNull StatsPullAtomCallback callback,
- @NonNull @CallbackExecutor Executor executor) {
- registerPullAtomCallback(atomTag, metadata, executor, callback);
- }
-
- /**
* Registers a callback for an atom when that atom is to be pulled. The stats service will
* invoke pullData in the callback when the stats service determines that this atom needs to be
* pulled.
@@ -591,15 +580,6 @@
}
/**
- * Temp for while migrations are in progress.
- *
- * @hide
- */
- public static PullAtomMetadata.Builder newBuilder() {
- return new PullAtomMetadata.Builder();
- }
-
- /**
* Builder for PullAtomMetadata.
*/
public static class Builder {
diff --git a/api/current.txt b/api/current.txt
index 7471931..5d5d379 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -12017,6 +12017,7 @@
field public static final String FEATURE_CAMERA_CAPABILITY_MANUAL_POST_PROCESSING = "android.hardware.camera.capability.manual_post_processing";
field public static final String FEATURE_CAMERA_CAPABILITY_MANUAL_SENSOR = "android.hardware.camera.capability.manual_sensor";
field public static final String FEATURE_CAMERA_CAPABILITY_RAW = "android.hardware.camera.capability.raw";
+ field public static final String FEATURE_CAMERA_CONCURRENT = "android.hardware.camera.concurrent";
field public static final String FEATURE_CAMERA_EXTERNAL = "android.hardware.camera.external";
field public static final String FEATURE_CAMERA_FLASH = "android.hardware.camera.flash";
field public static final String FEATURE_CAMERA_FRONT = "android.hardware.camera.front";
@@ -17174,6 +17175,7 @@
field @NonNull public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Float> SCALER_AVAILABLE_MAX_DIGITAL_ZOOM;
field @NonNull public static final android.hardware.camera2.CameraCharacteristics.Key<int[]> SCALER_AVAILABLE_ROTATE_AND_CROP_MODES;
field @NonNull public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Integer> SCALER_CROPPING_TYPE;
+ field @NonNull public static final android.hardware.camera2.CameraCharacteristics.Key<android.hardware.camera2.params.MandatoryStreamCombination[]> SCALER_MANDATORY_CONCURRENT_STREAM_COMBINATIONS;
field @NonNull public static final android.hardware.camera2.CameraCharacteristics.Key<android.hardware.camera2.params.MandatoryStreamCombination[]> SCALER_MANDATORY_STREAM_COMBINATIONS;
field @NonNull public static final android.hardware.camera2.CameraCharacteristics.Key<android.hardware.camera2.params.StreamConfigurationMap> SCALER_STREAM_CONFIGURATION_MAP;
field @NonNull public static final android.hardware.camera2.CameraCharacteristics.Key<int[]> SENSOR_AVAILABLE_TEST_PATTERN_MODES;
@@ -17263,6 +17265,8 @@
public final class CameraManager {
method @NonNull public android.hardware.camera2.CameraCharacteristics getCameraCharacteristics(@NonNull String) throws android.hardware.camera2.CameraAccessException;
method @NonNull public String[] getCameraIdList() throws android.hardware.camera2.CameraAccessException;
+ method @NonNull public java.util.Set<java.util.Set<java.lang.String>> getConcurrentStreamingCameraIds() throws android.hardware.camera2.CameraAccessException;
+ method @RequiresPermission(android.Manifest.permission.CAMERA) public boolean isConcurrentSessionConfigurationSupported(@NonNull java.util.Map<java.lang.String,android.hardware.camera2.params.SessionConfiguration>) throws android.hardware.camera2.CameraAccessException;
method @RequiresPermission(android.Manifest.permission.CAMERA) public void openCamera(@NonNull String, @NonNull android.hardware.camera2.CameraDevice.StateCallback, @Nullable android.os.Handler) throws android.hardware.camera2.CameraAccessException;
method @RequiresPermission(android.Manifest.permission.CAMERA) public void openCamera(@NonNull String, @NonNull java.util.concurrent.Executor, @NonNull android.hardware.camera2.CameraDevice.StateCallback) throws android.hardware.camera2.CameraAccessException;
method public void registerAvailabilityCallback(@NonNull android.hardware.camera2.CameraManager.AvailabilityCallback, @Nullable android.os.Handler);
@@ -39872,6 +39876,7 @@
field public static final int MATCH_ONLY = 3; // 0x3
field public static final String MEDIA_IGNORE_FILENAME = ".nomedia";
field public static final String MEDIA_SCANNER_VOLUME = "volume";
+ field public static final String META_DATA_REVIEW_GALLERY_PREWARM_SERVICE = "android.media.review_gallery_prewarm_service";
field public static final String META_DATA_STILL_IMAGE_CAMERA_PREWARM_SERVICE = "android.media.still_image_camera_preview_service";
field public static final String QUERY_ARG_MATCH_FAVORITE = "android:query-arg-match-favorite";
field public static final String QUERY_ARG_MATCH_PENDING = "android:query-arg-match-pending";
@@ -45215,6 +45220,7 @@
method public void registerCallback(android.telecom.Call.Callback);
method public void registerCallback(android.telecom.Call.Callback, android.os.Handler);
method public void reject(boolean, String);
+ method public void reject(int);
method public void removeExtras(java.util.List<java.lang.String>);
method public void removeExtras(java.lang.String...);
method public void respondToRttRequest(int, boolean);
@@ -45230,6 +45236,8 @@
field public static final String EXTRA_LAST_EMERGENCY_CALLBACK_TIME_MILLIS = "android.telecom.extra.LAST_EMERGENCY_CALLBACK_TIME_MILLIS";
field public static final String EXTRA_SILENT_RINGING_REQUESTED = "android.telecom.extra.SILENT_RINGING_REQUESTED";
field public static final String EXTRA_SUGGESTED_PHONE_ACCOUNTS = "android.telecom.extra.SUGGESTED_PHONE_ACCOUNTS";
+ field public static final int REJECT_REASON_DECLINED = 1; // 0x1
+ field public static final int REJECT_REASON_UNWANTED = 2; // 0x2
field public static final int STATE_ACTIVE = 4; // 0x4
field public static final int STATE_AUDIO_PROCESSING = 12; // 0xc
field public static final int STATE_CONNECTING = 9; // 0x9
@@ -45497,6 +45505,7 @@
method public void onPostDialContinue(boolean);
method public void onPullExternalCall();
method public void onReject();
+ method public void onReject(int);
method public void onReject(String);
method public void onSeparate();
method public void onShowIncomingCallUi();
diff --git a/api/system-current.txt b/api/system-current.txt
index 82924d7d..1a039dc 100755
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -2519,7 +2519,7 @@
method @Nullable public android.hardware.display.BrightnessCorrection getCorrectionByPackageName(@NonNull String);
method public android.util.Pair<float[],float[]> getCurve();
method public float getShortTermModelLowerLuxMultiplier();
- method public long getShortTermModelTimeout();
+ method public long getShortTermModelTimeoutMillis();
method public float getShortTermModelUpperLuxMultiplier();
method public boolean shouldCollectColorSamples();
method public void writeToParcel(android.os.Parcel, int);
@@ -2536,7 +2536,7 @@
method public int getMaxCorrectionsByPackageName();
method @NonNull public android.hardware.display.BrightnessConfiguration.Builder setDescription(@Nullable String);
method @NonNull public android.hardware.display.BrightnessConfiguration.Builder setShortTermModelLowerLuxMultiplier(@FloatRange(from=0.0f) float);
- method @NonNull public android.hardware.display.BrightnessConfiguration.Builder setShortTermModelTimeout(long);
+ method @NonNull public android.hardware.display.BrightnessConfiguration.Builder setShortTermModelTimeoutMillis(long);
method @NonNull public android.hardware.display.BrightnessConfiguration.Builder setShortTermModelUpperLuxMultiplier(@FloatRange(from=0.0f) float);
method @NonNull public android.hardware.display.BrightnessConfiguration.Builder setShouldCollectColorSamples(boolean);
}
@@ -7571,12 +7571,12 @@
}
public class WifiInfo implements android.os.Parcelable {
- method @Nullable public String getAppPackageName();
- method public double getRxSuccessRate();
+ method public double getLostTxPacketsPerSecond();
+ method @Nullable public String getRequestingPackageName();
+ method public double getRetriedTxPacketsPerSecond();
method public int getScore();
- method public double getTxBadRate();
- method public double getTxRetriesRate();
- method public double getTxSuccessRate();
+ method public double getSuccessfulRxPacketsPerSecond();
+ method public double getSuccessfulTxPacketsPerSecond();
method public boolean isEphemeral();
method public boolean isOsuAp();
method public boolean isPasspointAp();
@@ -7604,19 +7604,17 @@
method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD, android.Manifest.permission.NETWORK_STACK}) public void connect(int, @Nullable android.net.wifi.WifiManager.ActionListener);
method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD, android.Manifest.permission.NETWORK_STACK}) public void disable(int, @Nullable android.net.wifi.WifiManager.ActionListener);
method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_STACK}) public void disableEphemeralNetwork(@NonNull String);
- method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void enableVerboseLogging(int);
method @RequiresPermission(android.Manifest.permission.CONNECTIVITY_INTERNAL) public void factoryReset();
method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD, android.Manifest.permission.NETWORK_STACK}) public void forget(int, @Nullable android.net.wifi.WifiManager.ActionListener);
method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD}) public java.util.List<android.util.Pair<android.net.wifi.WifiConfiguration,java.util.Map<java.lang.Integer,java.util.List<android.net.wifi.ScanResult>>>> getAllMatchingWifiConfigs(@NonNull java.util.List<android.net.wifi.ScanResult>);
method @Nullable @RequiresPermission(android.Manifest.permission.CONNECTIVITY_INTERNAL) public String getCountryCode();
- method @Nullable @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public android.net.Network getCurrentNetwork();
+ method @Nullable @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD}) public android.net.Network getCurrentNetwork();
method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public String[] getFactoryMacAddresses();
method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD}) public java.util.Map<android.net.wifi.hotspot2.OsuProvider,java.util.List<android.net.wifi.ScanResult>> getMatchingOsuProviders(@Nullable java.util.List<android.net.wifi.ScanResult>);
method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD}) public java.util.Map<android.net.wifi.hotspot2.OsuProvider,android.net.wifi.hotspot2.PasspointConfiguration> getMatchingPasspointConfigsForOsuProviders(@NonNull java.util.Set<android.net.wifi.hotspot2.OsuProvider>);
method @NonNull @RequiresPermission(allOf={android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.ACCESS_WIFI_STATE}) public java.util.Map<android.net.wifi.WifiNetworkSuggestion,java.util.List<android.net.wifi.ScanResult>> getMatchingScanResults(@NonNull java.util.List<android.net.wifi.WifiNetworkSuggestion>, @Nullable java.util.List<android.net.wifi.ScanResult>);
method @RequiresPermission(allOf={android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.ACCESS_WIFI_STATE, android.Manifest.permission.READ_WIFI_CREDENTIAL}) public java.util.List<android.net.wifi.WifiConfiguration> getPrivilegedConfiguredNetworks();
method @NonNull @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public android.net.wifi.SoftApConfiguration getSoftApConfiguration();
- method public int getVerboseLoggingLevel();
method @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public void getWifiActivityEnergyInfoAsync(@NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.WifiManager.OnWifiActivityEnergyInfoListener);
method @Deprecated @Nullable @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public android.net.wifi.WifiConfiguration getWifiApConfiguration();
method @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public int getWifiApState();
@@ -7626,6 +7624,7 @@
method @Deprecated public boolean isDeviceToDeviceRttSupported();
method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public boolean isDualModeSupported();
method public boolean isPortableHotspotSupported();
+ method public boolean isVerboseLoggingEnabled();
method @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public boolean isWifiApEnabled();
method public boolean isWifiScannerSupported();
method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void registerNetworkRequestMatchCallback(@NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.WifiManager.NetworkRequestMatchCallback);
@@ -7634,7 +7633,7 @@
method @RequiresPermission(android.Manifest.permission.WIFI_UPDATE_USABILITY_STATS_SCORE) public void removeOnWifiUsabilityStatsListener(@NonNull android.net.wifi.WifiManager.OnWifiUsabilityStatsListener);
method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void restoreBackupData(@NonNull byte[]);
method @Nullable @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public android.net.wifi.SoftApConfiguration restoreSoftApBackupData(@NonNull byte[]);
- method @Deprecated @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void restoreSupplicantBackupData(@NonNull byte[], @NonNull byte[]);
+ method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void restoreSupplicantBackupData(@NonNull byte[], @NonNull byte[]);
method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public byte[] retrieveBackupData();
method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public byte[] retrieveSoftApBackupData();
method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD, android.Manifest.permission.NETWORK_STACK}) public void save(@NonNull android.net.wifi.WifiConfiguration, @Nullable android.net.wifi.WifiManager.ActionListener);
@@ -7642,6 +7641,7 @@
method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void setMacRandomizationSettingPasspointEnabled(@NonNull String, boolean);
method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void setMeteredOverridePasspoint(@NonNull String, int);
method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public boolean setSoftApConfiguration(@NonNull android.net.wifi.SoftApConfiguration);
+ method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void setVerboseLoggingEnabled(boolean);
method @Deprecated @RequiresPermission(android.Manifest.permission.CHANGE_WIFI_STATE) public boolean setWifiApConfiguration(android.net.wifi.WifiConfiguration);
method @RequiresPermission(android.Manifest.permission.WIFI_UPDATE_USABILITY_STATS_SCORE) public boolean setWifiConnectedNetworkScorer(@NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.WifiManager.WifiConnectedNetworkScorer);
method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD}) public void startEasyConnectAsConfiguratorInitiator(@NonNull String, int, int, @NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.EasyConnectStatusCallback);
@@ -8606,9 +8606,6 @@
field public static final int STATUS_SUCCESS = 0; // 0x0
}
- @IntDef(prefix={"STATUS_"}, value={android.os.HwParcel.STATUS_SUCCESS}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface HwParcel.Status {
- }
-
public interface IHwBinder {
method public boolean linkToDeath(android.os.IHwBinder.DeathRecipient, long);
method public android.os.IHwInterface queryLocalInterface(String);
@@ -8859,7 +8856,7 @@
ctor public TelephonyServiceManager.ServiceNotFoundException(@NonNull String);
}
- public final class TelephonyServiceManager.ServiceRegisterer {
+ public static final class TelephonyServiceManager.ServiceRegisterer {
method @Nullable public android.os.IBinder get();
method @NonNull public android.os.IBinder getOrThrow() throws android.os.TelephonyServiceManager.ServiceNotFoundException;
method public void register(@NonNull android.os.IBinder);
@@ -9045,23 +9042,15 @@
}
public final class WifiActivityEnergyInfo implements android.os.Parcelable {
- ctor public WifiActivityEnergyInfo(long, int, long, long, long, long);
+ ctor public WifiActivityEnergyInfo(long, int, @IntRange(from=0) long, @IntRange(from=0) long, @IntRange(from=0) long, @IntRange(from=0) long);
method public int describeContents();
- method public long getControllerEnergyUsedMicroJoules();
- method public long getControllerIdleDurationMillis();
- method public long getControllerRxDurationMillis();
- method public long getControllerScanDurationMillis();
- method public long getControllerTxDurationMillis();
+ method @IntRange(from=0) public long getControllerEnergyUsedMicroJoules();
+ method @IntRange(from=0) public long getControllerIdleDurationMillis();
+ method @IntRange(from=0) public long getControllerRxDurationMillis();
+ method @IntRange(from=0) public long getControllerScanDurationMillis();
+ method @IntRange(from=0) public long getControllerTxDurationMillis();
method public int getStackState();
method public long getTimeSinceBootMillis();
- method public boolean isValid();
- method public void setControllerEnergyUsedMicroJoules(long);
- method public void setControllerIdleDurationMillis(long);
- method public void setControllerRxDurationMillis(long);
- method public void setControllerScanDurationMillis(long);
- method public void setControllerTxDurationMillis(long);
- method public void setStackState(int);
- method public void setTimeSinceBootMillis(long);
method public void writeToParcel(@NonNull android.os.Parcel, int);
field @NonNull public static final android.os.Parcelable.Creator<android.os.connectivity.WifiActivityEnergyInfo> CREATOR;
field public static final int STACK_STATE_INVALID = 0; // 0x0
@@ -10057,6 +10046,13 @@
method @NonNull public android.service.autofill.Dataset.Builder setInlinePresentation(@NonNull android.view.autofill.AutofillId, @Nullable android.view.autofill.AutofillValue, @Nullable java.util.regex.Pattern, @NonNull android.service.autofill.InlinePresentation);
}
+ public abstract class InlineSuggestionRenderService extends android.app.Service {
+ ctor public InlineSuggestionRenderService();
+ method @Nullable public final android.os.IBinder onBind(@NonNull android.content.Intent);
+ method @Nullable public android.view.View onRenderSuggestion(@NonNull android.service.autofill.InlinePresentation, int, int);
+ field public static final String SERVICE_INTERFACE = "android.service.autofill.InlineSuggestionRenderService";
+ }
+
}
package android.service.autofill.augmented {
@@ -11047,6 +11043,27 @@
field @NonNull public static final android.os.Parcelable.Creator<android.telephony.CallAttributes> CREATOR;
}
+ public final class CallForwardingInfo implements android.os.Parcelable {
+ ctor public CallForwardingInfo(int, int, @Nullable String, int);
+ method public int describeContents();
+ method @Nullable public String getNumber();
+ method public int getReason();
+ method public int getStatus();
+ method public int getTimeoutSeconds();
+ field @NonNull public static final android.os.Parcelable.Creator<android.telephony.CallForwardingInfo> CREATOR;
+ field public static final int REASON_ALL = 4; // 0x4
+ field public static final int REASON_ALL_CONDITIONAL = 5; // 0x5
+ field public static final int REASON_BUSY = 1; // 0x1
+ field public static final int REASON_NOT_REACHABLE = 3; // 0x3
+ field public static final int REASON_NO_REPLY = 2; // 0x2
+ field public static final int REASON_UNCONDITIONAL = 0; // 0x0
+ field public static final int STATUS_ACTIVE = 1; // 0x1
+ field public static final int STATUS_FDN_CHECK_FAILURE = 2; // 0x2
+ field public static final int STATUS_INACTIVE = 0; // 0x0
+ field public static final int STATUS_NOT_SUPPORTED = 4; // 0x4
+ field public static final int STATUS_UNKNOWN_ERROR = 3; // 0x3
+ }
+
public final class CallQuality implements android.os.Parcelable {
ctor public CallQuality(int, int, int, int, int, int, int, int, int, int, int);
ctor public CallQuality(int, int, int, int, int, int, int, int, int, int, int, boolean, boolean, boolean);
@@ -11157,7 +11174,7 @@
}
public class CellBroadcastIntents {
- method public static void sendOrderedBroadcastForBackgroundReceivers(@NonNull android.content.Context, @Nullable android.os.UserHandle, @NonNull android.content.Intent, @Nullable String, @Nullable String, @Nullable android.content.BroadcastReceiver, @Nullable android.os.Handler, int, @Nullable String, @Nullable android.os.Bundle);
+ method public static void sendSmsCbReceivedBroadcast(@NonNull android.content.Context, @Nullable android.os.UserHandle, @NonNull android.telephony.SmsCbMessage, @Nullable android.content.BroadcastReceiver, @Nullable android.os.Handler, int, int);
}
public abstract class CellBroadcastService extends android.app.Service {
@@ -12177,6 +12194,8 @@
method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public String getAidForAppType(int);
method @Deprecated @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public java.util.List<android.service.carrier.CarrierIdentifier> getAllowedCarriers(int);
method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public long getAllowedNetworkTypes();
+ method @NonNull @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public android.telephony.CallForwardingInfo getCallForwarding(int);
+ method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public int getCallWaitingStatus();
method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public android.telephony.ImsiEncryptionInfo getCarrierInfoForImsiEncryption(int);
method public java.util.List<java.lang.String> getCarrierPackageNamesForIntent(android.content.Intent);
method public java.util.List<java.lang.String> getCarrierPackageNamesForIntentAndPhone(android.content.Intent, int);
@@ -12267,6 +12286,8 @@
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setAllowedNetworkTypes(long);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setAlwaysAllowMmsData(boolean);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setAlwaysReportSignalStrength(boolean);
+ method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setCallForwarding(@NonNull android.telephony.CallForwardingInfo);
+ method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setCallWaitingStatus(boolean);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setCarrierDataEnabled(boolean);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public int setCarrierRestrictionRules(@NonNull android.telephony.CarrierRestrictionRules);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setCdmaRoamingMode(int);
@@ -12317,6 +12338,10 @@
field public static final String ACTION_SIM_APPLICATION_STATE_CHANGED = "android.telephony.action.SIM_APPLICATION_STATE_CHANGED";
field public static final String ACTION_SIM_CARD_STATE_CHANGED = "android.telephony.action.SIM_CARD_STATE_CHANGED";
field public static final String ACTION_SIM_SLOT_STATUS_CHANGED = "android.telephony.action.SIM_SLOT_STATUS_CHANGED";
+ field public static final int CALL_WAITING_STATUS_ACTIVE = 1; // 0x1
+ field public static final int CALL_WAITING_STATUS_INACTIVE = 2; // 0x2
+ field public static final int CALL_WAITING_STATUS_NOT_SUPPORTED = 4; // 0x4
+ field public static final int CALL_WAITING_STATUS_UNKNOWN_ERROR = 3; // 0x3
field public static final int CARD_POWER_DOWN = 0; // 0x0
field public static final int CARD_POWER_UP = 1; // 0x1
field public static final int CARD_POWER_UP_PASS_THROUGH = 2; // 0x2
@@ -13030,9 +13055,9 @@
method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public void getFeatureState(@NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Integer>) throws android.telephony.ims.ImsException;
method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public void getRegistrationState(@NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Integer>);
method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public int getVoWiFiRoamingModeSetting();
- method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isAvailable(@android.telephony.ims.feature.MmTelFeature.MmTelCapabilities.MmTelCapability int, int);
- method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isCapable(@android.telephony.ims.feature.MmTelFeature.MmTelCapabilities.MmTelCapability int, int);
- method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public void isSupported(@android.telephony.ims.feature.MmTelFeature.MmTelCapabilities.MmTelCapability int, int, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Boolean>) throws android.telephony.ims.ImsException;
+ method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isAvailable(int, int);
+ method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isCapable(int, int);
+ method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public void isSupported(int, int, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Boolean>) throws android.telephony.ims.ImsException;
method @Deprecated @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public void registerImsRegistrationCallback(@NonNull java.util.concurrent.Executor, @NonNull android.telephony.ims.ImsMmTelManager.RegistrationCallback) throws android.telephony.ims.ImsException;
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setAdvancedCallingSettingEnabled(boolean);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setRttCapabilitySetting(boolean);
@@ -13296,13 +13321,13 @@
public class ProvisioningManager {
method @NonNull public static android.telephony.ims.ProvisioningManager createForSubscriptionId(int);
method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @WorkerThread public int getProvisioningIntValue(int);
- method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @WorkerThread public boolean getProvisioningStatusForCapability(@android.telephony.ims.feature.MmTelFeature.MmTelCapabilities.MmTelCapability int, int);
+ method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @WorkerThread public boolean getProvisioningStatusForCapability(int, int);
method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @WorkerThread public String getProvisioningStringValue(int);
method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @WorkerThread public boolean getRcsProvisioningStatusForCapability(int);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void notifyRcsAutoConfigurationReceived(@NonNull byte[], boolean);
method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public void registerProvisioningChangedCallback(@NonNull java.util.concurrent.Executor, @NonNull android.telephony.ims.ProvisioningManager.Callback) throws android.telephony.ims.ImsException;
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @WorkerThread public int setProvisioningIntValue(int, int);
- method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @WorkerThread public void setProvisioningStatusForCapability(@android.telephony.ims.feature.MmTelFeature.MmTelCapabilities.MmTelCapability int, int, boolean);
+ method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @WorkerThread public void setProvisioningStatusForCapability(int, int, boolean);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @WorkerThread public int setProvisioningStringValue(int, @NonNull String);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @WorkerThread public void setRcsProvisioningStatusForCapability(int, boolean);
method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public void unregisterProvisioningChangedCallback(@NonNull android.telephony.ims.ProvisioningManager.Callback);
@@ -13476,8 +13501,8 @@
package android.telephony.ims.feature {
public final class CapabilityChangeRequest implements android.os.Parcelable {
- method public void addCapabilitiesToDisableForTech(@android.telephony.ims.feature.MmTelFeature.MmTelCapabilities.MmTelCapability int, int);
- method public void addCapabilitiesToEnableForTech(@android.telephony.ims.feature.MmTelFeature.MmTelCapabilities.MmTelCapability int, int);
+ method public void addCapabilitiesToDisableForTech(int, int);
+ method public void addCapabilitiesToEnableForTech(int, int);
method public int describeContents();
method public java.util.List<android.telephony.ims.feature.CapabilityChangeRequest.CapabilityPair> getCapabilitiesToDisable();
method public java.util.List<android.telephony.ims.feature.CapabilityChangeRequest.CapabilityPair> getCapabilitiesToEnable();
@@ -13486,8 +13511,8 @@
}
public static class CapabilityChangeRequest.CapabilityPair {
- ctor public CapabilityChangeRequest.CapabilityPair(@android.telephony.ims.feature.MmTelFeature.MmTelCapabilities.MmTelCapability int, int);
- method @android.telephony.ims.feature.MmTelFeature.MmTelCapabilities.MmTelCapability public int getCapability();
+ ctor public CapabilityChangeRequest.CapabilityPair(int, int);
+ method public int getCapability();
method public int getRadioTech();
}
@@ -13532,10 +13557,10 @@
method public final void notifyVoiceMessageCountUpdate(int);
method public void onFeatureReady();
method public void onFeatureRemoved();
- method public boolean queryCapabilityConfiguration(@android.telephony.ims.feature.MmTelFeature.MmTelCapabilities.MmTelCapability int, int);
+ method public boolean queryCapabilityConfiguration(int, int);
method @NonNull public final android.telephony.ims.feature.MmTelFeature.MmTelCapabilities queryCapabilityStatus();
method public void setUiTtyMode(int, @Nullable android.os.Message);
- method @android.telephony.ims.feature.MmTelFeature.ProcessCallResult public int shouldProcessCall(@NonNull String[]);
+ method public int shouldProcessCall(@NonNull String[]);
field public static final String EXTRA_IS_UNKNOWN_CALL = "android.telephony.ims.feature.extra.IS_UNKNOWN_CALL";
field public static final String EXTRA_IS_USSD = "android.telephony.ims.feature.extra.IS_USSD";
field public static final int PROCESS_CALL_CSFB = 1; // 0x1
@@ -13545,16 +13570,10 @@
public static class MmTelFeature.MmTelCapabilities extends android.telephony.ims.feature.ImsFeature.Capabilities {
ctor public MmTelFeature.MmTelCapabilities();
ctor @Deprecated public MmTelFeature.MmTelCapabilities(android.telephony.ims.feature.ImsFeature.Capabilities);
- ctor public MmTelFeature.MmTelCapabilities(@android.telephony.ims.feature.MmTelFeature.MmTelCapabilities.MmTelCapability int);
- method public final void addCapabilities(@android.telephony.ims.feature.MmTelFeature.MmTelCapabilities.MmTelCapability int);
- method public final boolean isCapable(@android.telephony.ims.feature.MmTelFeature.MmTelCapabilities.MmTelCapability int);
- method public final void removeCapabilities(@android.telephony.ims.feature.MmTelFeature.MmTelCapabilities.MmTelCapability int);
- }
-
- @IntDef(flag=true, value={android.telephony.ims.feature.MmTelFeature.MmTelCapabilities.CAPABILITY_TYPE_VOICE, android.telephony.ims.feature.MmTelFeature.MmTelCapabilities.CAPABILITY_TYPE_VIDEO, android.telephony.ims.feature.MmTelFeature.MmTelCapabilities.CAPABILITY_TYPE_UT, android.telephony.ims.feature.MmTelFeature.MmTelCapabilities.CAPABILITY_TYPE_SMS}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface MmTelFeature.MmTelCapabilities.MmTelCapability {
- }
-
- @IntDef(flag=true, value={android.telephony.ims.feature.MmTelFeature.PROCESS_CALL_IMS, android.telephony.ims.feature.MmTelFeature.PROCESS_CALL_CSFB}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface MmTelFeature.ProcessCallResult {
+ ctor public MmTelFeature.MmTelCapabilities(int);
+ method public final void addCapabilities(int);
+ method public final boolean isCapable(int);
+ method public final void removeCapabilities(int);
}
public class RcsFeature extends android.telephony.ims.feature.ImsFeature {
diff --git a/api/test-current.txt b/api/test-current.txt
index 37b117b..fec5f3d 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -1091,7 +1091,7 @@
method @Nullable public android.hardware.display.BrightnessCorrection getCorrectionByPackageName(@NonNull String);
method public android.util.Pair<float[],float[]> getCurve();
method public float getShortTermModelLowerLuxMultiplier();
- method public long getShortTermModelTimeout();
+ method public long getShortTermModelTimeoutMillis();
method public float getShortTermModelUpperLuxMultiplier();
method public boolean shouldCollectColorSamples();
method public void writeToParcel(android.os.Parcel, int);
@@ -1108,7 +1108,7 @@
method public int getMaxCorrectionsByPackageName();
method @NonNull public android.hardware.display.BrightnessConfiguration.Builder setDescription(@Nullable String);
method @NonNull public android.hardware.display.BrightnessConfiguration.Builder setShortTermModelLowerLuxMultiplier(@FloatRange(from=0.0f) float);
- method @NonNull public android.hardware.display.BrightnessConfiguration.Builder setShortTermModelTimeout(long);
+ method @NonNull public android.hardware.display.BrightnessConfiguration.Builder setShortTermModelTimeoutMillis(long);
method @NonNull public android.hardware.display.BrightnessConfiguration.Builder setShortTermModelUpperLuxMultiplier(@FloatRange(from=0.0f) float);
method @NonNull public android.hardware.display.BrightnessConfiguration.Builder setShouldCollectColorSamples(boolean);
}
@@ -2218,9 +2218,6 @@
field public static final int STATUS_SUCCESS = 0; // 0x0
}
- @IntDef(prefix={"STATUS_"}, value={android.os.HwParcel.STATUS_SUCCESS}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface HwParcel.Status {
- }
-
public interface IHwBinder {
method public boolean linkToDeath(android.os.IHwBinder.DeathRecipient, long);
method public android.os.IHwInterface queryLocalInterface(String);
@@ -2993,6 +2990,13 @@
method public void apply(@NonNull android.service.autofill.ValueFinder, @NonNull android.widget.RemoteViews, int) throws java.lang.Exception;
}
+ public abstract class InlineSuggestionRenderService extends android.app.Service {
+ ctor public InlineSuggestionRenderService();
+ method @Nullable public final android.os.IBinder onBind(@NonNull android.content.Intent);
+ method @Nullable public android.view.View onRenderSuggestion(@NonNull android.service.autofill.InlinePresentation, int, int);
+ field public static final String SERVICE_INTERFACE = "android.service.autofill.InlineSuggestionRenderService";
+ }
+
public abstract class InternalOnClickAction implements android.service.autofill.OnClickAction android.os.Parcelable {
ctor public InternalOnClickAction();
method public abstract void onClick(@NonNull android.view.ViewGroup);
@@ -3816,9 +3820,9 @@
method @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") public void getFeatureState(@NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Integer>) throws android.telephony.ims.ImsException;
method @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") public void getRegistrationState(@NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Integer>);
method @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") public int getVoWiFiRoamingModeSetting();
- method @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") public boolean isAvailable(@android.telephony.ims.feature.MmTelFeature.MmTelCapabilities.MmTelCapability int, int);
- method @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") public boolean isCapable(@android.telephony.ims.feature.MmTelFeature.MmTelCapabilities.MmTelCapability int, int);
- method @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") public void isSupported(@android.telephony.ims.feature.MmTelFeature.MmTelCapabilities.MmTelCapability int, int, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Boolean>) throws android.telephony.ims.ImsException;
+ method @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") public boolean isAvailable(int, int);
+ method @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") public boolean isCapable(int, int);
+ method @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") public void isSupported(int, int, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Boolean>) throws android.telephony.ims.ImsException;
method @Deprecated @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") public void registerImsRegistrationCallback(@NonNull java.util.concurrent.Executor, @NonNull android.telephony.ims.ImsMmTelManager.RegistrationCallback) throws android.telephony.ims.ImsException;
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setAdvancedCallingSettingEnabled(boolean);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setRttCapabilitySetting(boolean);
@@ -4078,13 +4082,13 @@
public class ProvisioningManager {
method @NonNull public static android.telephony.ims.ProvisioningManager createForSubscriptionId(int);
method @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") @WorkerThread public int getProvisioningIntValue(int);
- method @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") @WorkerThread public boolean getProvisioningStatusForCapability(@android.telephony.ims.feature.MmTelFeature.MmTelCapabilities.MmTelCapability int, int);
+ method @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") @WorkerThread public boolean getProvisioningStatusForCapability(int, int);
method @Nullable @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") @WorkerThread public String getProvisioningStringValue(int);
method @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") @WorkerThread public boolean getRcsProvisioningStatusForCapability(int);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void notifyRcsAutoConfigurationReceived(@NonNull byte[], boolean);
method @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") public void registerProvisioningChangedCallback(@NonNull java.util.concurrent.Executor, @NonNull android.telephony.ims.ProvisioningManager.Callback) throws android.telephony.ims.ImsException;
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @WorkerThread public int setProvisioningIntValue(int, int);
- method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @WorkerThread public void setProvisioningStatusForCapability(@android.telephony.ims.feature.MmTelFeature.MmTelCapabilities.MmTelCapability int, int, boolean);
+ method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @WorkerThread public void setProvisioningStatusForCapability(int, int, boolean);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @WorkerThread public int setProvisioningStringValue(int, @NonNull String);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @WorkerThread public void setRcsProvisioningStatusForCapability(int, boolean);
method @RequiresPermission("android.permission.READ_PRIVILEGED_PHONE_STATE") public void unregisterProvisioningChangedCallback(@NonNull android.telephony.ims.ProvisioningManager.Callback);
@@ -4258,8 +4262,8 @@
package android.telephony.ims.feature {
public final class CapabilityChangeRequest implements android.os.Parcelable {
- method public void addCapabilitiesToDisableForTech(@android.telephony.ims.feature.MmTelFeature.MmTelCapabilities.MmTelCapability int, int);
- method public void addCapabilitiesToEnableForTech(@android.telephony.ims.feature.MmTelFeature.MmTelCapabilities.MmTelCapability int, int);
+ method public void addCapabilitiesToDisableForTech(int, int);
+ method public void addCapabilitiesToEnableForTech(int, int);
method public int describeContents();
method public java.util.List<android.telephony.ims.feature.CapabilityChangeRequest.CapabilityPair> getCapabilitiesToDisable();
method public java.util.List<android.telephony.ims.feature.CapabilityChangeRequest.CapabilityPair> getCapabilitiesToEnable();
@@ -4268,8 +4272,8 @@
}
public static class CapabilityChangeRequest.CapabilityPair {
- ctor public CapabilityChangeRequest.CapabilityPair(@android.telephony.ims.feature.MmTelFeature.MmTelCapabilities.MmTelCapability int, int);
- method @android.telephony.ims.feature.MmTelFeature.MmTelCapabilities.MmTelCapability public int getCapability();
+ ctor public CapabilityChangeRequest.CapabilityPair(int, int);
+ method public int getCapability();
method public int getRadioTech();
}
@@ -4314,10 +4318,10 @@
method public final void notifyVoiceMessageCountUpdate(int);
method public void onFeatureReady();
method public void onFeatureRemoved();
- method public boolean queryCapabilityConfiguration(@android.telephony.ims.feature.MmTelFeature.MmTelCapabilities.MmTelCapability int, int);
+ method public boolean queryCapabilityConfiguration(int, int);
method @NonNull public final android.telephony.ims.feature.MmTelFeature.MmTelCapabilities queryCapabilityStatus();
method public void setUiTtyMode(int, @Nullable android.os.Message);
- method @android.telephony.ims.feature.MmTelFeature.ProcessCallResult public int shouldProcessCall(@NonNull String[]);
+ method public int shouldProcessCall(@NonNull String[]);
field public static final String EXTRA_IS_UNKNOWN_CALL = "android.telephony.ims.feature.extra.IS_UNKNOWN_CALL";
field public static final String EXTRA_IS_USSD = "android.telephony.ims.feature.extra.IS_USSD";
field public static final int PROCESS_CALL_CSFB = 1; // 0x1
@@ -4327,16 +4331,10 @@
public static class MmTelFeature.MmTelCapabilities extends android.telephony.ims.feature.ImsFeature.Capabilities {
ctor public MmTelFeature.MmTelCapabilities();
ctor @Deprecated public MmTelFeature.MmTelCapabilities(android.telephony.ims.feature.ImsFeature.Capabilities);
- ctor public MmTelFeature.MmTelCapabilities(@android.telephony.ims.feature.MmTelFeature.MmTelCapabilities.MmTelCapability int);
- method public final void addCapabilities(@android.telephony.ims.feature.MmTelFeature.MmTelCapabilities.MmTelCapability int);
- method public final boolean isCapable(@android.telephony.ims.feature.MmTelFeature.MmTelCapabilities.MmTelCapability int);
- method public final void removeCapabilities(@android.telephony.ims.feature.MmTelFeature.MmTelCapabilities.MmTelCapability int);
- }
-
- @IntDef(flag=true, value={android.telephony.ims.feature.MmTelFeature.MmTelCapabilities.CAPABILITY_TYPE_VOICE, android.telephony.ims.feature.MmTelFeature.MmTelCapabilities.CAPABILITY_TYPE_VIDEO, android.telephony.ims.feature.MmTelFeature.MmTelCapabilities.CAPABILITY_TYPE_UT, android.telephony.ims.feature.MmTelFeature.MmTelCapabilities.CAPABILITY_TYPE_SMS}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface MmTelFeature.MmTelCapabilities.MmTelCapability {
- }
-
- @IntDef(flag=true, value={android.telephony.ims.feature.MmTelFeature.PROCESS_CALL_IMS, android.telephony.ims.feature.MmTelFeature.PROCESS_CALL_CSFB}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface MmTelFeature.ProcessCallResult {
+ ctor public MmTelFeature.MmTelCapabilities(int);
+ method public final void addCapabilities(int);
+ method public final boolean isCapable(int);
+ method public final void removeCapabilities(int);
}
public class RcsFeature extends android.telephony.ims.feature.ImsFeature {
diff --git a/api/test-lint-baseline.txt b/api/test-lint-baseline.txt
index a9c1836..94db346 100644
--- a/api/test-lint-baseline.txt
+++ b/api/test-lint-baseline.txt
@@ -2451,14 +2451,6 @@
-PublicTypedef: android.os.HwParcel.Status:
-
-PublicTypedef: android.telephony.ims.feature.MmTelFeature.MmTelCapabilities.MmTelCapability:
-
-PublicTypedef: android.telephony.ims.feature.MmTelFeature.ProcessCallResult:
-
-
-
RawAidl: android.telephony.mbms.vendor.MbmsDownloadServiceBase:
RawAidl: android.telephony.mbms.vendor.MbmsStreamingServiceBase:
diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto
index 177b699..5ac00d0 100644
--- a/cmds/statsd/src/atoms.proto
+++ b/cmds/statsd/src/atoms.proto
@@ -137,7 +137,7 @@
DaveyOccurred davey_occurred = 58 [(allow_from_any_uid) = true];
OverlayStateChanged overlay_state_changed = 59;
ForegroundServiceStateChanged foreground_service_state_changed = 60;
- CallStateChanged call_state_changed = 61;
+ CallStateChanged call_state_changed = 61 [(module) = "telecom"];
KeyguardStateChanged keyguard_state_changed = 62 [(module) = "sysui"];
KeyguardBouncerStateChanged keyguard_bouncer_state_changed = 63 [(module) = "sysui"];
KeyguardBouncerPasswordEntered keyguard_bouncer_password_entered = 64 [(module) = "sysui"];
@@ -255,7 +255,8 @@
PermissionGrantRequestResultReported permission_grant_request_result_reported =
170 [(module) = "permissioncontroller"];
BluetoothSocketConnectionStateChanged bluetooth_socket_connection_state_changed = 171;
- DeviceIdentifierAccessDenied device_identifier_access_denied = 172;
+ DeviceIdentifierAccessDenied device_identifier_access_denied =
+ 172 [(module) = "telephony_common"];
BubbleDeveloperErrorReported bubble_developer_error_reported = 173;
AssistGestureStageReported assist_gesture_stage_reported = 174;
AssistGestureFeedbackReported assist_gesture_feedback_reported = 175;
@@ -288,8 +289,8 @@
MediametricsNuPlayerReported mediametrics_nuplayer_reported = 199;
MediametricsRecorderReported mediametrics_recorder_reported = 200;
MediametricsDrmManagerReported mediametrics_drmmanager_reported = 201;
- CarPowerStateChanged car_power_state_changed = 203;
- GarageModeInfo garage_mode_info = 204;
+ CarPowerStateChanged car_power_state_changed = 203 [(module) = "car"];
+ GarageModeInfo garage_mode_info = 204 [(module) = "car"];
TestAtomReported test_atom_reported = 205 [(module) = "cts"];
ContentCaptureCallerMismatchReported content_capture_caller_mismatch_reported = 206;
ContentCaptureServiceEvents content_capture_service_events = 207;
@@ -324,7 +325,8 @@
AppCompatibilityChangeReported app_compatibility_change_reported =
228 [(allow_from_any_uid) = true];
PerfettoUploaded perfetto_uploaded = 229 [(module) = "perfetto"];
- VmsClientConnectionStateChanged vms_client_connection_state_changed = 230;
+ VmsClientConnectionStateChanged vms_client_connection_state_changed =
+ 230 [(module) = "car"];
MediaProviderScanEvent media_provider_scan_event = 233 [(module) = "mediaprovider"];
MediaProviderDeletionEvent media_provider_deletion_event = 234 [(module) = "mediaprovider"];
MediaProviderPermissionEvent media_provider_permission_event =
@@ -416,7 +418,7 @@
SurfaceflingerStatsGlobalInfo surfaceflinger_stats_global_info = 10062;
SurfaceflingerStatsLayerInfo surfaceflinger_stats_layer_info = 10063;
ProcessMemorySnapshot process_memory_snapshot = 10064;
- VmsClientStats vms_client_stats = 10065;
+ VmsClientStats vms_client_stats = 10065 [(module) = "car"];
NotificationRemoteViews notification_remote_views = 10066;
DangerousPermissionStateSampled dangerous_permission_state_sampled = 10067;
GraphicsStats graphics_stats = 10068;
diff --git a/cmds/statsd/src/external/StatsPullerManager.cpp b/cmds/statsd/src/external/StatsPullerManager.cpp
index 7708e30..85d1e38 100644
--- a/cmds/statsd/src/external/StatsPullerManager.cpp
+++ b/cmds/statsd/src/external/StatsPullerManager.cpp
@@ -119,9 +119,9 @@
}
bool StatsPullerManager::PullerForMatcherExists(int tagId) const {
- // Vendor pulled atoms might be registered after we parse the config.
- return isVendorPulledAtom(tagId) ||
- kAllPullAtomInfo.find({.atomTag = tagId}) != kAllPullAtomInfo.end();
+ // Pulled atoms might be registered after we parse the config, so just make sure the id is in
+ // an appropriate range.
+ return isVendorPulledAtom(tagId) || isPulledAtom(tagId);
}
void StatsPullerManager::updateAlarmLocked() {
diff --git a/cmds/statsd/src/guardrail/StatsdStats.h b/cmds/statsd/src/guardrail/StatsdStats.h
index 3282785..df810aa 100644
--- a/cmds/statsd/src/guardrail/StatsdStats.h
+++ b/cmds/statsd/src/guardrail/StatsdStats.h
@@ -164,6 +164,12 @@
// Maximum number of pushed atoms statsd stats will track above kMaxPushedAtomId.
static const int kMaxNonPlatformPushedAtoms = 100;
+ // Atom id that is the start of the pulled atoms.
+ static const int kPullAtomStartTag = 10000;
+
+ // Atom id that is the start of vendor atoms.
+ static const int kVendorAtomStartTag = 100000;
+
// Vendor pulled atom start id.
static const int32_t kVendorPulledAtomStartTag = 150000;
diff --git a/cmds/statsd/src/metrics/metrics_manager_util.cpp b/cmds/statsd/src/metrics/metrics_manager_util.cpp
index 73c1212..17f62b0 100644
--- a/cmds/statsd/src/metrics/metrics_manager_util.cpp
+++ b/cmds/statsd/src/metrics/metrics_manager_util.cpp
@@ -426,7 +426,6 @@
config.event_metric_size() + config.gauge_metric_size() +
config.value_metric_size();
allMetricProducers.reserve(allMetricsCount);
- StatsPullerManager statsPullerManager;
// Construct map from metric id to metric activation index. The map will be used to determine
// the metric activation corresponding to a metric.
@@ -661,7 +660,7 @@
return false;
}
int atomTagId = *(atomMatcher->getAtomIds().begin());
- int pullTagId = statsPullerManager.PullerForMatcherExists(atomTagId) ? atomTagId : -1;
+ int pullTagId = pullerManager->PullerForMatcherExists(atomTagId) ? atomTagId : -1;
int conditionIndex = -1;
if (metric.has_condition()) {
@@ -753,7 +752,7 @@
return false;
}
int atomTagId = *(atomMatcher->getAtomIds().begin());
- int pullTagId = statsPullerManager.PullerForMatcherExists(atomTagId) ? atomTagId : -1;
+ int pullTagId = pullerManager->PullerForMatcherExists(atomTagId) ? atomTagId : -1;
int triggerTrackerIndex;
int triggerAtomId = -1;
diff --git a/cmds/statsd/src/stats_log_util.h b/cmds/statsd/src/stats_log_util.h
index f3e9433..5fdf6e2 100644
--- a/cmds/statsd/src/stats_log_util.h
+++ b/cmds/statsd/src/stats_log_util.h
@@ -99,6 +99,10 @@
return atomId >= StatsdStats::kVendorPulledAtomStartTag && atomId < StatsdStats::kMaxAtomTag;
}
+inline bool isPulledAtom(int atomId) {
+ return atomId >= StatsdStats::kPullAtomStartTag && atomId < StatsdStats::kVendorAtomStartTag;
+}
+
} // namespace statsd
} // namespace os
} // namespace android
diff --git a/cmds/telecom/src/com/android/commands/telecom/Telecom.java b/cmds/telecom/src/com/android/commands/telecom/Telecom.java
index 1987440..9707405 100644
--- a/cmds/telecom/src/com/android/commands/telecom/Telecom.java
+++ b/cmds/telecom/src/com/android/commands/telecom/Telecom.java
@@ -366,12 +366,8 @@
}
private void runGetMaxPhones() throws RemoteException {
- // This assumes the max number of SIMs is 2, which it currently is
- if (TelephonyManager.MULTISIM_ALLOWED == mTelephonyManager.isMultiSimSupported()) {
- System.out.println("2");
- } else {
- System.out.println("1");
- }
+ // how many logical modems can be potentially active simultaneously
+ System.out.println(mTelephonyManager.getSupportedModemCount());
}
private void runSetEmergencyPhoneAccountPackageFilter() throws RemoteException {
diff --git a/core/java/android/annotation/SystemApi.java b/core/java/android/annotation/SystemApi.java
index 2cb93e4..ecbfed9 100644
--- a/core/java/android/annotation/SystemApi.java
+++ b/core/java/android/annotation/SystemApi.java
@@ -23,6 +23,7 @@
import static java.lang.annotation.ElementType.PACKAGE;
import static java.lang.annotation.ElementType.TYPE;
+import java.lang.annotation.Repeatable;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@@ -40,39 +41,48 @@
*/
@Target({TYPE, FIELD, METHOD, CONSTRUCTOR, ANNOTATION_TYPE, PACKAGE})
@Retention(RetentionPolicy.RUNTIME)
+@Repeatable(SystemApi.Container.class) // TODO(b/146727827): make this non-repeatable
public @interface SystemApi {
enum Client {
/**
* Specifies that the intended clients of a SystemApi are privileged apps.
- * This is the default value for {@link #client}. This implies
- * MODULE_APPS and MODULE_LIBRARIES as well, which means that APIs will also
- * be available to module apps and jars.
+ * This is the default value for {@link #client}.
+ * TODO Update the javadoc according to the final spec
*/
PRIVILEGED_APPS,
/**
- * Specifies that the intended clients of a SystemApi are modules implemented
- * as apps, like the NetworkStack app. This implies MODULE_LIBRARIES as well,
- * which means that APIs will also be available to module jars.
+ * DO NOT USE. Use PRIVILEGED_APPS instead.
+ * (This would provide no further protection over PRIVILEGED_APPS; do not rely on it)
+ * @deprecated Use #PRIVILEGED_APPS instead
*/
+ @Deprecated
MODULE_APPS,
/**
* Specifies that the intended clients of a SystemApi are modules implemented
* as libraries, like the conscrypt.jar in the conscrypt APEX.
+ * TODO Update the javadoc according to the final spec
*/
- MODULE_LIBRARIES
+ MODULE_LIBRARIES,
+
+ /**
+ * Specifies that the system API is available only in the system server process.
+ * Use this to expose APIs from code loaded by the system server process <em>but</em>
+ * not in <pre>BOOTCLASSPATH</pre>.
+ * TODO(b/148177503) Update "services-stubs" and actually use it.
+ */
+ SYSTEM_SERVER
}
+ /** @deprecated do not use */
+ @Deprecated
enum Process {
- /**
- * Specifies that the SystemAPI is available in every Java processes.
- * This is the default value for {@link #process}.
- */
+ /** @deprecated do not use */
ALL,
/**
- * Specifies that the SystemAPI is available only in the system server process.
+ * @deprecated use Client#SYSTEM_SERVER instead
*/
SYSTEM_SERVER
}
@@ -83,7 +93,18 @@
Client client() default android.annotation.SystemApi.Client.PRIVILEGED_APPS;
/**
- * The process(es) that this SystemAPI is available
+ * @deprecated use Client#SYSTEM_SERVER instead for system_server APIs
*/
+ @Deprecated
Process process() default android.annotation.SystemApi.Process.ALL;
+
+
+ /**
+ * Container for {@link SystemApi} that allows it to be applied repeatedly to types.
+ */
+ @Retention(RetentionPolicy.RUNTIME)
+ @Target(TYPE)
+ @interface Container {
+ SystemApi[] value();
+ }
}
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index 1af275f..b346e8f 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -17,6 +17,8 @@
package android.app;
import static android.annotation.Dimension.DP;
+import static android.graphics.drawable.Icon.TYPE_URI;
+import static android.graphics.drawable.Icon.TYPE_URI_ADAPTIVE_BITMAP;
import static com.android.internal.util.ContrastColorUtil.satisfiesTextContrast;
@@ -2504,6 +2506,14 @@
}
}
}
+
+ if (mBubbleMetadata != null && mBubbleMetadata.getBubbleIcon() != null) {
+ final Icon icon = mBubbleMetadata.getBubbleIcon();
+ final int iconType = icon.getType();
+ if (iconType == TYPE_URI_ADAPTIVE_BITMAP || iconType == TYPE_URI) {
+ visitor.accept(icon.getUri());
+ }
+ }
}
/**
@@ -8900,6 +8910,12 @@
if (icon == null) {
throw new IllegalArgumentException("Bubbles require non-null icon");
}
+ if (icon.getType() != TYPE_URI_ADAPTIVE_BITMAP
+ && icon.getType() != TYPE_URI) {
+ Log.w(TAG, "Bubbles work best with icons of TYPE_URI or "
+ + "TYPE_URI_ADAPTIVE_BITMAP. "
+ + "In the future, using an icon of this type will be required.");
+ }
mShortcutId = null;
mPendingIntent = intent;
mIcon = icon;
diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java
index 38ffb51..b64c001 100644
--- a/core/java/android/content/pm/PackageManager.java
+++ b/core/java/android/content/pm/PackageManager.java
@@ -1960,6 +1960,15 @@
/**
* Feature for {@link #getSystemAvailableFeatures} and
+ * {@link #hasSystemFeature}: The device's main front and back cameras can stream
+ * concurrently as described in {@link
+ * android.hardware.camera2.CameraManager#getConcurrentStreamingCameraIds()}
+ */
+ @SdkConstant(SdkConstantType.FEATURE)
+ public static final String FEATURE_CAMERA_CONCURRENT = "android.hardware.camera.concurrent";
+
+ /**
+ * Feature for {@link #getSystemAvailableFeatures} and
* {@link #hasSystemFeature}: The device is capable of communicating with
* consumer IR devices.
*/
diff --git a/core/java/android/content/pm/UserInfo.java b/core/java/android/content/pm/UserInfo.java
index 008cfa5..f150664 100644
--- a/core/java/android/content/pm/UserInfo.java
+++ b/core/java/android/content/pm/UserInfo.java
@@ -362,6 +362,10 @@
// Don't support switching to an ephemeral user with removal in progress.
return false;
}
+ if (preCreated) {
+ // Don't support switching to pre-created users until they become "real" users.
+ return false;
+ }
return !isProfile();
}
diff --git a/core/java/android/hardware/camera2/CameraCharacteristics.java b/core/java/android/hardware/camera2/CameraCharacteristics.java
index dfc4f0f..b3a1ee2 100644
--- a/core/java/android/hardware/camera2/CameraCharacteristics.java
+++ b/core/java/android/hardware/camera2/CameraCharacteristics.java
@@ -2875,7 +2875,28 @@
@NonNull
public static final Key<int[]> SCALER_AVAILABLE_ROTATE_AND_CROP_MODES =
new Key<int[]>("android.scaler.availableRotateAndCropModes", int[].class);
-
+ /**
+ * <p>An array of mandatory concurrent stream combinations.
+ * This is an app-readable conversion of the concurrent mandatory stream combination
+ * {@link android.hardware.camera2.CameraDevice#createCaptureSession tables}.</p>
+ * <p>The array of
+ * {@link android.hardware.camera2.params.MandatoryStreamCombination combinations} is
+ * generated according to the documented
+ * {@link android.hardware.camera2.CameraDevice#createCaptureSession guideline} for each device
+ * which has its Id present in the set returned by
+ * {@link android.hardware.camera2.CameraManager#getConcurrentStreamingCameraIds}.
+ * Clients can use the array as a quick reference to find an appropriate camera stream
+ * combination.
+ * The mandatory stream combination array will be {@code null} in case the device is not a part
+ * of at least one set of combinations returned by
+ * {@link android.hardware.camera2.CameraManager#getConcurrentStreamingCameraIds}.</p>
+ * <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
+ */
+ @PublicKey
+ @NonNull
+ @SyntheticKey
+ public static final Key<android.hardware.camera2.params.MandatoryStreamCombination[]> SCALER_MANDATORY_CONCURRENT_STREAM_COMBINATIONS =
+ new Key<android.hardware.camera2.params.MandatoryStreamCombination[]>("android.scaler.mandatoryConcurrentStreamCombinations", android.hardware.camera2.params.MandatoryStreamCombination[].class);
/**
* <p>The area of the image sensor which corresponds to active pixels after any geometric
* distortion correction has been applied.</p>
diff --git a/core/java/android/hardware/camera2/CameraDevice.java b/core/java/android/hardware/camera2/CameraDevice.java
index cc06681..24d9311 100644
--- a/core/java/android/hardware/camera2/CameraDevice.java
+++ b/core/java/android/hardware/camera2/CameraDevice.java
@@ -680,6 +680,25 @@
* </table><br>
* </p>
*
+ *<p>Devices capable of streaming concurrently with other devices as described by
+ * {@link android.hardware.camera2.CameraManager#getConcurrentStreamingCameraIds} have the
+ * following guaranteed streams (when streaming concurrently with other devices)</p>
+ *
+ * <table>
+ * <tr><th colspan="5">Concurrent stream guaranteed configurations</th></tr>
+ * <tr><th colspan="2" id="rb">Target 1</th><th colspan="2" id="rb">Target 2</th><th rowspan="2">Sample use case(s)</th> </tr>
+ * <tr><th>Type</th><th id="rb">Max size</th><th>Type</th><th id="rb">Max size</th> </tr>
+ * <tr> <td>{@code YUV}</td><td id="rb">{@code MAXIMUM}</td> <td colspan="2" id="rb"></td> <td>In-app video / image processing.</td> </tr>
+ * <tr> <td>{@code PRIV}</td><td id="rb">{@code MAXIMUM}</td> <td colspan="2" id="rb"></td> <td>In-app viewfinder analysis.</td> </tr>
+ * <tr> <td>{@code YUV}</td><td id="rb">{@code MAXIMUM}</td> <td>{@code YUV }</td><td id="rb">{@code MAXIMUM}</td> <td>In-app video / processing with preview.</td> </tr>
+ * <tr> <td>{@code YUV}</td><td id="rb">{@code MAXIMUM}</td> <td>{@code PRIV }</td><td id="rb">{@code MAXIMUM}</td> <td>In-app video / processing with preview.</td> </tr>
+ * <tr> <td>{@code PRIV}</td><td id="rb">{@code MAXIMUM}</td> <td>{@code PRIV }</td><td id="rb">{@code MAXIMUM}</td> <td>Standard Recording.</td> </tr>
+ * </table><br>
+ * </p>
+ *
+ * <p> For guaranteed concurrent stream configurations, MAXIMUM refers to the camera device's
+ * resolution for that format from {@link StreamConfigurationMap#getOutputSizes} or
+ * 720p(1280X720) whichever is lower. </p>
* <p>MONOCHROME-capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES}
* includes {@link CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_MONOCHROME MONOCHROME}) devices
* supporting {@link android.graphics.ImageFormat#Y8 Y8} support substituting {@code YUV}
diff --git a/core/java/android/hardware/camera2/CameraManager.java b/core/java/android/hardware/camera2/CameraManager.java
index 55025f0..9ee56a9 100644
--- a/core/java/android/hardware/camera2/CameraManager.java
+++ b/core/java/android/hardware/camera2/CameraManager.java
@@ -31,6 +31,9 @@
import android.hardware.camera2.impl.CameraMetadataNative;
import android.hardware.camera2.legacy.CameraDeviceUserShim;
import android.hardware.camera2.legacy.LegacyMetadataMapper;
+import android.hardware.camera2.params.SessionConfiguration;
+import android.hardware.camera2.utils.CameraIdAndSessionConfiguration;
+import android.hardware.camera2.utils.ConcurrentCameraIdCombination;
import android.os.Binder;
import android.os.DeadObjectException;
import android.os.Handler;
@@ -40,6 +43,7 @@
import android.os.ServiceSpecificException;
import android.os.SystemProperties;
import android.util.ArrayMap;
+import android.util.ArraySet;
import android.util.Log;
import android.util.Size;
import android.view.Display;
@@ -48,6 +52,7 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
+import java.util.Map;
import java.util.Set;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
@@ -126,6 +131,66 @@
}
/**
+ * Return the list of combinations of currently connected camera devices identifiers, which
+ * support configuring camera device sessions concurrently.
+ *
+ * <p>The set of combinations may include camera devices that may be in use by other camera API
+ * clients.</p>
+ *
+ * <p>The set of combinations doesn't contain physical cameras that can only be used as
+ * part of a logical multi-camera device.</p>
+ *
+ * @return The set of combinations of currently connected camera devices, that may have
+ * sessions configured concurrently. The set of combinations will be empty if no such
+ * combinations are supported by the camera subsystem.
+ *
+ * @throws CameraAccessException if the camera device has been disconnected.
+ */
+ @NonNull
+ public Set<Set<String>> getConcurrentStreamingCameraIds() throws CameraAccessException {
+ return CameraManagerGlobal.get().getConcurrentStreamingCameraIds();
+ }
+
+ /**
+ * Checks whether the provided set of camera devices and their corresponding
+ * {@link SessionConfiguration} can be configured concurrently.
+ *
+ * <p>This method performs a runtime check of the given {@link SessionConfiguration} and camera
+ * id combinations. The result confirms whether or not the passed session configurations can be
+ * successfully used to create camera capture sessions concurrently, on the given camera
+ * devices using {@link CameraDevice#createCaptureSession(SessionConfiguration)}.
+ * </p>
+ *
+ * <p>The method can be called at any point before, during and after active capture sessions.
+ * It will not impact normal camera behavior in any way and must complete significantly
+ * faster than creating a regular or constrained capture session.</p>
+ *
+ * <p>Although this method is faster than creating a new capture session, it is not intended
+ * to be used for exploring the entire space of supported concurrent stream combinations. The
+ * available mandatory concurrent stream combinations may be obtained by querying
+ * {@link #getCameraCharacteristics} for the key
+ * SCALER_MANDATORY_CONCURRENT_STREAM_COMBINATIONS. </p>
+ *
+ * <p>Note that session parameters will be ignored and calls to
+ * {@link SessionConfiguration#setSessionParameters} are not required.</p>
+ *
+ * @return {@code true} if the given combination of session configurations and corresponding
+ * camera ids are concurrently supported by the camera sub-system,
+ * {@code false} otherwise.
+ *
+ * @throws IllegalArgumentException if the set of camera devices provided is not a subset of
+ * those returned by getConcurrentStreamingCameraIds()
+ * @throws CameraAccessException if one of the camera devices queried is no longer connected.
+ */
+ @RequiresPermission(android.Manifest.permission.CAMERA)
+ public boolean isConcurrentSessionConfigurationSupported(
+ @NonNull Map<String, SessionConfiguration> cameraIdAndSessionConfig)
+ throws CameraAccessException {
+ return CameraManagerGlobal.get().isConcurrentSessionConfigurationSupported(
+ cameraIdAndSessionConfig);
+ }
+
+ /**
* Register a callback to be notified about camera device availability.
*
* <p>Registering the same callback again will replace the handler with the
@@ -336,8 +401,10 @@
} catch (NumberFormatException e) {
Log.e(TAG, "Failed to parse camera Id " + cameraId + " to integer");
}
+ boolean hasConcurrentStreams =
+ CameraManagerGlobal.get().cameraIdHasConcurrentStreamsLocked(cameraId);
+ info.setHasMandatoryConcurrentStreams(hasConcurrentStreams);
info.setDisplaySize(displaySize);
-
characteristics = new CameraCharacteristics(info);
}
} catch (ServiceSpecificException e) {
@@ -964,6 +1031,9 @@
private final ArrayMap<String, ArrayList<String>> mUnavailablePhysicalDevices =
new ArrayMap<String, ArrayList<String>>();
+ private final Set<Set<String>> mConcurrentCameraIdCombinations =
+ new ArraySet<Set<String>>();
+
// Registered availablility callbacks and their executors
private final ArrayMap<AvailabilityCallback, Executor> mCallbackMap =
new ArrayMap<AvailabilityCallback, Executor>();
@@ -1068,7 +1138,22 @@
} catch (RemoteException e) {
// Camera service is now down, leave mCameraService as null
}
+
+ try {
+ ConcurrentCameraIdCombination[] cameraIdCombinations =
+ cameraService.getConcurrentStreamingCameraIds();
+ for (ConcurrentCameraIdCombination comb : cameraIdCombinations) {
+ mConcurrentCameraIdCombinations.add(comb.getConcurrentCameraIdCombination());
+ }
+ } catch (ServiceSpecificException e) {
+ // Unexpected failure
+ throw new IllegalStateException("Failed to get concurrent camera id combinations",
+ e);
+ } catch (RemoteException e) {
+ // Camera service died in all probability
+ }
}
+
private String[] extractCameraIdListLocked() {
String[] cameraIds = null;
int idCount = 0;
@@ -1089,6 +1174,31 @@
}
return cameraIds;
}
+
+ private Set<Set<String>> extractConcurrentCameraIdListLocked() {
+ Set<Set<String>> concurrentCameraIds = new ArraySet<Set<String>>();
+ for (Set<String> cameraIds : mConcurrentCameraIdCombinations) {
+ Set<String> extractedCameraIds = new ArraySet<String>();
+ for (String cameraId : cameraIds) {
+ // if the camera id status is NOT_PRESENT or ENUMERATING; skip the device.
+ // TODO: Would a device status NOT_PRESENT ever be in the map ? it gets removed
+ // in the callback anyway.
+ Integer status = mDeviceStatus.get(cameraId);
+ if (status == null) {
+ // camera id not present
+ continue;
+ }
+ if (status == ICameraServiceListener.STATUS_ENUMERATING
+ || status == ICameraServiceListener.STATUS_NOT_PRESENT) {
+ continue;
+ }
+ extractedCameraIds.add(cameraId);
+ }
+ concurrentCameraIds.add(extractedCameraIds);
+ }
+ return concurrentCameraIds;
+ }
+
private static void sortCameraIds(String[] cameraIds) {
// The sort logic must match the logic in
// libcameraservice/common/CameraProviderManager.cpp::getAPI1CompatibleCameraDeviceIds
@@ -1214,6 +1324,88 @@
return cameraIds;
}
+ public @NonNull Set<Set<String>> getConcurrentStreamingCameraIds() {
+ Set<Set<String>> concurrentStreamingCameraIds = null;
+ synchronized (mLock) {
+ // Try to make sure we have an up-to-date list of concurrent camera devices.
+ connectCameraServiceLocked();
+ concurrentStreamingCameraIds = extractConcurrentCameraIdListLocked();
+ }
+ // TODO: Some sort of sorting ?
+ return concurrentStreamingCameraIds;
+ }
+
+ public boolean isConcurrentSessionConfigurationSupported(
+ @NonNull Map<String, SessionConfiguration> cameraIdsAndSessionConfigurations)
+ throws CameraAccessException {
+
+ if (cameraIdsAndSessionConfigurations == null) {
+ throw new IllegalArgumentException("cameraIdsAndSessionConfigurations was null");
+ }
+
+ int size = cameraIdsAndSessionConfigurations.size();
+ if (size == 0) {
+ throw new IllegalArgumentException("camera id and session combination is empty");
+ }
+
+ synchronized (mLock) {
+ // Go through all the elements and check if the camera ids are valid at least /
+ // belong to one of the combinations returned by getConcurrentStreamingCameraIds()
+ boolean subsetFound = false;
+ for (Set<String> combination : mConcurrentCameraIdCombinations) {
+ if (combination.containsAll(cameraIdsAndSessionConfigurations.keySet())) {
+ subsetFound = true;
+ }
+ }
+ if (!subsetFound) {
+ throw new IllegalArgumentException(
+ "The set of camera ids provided is not a subset of"
+ + "getConcurrentStreamingCameraIds");
+ }
+ CameraIdAndSessionConfiguration [] cameraIdsAndConfigs =
+ new CameraIdAndSessionConfiguration[size];
+ int i = 0;
+ for (Map.Entry<String, SessionConfiguration> pair :
+ cameraIdsAndSessionConfigurations.entrySet()) {
+ cameraIdsAndConfigs[i] =
+ new CameraIdAndSessionConfiguration(pair.getKey(), pair.getValue());
+ i++;
+ }
+ try {
+ return mCameraService.isConcurrentSessionConfigurationSupported(
+ cameraIdsAndConfigs);
+ } catch (ServiceSpecificException e) {
+ throwAsPublicException(e);
+ } catch (RemoteException e) {
+ // Camera service died - act as if the camera was disconnected
+ throw new CameraAccessException(CameraAccessException.CAMERA_DISCONNECTED,
+ "Camera service is currently unavailable", e);
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Helper function to find out if a camera id is in the set of combinations returned by
+ * getConcurrentStreamingCameraIds()
+ * @param cameraId the unique identifier of the camera device to query
+ * @return Whether the camera device was found in the set of combinations returned by
+ * getConcurrentStreamingCameraIds
+ */
+ public boolean cameraIdHasConcurrentStreamsLocked(String cameraId) {
+ if (!mDeviceStatus.containsKey(cameraId)) {
+ Log.e(TAG, "cameraIdHasConcurrentStreamsLocked called on non existing camera id");
+ return false;
+ }
+ for (Set<String> comb : mConcurrentCameraIdCombinations) {
+ if (comb.contains(cameraId)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
public void setTorchMode(String cameraId, boolean enabled) throws CameraAccessException {
synchronized(mLock) {
@@ -1698,6 +1890,8 @@
cameraId);
}
+ mConcurrentCameraIdCombinations.clear();
+
scheduleCameraServiceReconnectionLocked();
}
}
diff --git a/core/java/android/hardware/camera2/impl/CameraMetadataNative.java b/core/java/android/hardware/camera2/impl/CameraMetadataNative.java
index 3ae3d78..aefe66f 100644
--- a/core/java/android/hardware/camera2/impl/CameraMetadataNative.java
+++ b/core/java/android/hardware/camera2/impl/CameraMetadataNative.java
@@ -621,6 +621,16 @@
}
});
sGetCommandMap.put(
+ CameraCharacteristics.SCALER_MANDATORY_CONCURRENT_STREAM_COMBINATIONS.getNativeKey(),
+ new GetCommand() {
+ @Override
+ @SuppressWarnings("unchecked")
+ public <T> T getValue(CameraMetadataNative metadata, Key<T> key) {
+ return (T) metadata.getMandatoryConcurrentStreamCombinations();
+ }
+ });
+
+ sGetCommandMap.put(
CameraCharacteristics.CONTROL_MAX_REGIONS_AE.getNativeKey(), new GetCommand() {
@Override
@SuppressWarnings("unchecked")
@@ -1247,7 +1257,8 @@
return ret;
}
- private MandatoryStreamCombination[] getMandatoryStreamCombinations() {
+ private MandatoryStreamCombination[] getMandatoryStreamCombinationsHelper(
+ boolean getConcurrent) {
int[] capabilities = getBase(CameraCharacteristics.REQUEST_AVAILABLE_CAPABILITIES);
ArrayList<Integer> caps = new ArrayList<Integer>();
caps.ensureCapacity(capabilities.length);
@@ -1257,7 +1268,13 @@
int hwLevel = getBase(CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL);
MandatoryStreamCombination.Builder build = new MandatoryStreamCombination.Builder(
mCameraId, hwLevel, mDisplaySize, caps, getStreamConfigurationMap());
- List<MandatoryStreamCombination> combs = build.getAvailableMandatoryStreamCombinations();
+
+ List<MandatoryStreamCombination> combs = null;
+ if (getConcurrent) {
+ combs = build.getAvailableMandatoryConcurrentStreamCombinations();
+ } else {
+ combs = build.getAvailableMandatoryStreamCombinations();
+ }
if ((combs != null) && (!combs.isEmpty())) {
MandatoryStreamCombination[] combArray = new MandatoryStreamCombination[combs.size()];
combArray = combs.toArray(combArray);
@@ -1267,6 +1284,17 @@
return null;
}
+ private MandatoryStreamCombination[] getMandatoryConcurrentStreamCombinations() {
+ if (!mHasMandatoryConcurrentStreams) {
+ return null;
+ }
+ return getMandatoryStreamCombinationsHelper(true);
+ }
+
+ private MandatoryStreamCombination[] getMandatoryStreamCombinations() {
+ return getMandatoryStreamCombinationsHelper(false);
+ }
+
private StreamConfigurationMap getStreamConfigurationMap() {
StreamConfiguration[] configurations = getBase(
CameraCharacteristics.SCALER_AVAILABLE_STREAM_CONFIGURATIONS);
@@ -1614,6 +1642,7 @@
}
private int mCameraId = -1;
+ private boolean mHasMandatoryConcurrentStreams = false;
private Size mDisplaySize = new Size(0, 0);
/**
@@ -1628,6 +1657,18 @@
}
/**
+ * Set the current camera Id.
+ *
+ * @param hasMandatoryConcurrentStreams whether the metadata advertises mandatory concurrent
+ * streams.
+ *
+ * @hide
+ */
+ public void setHasMandatoryConcurrentStreams(boolean hasMandatoryConcurrentStreams) {
+ mHasMandatoryConcurrentStreams = hasMandatoryConcurrentStreams;
+ }
+
+ /**
* Set the current display size.
*
* @param displaySize The current display size.
@@ -1682,6 +1723,7 @@
public void swap(CameraMetadataNative other) {
nativeSwap(other);
mCameraId = other.mCameraId;
+ mHasMandatoryConcurrentStreams = other.mHasMandatoryConcurrentStreams;
mDisplaySize = other.mDisplaySize;
}
diff --git a/core/java/android/hardware/camera2/params/MandatoryStreamCombination.java b/core/java/android/hardware/camera2/params/MandatoryStreamCombination.java
index 23f18a8..41e1443 100644
--- a/core/java/android/hardware/camera2/params/MandatoryStreamCombination.java
+++ b/core/java/android/hardware/camera2/params/MandatoryStreamCombination.java
@@ -16,30 +16,27 @@
package android.hardware.camera2.params;
-import static com.android.internal.util.Preconditions.*;
import static android.hardware.camera2.params.StreamConfigurationMap.checkArgumentFormat;
-import android.annotation.IntRange;
+import static com.android.internal.util.Preconditions.*;
+
import android.annotation.NonNull;
import android.annotation.Nullable;
-import android.content.Context;
import android.graphics.ImageFormat;
import android.graphics.ImageFormat.Format;
import android.hardware.camera2.CameraCharacteristics;
-import android.hardware.camera2.CameraCharacteristics.Key;
import android.hardware.camera2.CameraDevice;
import android.hardware.camera2.CameraManager;
import android.hardware.camera2.CameraMetadata;
import android.hardware.camera2.params.StreamConfigurationMap;
import android.hardware.camera2.utils.HashCodeHelpers;
-import android.graphics.PixelFormat;
import android.media.CamcorderProfile;
-import android.util.Size;
import android.util.Log;
import android.util.Pair;
+import android.util.Size;
-import java.util.Arrays;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
@@ -200,7 +197,6 @@
mDescription = description;
mIsReprocessable = isReprocessable;
}
-
/**
* Get the mandatory stream combination description.
*
@@ -271,7 +267,7 @@
mStreamsInformation.hashCode());
}
- private static enum SizeThreshold { VGA, PREVIEW, RECORD, MAXIMUM }
+ private static enum SizeThreshold { VGA, PREVIEW, RECORD, MAXIMUM, s720p }
private static enum ReprocessType { NONE, PRIVATE, YUV }
private static final class StreamTemplate {
public int mFormat;
@@ -653,6 +649,27 @@
/*reprocessType*/ ReprocessType.YUV),
};
+ private static StreamCombinationTemplate sConcurrentStreamCombinations[] = {
+ new StreamCombinationTemplate(new StreamTemplate [] {
+ new StreamTemplate(ImageFormat.YUV_420_888, SizeThreshold.s720p) },
+ "In-app video / image processing"),
+ new StreamCombinationTemplate(new StreamTemplate [] {
+ new StreamTemplate(ImageFormat.PRIVATE, SizeThreshold.s720p) },
+ "preview / preview to GPU"),
+ new StreamCombinationTemplate(new StreamTemplate [] {
+ new StreamTemplate(ImageFormat.YUV_420_888, SizeThreshold.s720p),
+ new StreamTemplate(ImageFormat.YUV_420_888, SizeThreshold.s720p)},
+ "In-app video / image processing with preview"),
+ new StreamCombinationTemplate(new StreamTemplate [] {
+ new StreamTemplate(ImageFormat.PRIVATE, SizeThreshold.s720p),
+ new StreamTemplate(ImageFormat.YUV_420_888, SizeThreshold.s720p)},
+ "In-app video / image processing with preview"),
+ new StreamCombinationTemplate(new StreamTemplate [] {
+ new StreamTemplate(ImageFormat.PRIVATE, SizeThreshold.s720p),
+ new StreamTemplate(ImageFormat.PRIVATE, SizeThreshold.s720p)},
+ "Standard Recording"),
+ };
+
/**
* Helper builder class to generate a list of available mandatory stream combinations.
* @hide
@@ -687,6 +704,64 @@
}
/**
+ * Retrieve a list of all available mandatory concurrent stream combinations.
+ * This method should only be called for devices which are listed in combinations returned
+ * by CameraManager.getConcurrentStreamingCameraIds.
+ *
+ * @return a non-modifiable list of supported mandatory concurrent stream combinations.
+ */
+ public @NonNull List<MandatoryStreamCombination>
+ getAvailableMandatoryConcurrentStreamCombinations() {
+ // Since concurrent streaming support is optional, we mandate these stream
+ // combinations regardless of camera device capabilities.
+ if (!isColorOutputSupported()) {
+ Log.v(TAG, "Device is not backward compatible!");
+ throw new IllegalArgumentException("Camera device which is not BACKWARD_COMPATIBLE"
+ + " cannot have mandatory concurrent streams");
+ }
+ Size size720p = new Size(1280, 720);
+
+ ArrayList<MandatoryStreamCombination> availableConcurrentStreamCombinations =
+ new ArrayList<MandatoryStreamCombination>();
+ availableConcurrentStreamCombinations.ensureCapacity(
+ sConcurrentStreamCombinations.length);
+ for (StreamCombinationTemplate combTemplate : sConcurrentStreamCombinations) {
+ ArrayList<MandatoryStreamInformation> streamsInfo =
+ new ArrayList<MandatoryStreamInformation>();
+ streamsInfo.ensureCapacity(combTemplate.mStreamTemplates.length);
+ for (StreamTemplate template : combTemplate.mStreamTemplates) {
+ MandatoryStreamInformation streamInfo;
+ List<Size> sizes = new ArrayList<Size>();
+ Size sizeChosen =
+ getMinSize(size720p,
+ getMaxSize(mStreamConfigMap.getOutputSizes(template.mFormat)));
+ sizes.add(sizeChosen);
+ try {
+ streamInfo = new MandatoryStreamInformation(sizes, template.mFormat);
+ } catch (IllegalArgumentException e) {
+ String cause = "No available sizes found for format: " + template.mFormat
+ + " size threshold: " + template.mSizeThreshold + " combination: "
+ + combTemplate.mDescription;
+ throw new RuntimeException(cause, e);
+ }
+ streamsInfo.add(streamInfo);
+ }
+
+ MandatoryStreamCombination streamCombination;
+ try {
+ streamCombination = new MandatoryStreamCombination(streamsInfo,
+ combTemplate.mDescription, /*isReprocess*/false);
+ } catch (IllegalArgumentException e) {
+ String cause = "No stream information for mandatory combination: "
+ + combTemplate.mDescription;
+ throw new RuntimeException(cause, e);
+ }
+ availableConcurrentStreamCombinations.add(streamCombination);
+ }
+ return Collections.unmodifiableList(availableConcurrentStreamCombinations);
+ }
+
+ /**
* Retrieve a list of all available mandatory stream combinations.
*
* @return a non-modifiable list of supported mandatory stream combinations or
@@ -965,6 +1040,18 @@
}
/**
+ * Return the lower size
+ */
+ public static @Nullable Size getMinSize(Size a, Size b) {
+ if (a == null || b == null) {
+ throw new IllegalArgumentException("sizes was empty");
+ }
+ if (a.getWidth() * a.getHeight() < b.getHeight() * b.getWidth()) {
+ return a;
+ }
+ return b;
+ }
+ /**
* Get the largest size by area.
*
* @param sizes an array of sizes, must have at least 1 element
diff --git a/core/java/android/hardware/camera2/utils/CameraIdAndSessionConfiguration.java b/core/java/android/hardware/camera2/utils/CameraIdAndSessionConfiguration.java
new file mode 100644
index 0000000..cdc037c
--- /dev/null
+++ b/core/java/android/hardware/camera2/utils/CameraIdAndSessionConfiguration.java
@@ -0,0 +1,85 @@
+/*
+ * 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.
+ */
+package android.hardware.camera2.utils;
+
+import android.annotation.NonNull;
+import android.hardware.camera2.params.SessionConfiguration;
+import android.os.Parcel;
+import android.os.Parcelable;
+
+/**
+ * CameraIdAndSessionConfiguration
+ *
+ * Includes the pair of a cameraId and its corresponding SessionConfiguration, to be used with
+ * ICameraService.isConcurrentSessionConfigurationSupported.
+ * @hide
+ */
+public class CameraIdAndSessionConfiguration implements Parcelable {
+
+ private String mCameraId;
+ private SessionConfiguration mSessionConfiguration;
+
+ public CameraIdAndSessionConfiguration(@NonNull String cameraId,
+ @NonNull SessionConfiguration sessionConfiguration) {
+ mCameraId = cameraId;
+ mSessionConfiguration = sessionConfiguration;
+ }
+
+ public static final @NonNull
+ Parcelable.Creator<CameraIdAndSessionConfiguration> CREATOR =
+ new Parcelable.Creator<CameraIdAndSessionConfiguration>() {
+ @Override
+ public CameraIdAndSessionConfiguration createFromParcel(Parcel in) {
+ return new CameraIdAndSessionConfiguration(in);
+ }
+
+ @Override
+ public CameraIdAndSessionConfiguration[] newArray(int size) {
+ return new CameraIdAndSessionConfiguration[size];
+ }
+ };
+
+ private CameraIdAndSessionConfiguration(Parcel in) {
+ readFromParcel(in);
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(Parcel dest, int flags) {
+ dest.writeString(mCameraId);
+ mSessionConfiguration.writeToParcel(dest, flags);
+ }
+
+ /**
+ * helper for CREATOR
+ */
+ public void readFromParcel(Parcel in) {
+ mCameraId = in.readString();
+ mSessionConfiguration = SessionConfiguration.CREATOR.createFromParcel(in);
+ }
+
+ public @NonNull String getCameraId() {
+ return mCameraId;
+ }
+
+ public @NonNull SessionConfiguration getSessionConfiguration() {
+ return mSessionConfiguration;
+ }
+}
diff --git a/core/java/android/hardware/camera2/utils/ConcurrentCameraIdCombination.java b/core/java/android/hardware/camera2/utils/ConcurrentCameraIdCombination.java
new file mode 100644
index 0000000..8f4d636
--- /dev/null
+++ b/core/java/android/hardware/camera2/utils/ConcurrentCameraIdCombination.java
@@ -0,0 +1,91 @@
+/*
+ * 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.
+ */
+package android.hardware.camera2.utils;
+
+import android.annotation.NonNull;
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * ConcurrentCameraIdCombination
+ *
+ * Includes a list of camera ids that may have sessions configured concurrently.
+ * @hide
+ */
+public class ConcurrentCameraIdCombination implements Parcelable {
+
+ private Set<String> mConcurrentCameraIds = new HashSet<>();
+
+ public static final @NonNull
+ Parcelable.Creator<ConcurrentCameraIdCombination> CREATOR =
+ new Parcelable.Creator<ConcurrentCameraIdCombination>() {
+ @Override
+ public ConcurrentCameraIdCombination createFromParcel(Parcel in) {
+ return new ConcurrentCameraIdCombination(in);
+ }
+
+ @Override
+ public ConcurrentCameraIdCombination[] newArray(int size) {
+ return new ConcurrentCameraIdCombination[size];
+ }
+ };
+
+ private ConcurrentCameraIdCombination(Parcel in) {
+ readFromParcel(in);
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(Parcel dest, int flags) {
+ dest.writeInt(mConcurrentCameraIds.size());
+ for (String cameraId : mConcurrentCameraIds) {
+ dest.writeString(cameraId);
+ }
+ }
+
+ /**
+ * helper for CREATOR
+ */
+ public void readFromParcel(Parcel in) {
+ mConcurrentCameraIds.clear();
+ int cameraCombinationSize = in.readInt();
+ if (cameraCombinationSize < 0) {
+ throw new RuntimeException("cameraCombinationSize " + cameraCombinationSize
+ + " should not be negative");
+ }
+ for (int i = 0; i < cameraCombinationSize; i++) {
+ String cameraId = in.readString();
+ if (cameraId == null) {
+ throw new RuntimeException("Failed to read camera id from Parcel");
+ }
+ mConcurrentCameraIds.add(cameraId);
+ }
+ }
+
+ /**
+ * Get this concurrent camera id combination.
+ */
+ public Set<String> getConcurrentCameraIdCombination() {
+ return mConcurrentCameraIds;
+ }
+}
diff --git a/core/java/android/hardware/display/BrightnessConfiguration.java b/core/java/android/hardware/display/BrightnessConfiguration.java
index 13122d2..6412a0c 100644
--- a/core/java/android/hardware/display/BrightnessConfiguration.java
+++ b/core/java/android/hardware/display/BrightnessConfiguration.java
@@ -61,7 +61,7 @@
private static final String ATTR_MODEL_LOWER_BOUND = "model-lower-bound";
private static final String ATTR_MODEL_UPPER_BOUND = "model-upper-bound";
/**
- * Returned from {@link #getShortTermModelTimeout()} if no timeout has been set.
+ * Returned from {@link #getShortTermModelTimeoutMillis()} if no timeout has been set.
* In this case the device will use the default timeout available in the
* {@link BrightnessConfiguration} returned from
* {@link DisplayManager#getDefaultBrightnessConfiguration()}.
@@ -160,7 +160,7 @@
* {@link #getShortTermModelUpperLuxMultiplier()} to decide whether to keep any adjustment
* the user has made to adaptive brightness.
*/
- public long getShortTermModelTimeout() {
+ public long getShortTermModelTimeoutMillis() {
return mShortTermModelTimeout;
}
@@ -326,7 +326,7 @@
builder.setDescription(description);
final boolean shouldCollectColorSamples = in.readBoolean();
builder.setShouldCollectColorSamples(shouldCollectColorSamples);
- builder.setShortTermModelTimeout(in.readLong());
+ builder.setShortTermModelTimeoutMillis(in.readLong());
builder.setShortTermModelLowerLuxMultiplier(in.readFloat());
builder.setShortTermModelUpperLuxMultiplier(in.readFloat());
return builder.build();
@@ -487,7 +487,7 @@
builder.addCorrectionByCategory(category, correction);
}
builder.setShouldCollectColorSamples(shouldCollectColorSamples);
- builder.setShortTermModelTimeout(shortTermModelTimeout);
+ builder.setShortTermModelTimeoutMillis(shortTermModelTimeout);
builder.setShortTermModelLowerLuxMultiplier(shortTermModelLowerLuxMultiplier);
builder.setShortTermModelUpperLuxMultiplier(shortTermModelUpperLuxMultiplier);
return builder.build();
@@ -673,8 +673,8 @@
* adjustment the user has made to adaptive brightness.
*/
@NonNull
- public Builder setShortTermModelTimeout(long shortTermModelTimeout) {
- mShortTermModelTimeout = shortTermModelTimeout;
+ public Builder setShortTermModelTimeoutMillis(long shortTermModelTimeoutMillis) {
+ mShortTermModelTimeout = shortTermModelTimeoutMillis;
return this;
}
diff --git a/core/java/android/os/HwParcel.java b/core/java/android/os/HwParcel.java
index fb36e6f..228548a 100644
--- a/core/java/android/os/HwParcel.java
+++ b/core/java/android/os/HwParcel.java
@@ -38,6 +38,7 @@
public class HwParcel {
private static final String TAG = "HwParcel";
+ /** @hide */
@IntDef(prefix = { "STATUS_" }, value = {
STATUS_SUCCESS,
})
diff --git a/core/java/android/os/TelephonyServiceManager.java b/core/java/android/os/TelephonyServiceManager.java
index c67dedb..1128f4c 100644
--- a/core/java/android/os/TelephonyServiceManager.java
+++ b/core/java/android/os/TelephonyServiceManager.java
@@ -39,7 +39,7 @@
/**
* A class that exposes the methods to register and obtain each system service.
*/
- public final class ServiceRegisterer {
+ public static final class ServiceRegisterer {
private final String mServiceName;
/**
diff --git a/core/java/android/os/connectivity/WifiActivityEnergyInfo.java b/core/java/android/os/connectivity/WifiActivityEnergyInfo.java
index 664b6c8..016cc2f 100644
--- a/core/java/android/os/connectivity/WifiActivityEnergyInfo.java
+++ b/core/java/android/os/connectivity/WifiActivityEnergyInfo.java
@@ -16,7 +16,9 @@
package android.os.connectivity;
+import android.annotation.ElapsedRealtimeLong;
import android.annotation.IntDef;
+import android.annotation.IntRange;
import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.app.ActivityThread;
@@ -37,14 +39,20 @@
*/
@SystemApi
public final class WifiActivityEnergyInfo implements Parcelable {
- private long mTimeSinceBootMillis;
+ @ElapsedRealtimeLong
+ private final long mTimeSinceBootMillis;
@StackState
- private int mStackState;
- private long mControllerTxDurationMillis;
- private long mControllerRxDurationMillis;
- private long mControllerScanDurationMillis;
- private long mControllerIdleDurationMillis;
- private long mControllerEnergyUsedMicroJoules;
+ private final int mStackState;
+ @IntRange(from = 0)
+ private final long mControllerTxDurationMillis;
+ @IntRange(from = 0)
+ private final long mControllerRxDurationMillis;
+ @IntRange(from = 0)
+ private final long mControllerScanDurationMillis;
+ @IntRange(from = 0)
+ private final long mControllerIdleDurationMillis;
+ @IntRange(from = 0)
+ private final long mControllerEnergyUsedMicroJoules;
/** @hide */
@Retention(RetentionPolicy.SOURCE)
@@ -67,7 +75,7 @@
/**
* Constructor.
*
- * @param timeSinceBootMillis the time since boot, in milliseconds.
+ * @param timeSinceBootMillis the elapsed real time since boot, in milliseconds.
* @param stackState The current state of the Wifi Stack. One of {@link #STACK_STATE_INVALID},
* {@link #STACK_STATE_STATE_ACTIVE}, {@link #STACK_STATE_STATE_SCANNING},
* or {@link #STACK_STATE_STATE_IDLE}.
@@ -78,23 +86,27 @@
* receiving.
*/
public WifiActivityEnergyInfo(
- long timeSinceBootMillis,
+ @ElapsedRealtimeLong long timeSinceBootMillis,
@StackState int stackState,
- long txDurationMillis,
- long rxDurationMillis,
- long scanDurationMillis,
- long idleDurationMillis) {
- mTimeSinceBootMillis = timeSinceBootMillis;
- mStackState = stackState;
- mControllerTxDurationMillis = txDurationMillis;
- mControllerRxDurationMillis = rxDurationMillis;
- mControllerScanDurationMillis = scanDurationMillis;
- mControllerIdleDurationMillis = idleDurationMillis;
+ @IntRange(from = 0) long txDurationMillis,
+ @IntRange(from = 0) long rxDurationMillis,
+ @IntRange(from = 0) long scanDurationMillis,
+ @IntRange(from = 0) long idleDurationMillis) {
+ this(timeSinceBootMillis,
+ stackState,
+ txDurationMillis,
+ rxDurationMillis,
+ scanDurationMillis,
+ idleDurationMillis,
+ calculateEnergyMicroJoules(txDurationMillis, rxDurationMillis, idleDurationMillis));
+ }
+
+ private static long calculateEnergyMicroJoules(
+ long txDurationMillis, long rxDurationMillis, long idleDurationMillis) {
final Context context = ActivityThread.currentActivityThread().getSystemContext();
if (context == null) {
- mControllerEnergyUsedMicroJoules = 0L;
- return;
+ return 0L;
}
// Calculate energy used using PowerProfile.
PowerProfile powerProfile = new PowerProfile(context);
@@ -106,10 +118,28 @@
PowerProfile.POWER_WIFI_CONTROLLER_TX);
final double voltage = powerProfile.getAveragePower(
PowerProfile.POWER_WIFI_CONTROLLER_OPERATING_VOLTAGE) / 1000.0;
- final long energyUsedMicroJoules = (long) ((mControllerTxDurationMillis * txCurrent
- + mControllerRxDurationMillis * rxCurrent
- + mControllerIdleDurationMillis * rxIdleCurrent)
+
+ return (long) ((txDurationMillis * txCurrent
+ + rxDurationMillis * rxCurrent
+ + idleDurationMillis * rxIdleCurrent)
* voltage);
+ }
+
+ /** @hide */
+ public WifiActivityEnergyInfo(
+ @ElapsedRealtimeLong long timeSinceBootMillis,
+ @StackState int stackState,
+ @IntRange(from = 0) long txDurationMillis,
+ @IntRange(from = 0) long rxDurationMillis,
+ @IntRange(from = 0) long scanDurationMillis,
+ @IntRange(from = 0) long idleDurationMillis,
+ @IntRange(from = 0) long energyUsedMicroJoules) {
+ mTimeSinceBootMillis = timeSinceBootMillis;
+ mStackState = stackState;
+ mControllerTxDurationMillis = txDurationMillis;
+ mControllerRxDurationMillis = rxDurationMillis;
+ mControllerScanDurationMillis = scanDurationMillis;
+ mControllerIdleDurationMillis = idleDurationMillis;
mControllerEnergyUsedMicroJoules = energyUsedMicroJoules;
}
@@ -158,16 +188,12 @@
return 0;
}
- /** Get the timestamp (milliseconds since boot) of record creation. */
+ /** Get the timestamp (elapsed real time milliseconds since boot) of record creation. */
+ @ElapsedRealtimeLong
public long getTimeSinceBootMillis() {
return mTimeSinceBootMillis;
}
- /** Set the timestamp (milliseconds since boot) of record creation. */
- public void setTimeSinceBootMillis(long timeSinceBootMillis) {
- mTimeSinceBootMillis = timeSinceBootMillis;
- }
-
/**
* Get the Wifi stack reported state. One of {@link #STACK_STATE_INVALID},
* {@link #STACK_STATE_STATE_ACTIVE}, {@link #STACK_STATE_STATE_SCANNING},
@@ -178,66 +204,40 @@
return mStackState;
}
- /**
- * Set the Wifi stack reported state. One of {@link #STACK_STATE_INVALID},
- * {@link #STACK_STATE_STATE_ACTIVE}, {@link #STACK_STATE_STATE_SCANNING},
- * {@link #STACK_STATE_STATE_IDLE}.
- */
- public void setStackState(@StackState int stackState) {
- mStackState = stackState;
- }
-
/** Get the Wifi transmission duration, in milliseconds. */
+ @IntRange(from = 0)
public long getControllerTxDurationMillis() {
return mControllerTxDurationMillis;
}
- /** Set the Wifi transmission duration, in milliseconds. */
- public void setControllerTxDurationMillis(long controllerTxDurationMillis) {
- mControllerTxDurationMillis = controllerTxDurationMillis;
- }
-
/** Get the Wifi receive duration, in milliseconds. */
+ @IntRange(from = 0)
public long getControllerRxDurationMillis() {
return mControllerRxDurationMillis;
}
- /** Set the Wifi receive duration, in milliseconds. */
- public void setControllerRxDurationMillis(long controllerRxDurationMillis) {
- mControllerRxDurationMillis = controllerRxDurationMillis;
- }
-
/** Get the Wifi scan duration, in milliseconds. */
+ @IntRange(from = 0)
public long getControllerScanDurationMillis() {
return mControllerScanDurationMillis;
}
- /** Set the Wifi scan duration, in milliseconds. */
- public void setControllerScanDurationMillis(long controllerScanDurationMillis) {
- mControllerScanDurationMillis = controllerScanDurationMillis;
- }
-
/** Get the Wifi idle duration, in milliseconds. */
+ @IntRange(from = 0)
public long getControllerIdleDurationMillis() {
return mControllerIdleDurationMillis;
}
- /** Set the Wifi idle duration, in milliseconds. */
- public void setControllerIdleDurationMillis(long controllerIdleDurationMillis) {
- mControllerIdleDurationMillis = controllerIdleDurationMillis;
- }
-
/** Get the energy consumed by Wifi, in microjoules. */
+ @IntRange(from = 0)
public long getControllerEnergyUsedMicroJoules() {
return mControllerEnergyUsedMicroJoules;
}
- /** Set the energy consumed by Wifi, in microjoules. */
- public void setControllerEnergyUsedMicroJoules(long controllerEnergyUsedMicroJoules) {
- mControllerEnergyUsedMicroJoules = controllerEnergyUsedMicroJoules;
- }
-
- /** Returns true if the record is valid, false otherwise. */
+ /**
+ * Returns true if the record is valid, false otherwise.
+ * @hide
+ */
public boolean isValid() {
return mControllerTxDurationMillis >= 0
&& mControllerRxDurationMillis >= 0
diff --git a/core/java/android/provider/Telephony.java b/core/java/android/provider/Telephony.java
index 9da584e..4d75059 100644
--- a/core/java/android/provider/Telephony.java
+++ b/core/java/android/provider/Telephony.java
@@ -4038,15 +4038,6 @@
@Retention(RetentionPolicy.SOURCE)
public @interface EditStatus {}
- /** @hide */
- @IntDef({
- SKIP_464XLAT_DEFAULT,
- SKIP_464XLAT_DISABLE,
- SKIP_464XLAT_ENABLE,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface Skip464XlatStatus {}
-
/**
* Compat framework change ID for the APN db read permission change.
*
diff --git a/core/java/android/service/autofill/IInlineSuggestionRenderService.aidl b/core/java/android/service/autofill/IInlineSuggestionRenderService.aidl
new file mode 100644
index 0000000..decdcf5
--- /dev/null
+++ b/core/java/android/service/autofill/IInlineSuggestionRenderService.aidl
@@ -0,0 +1,30 @@
+/*
+ * 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.
+ */
+
+package android.service.autofill;
+
+import android.service.autofill.IInlineSuggestionUiCallback;
+import android.service.autofill.InlinePresentation;
+
+/**
+ * Interface from system to the inline suggestion render service.
+ *
+ * @hide
+ */
+oneway interface IInlineSuggestionRenderService {
+ void renderSuggestion(in IInlineSuggestionUiCallback callback, in InlinePresentation presentation,
+ int width, int height);
+}
diff --git a/core/java/android/service/autofill/IInlineSuggestionUiCallback.aidl b/core/java/android/service/autofill/IInlineSuggestionUiCallback.aidl
new file mode 100644
index 0000000..a55a2ce
--- /dev/null
+++ b/core/java/android/service/autofill/IInlineSuggestionUiCallback.aidl
@@ -0,0 +1,29 @@
+/*
+ * 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.
+ */
+
+package android.service.autofill;
+
+import android.view.SurfaceControl;
+
+/**
+ * Interface to receive events from inline suggestions.
+ *
+ * @hide
+ */
+oneway interface IInlineSuggestionUiCallback {
+ void autofill();
+ void onContent(in SurfaceControl surface);
+}
diff --git a/core/java/android/service/autofill/InlineSuggestionRenderService.java b/core/java/android/service/autofill/InlineSuggestionRenderService.java
new file mode 100644
index 0000000..2593aab
--- /dev/null
+++ b/core/java/android/service/autofill/InlineSuggestionRenderService.java
@@ -0,0 +1,92 @@
+/*
+ * 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.
+ */
+package android.service.autofill;
+
+import static com.android.internal.util.function.pooled.PooledLambda.obtainMessage;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.annotation.SystemApi;
+import android.annotation.TestApi;
+import android.app.Service;
+import android.app.slice.Slice;
+import android.content.Intent;
+import android.os.Handler;
+import android.os.IBinder;
+import android.os.Looper;
+import android.util.Log;
+import android.view.View;
+
+/**
+ * A service that renders an inline presentation given the {@link InlinePresentation} containing
+ * a {@link Slice} built using the {@link androidx.autofill.AutofillSliceBuilder}.
+ *
+ * {@hide}
+ */
+@SystemApi
+@TestApi
+public abstract class InlineSuggestionRenderService extends Service {
+
+ private static final String TAG = "InlineSuggestionRenderService";
+
+ /**
+ * The {@link Intent} that must be declared as handled by the service.
+ *
+ * <p>To be supported, the service must also require the
+ * {@link android.Manifest.permission#BIND_INLINE_SUGGESTION_RENDER_SERVICE} permission so
+ * that other applications can not abuse it.
+ */
+ public static final String SERVICE_INTERFACE =
+ "android.service.autofill.InlineSuggestionRenderService";
+
+ private final Handler mHandler = new Handler(Looper.getMainLooper(), null, true);
+
+ private void handleRenderSuggestion(IInlineSuggestionUiCallback callback,
+ InlinePresentation presentation, int width, int height) {
+ //TODO(b/146453086): implementation in ExtService
+ }
+
+ @Override
+ @Nullable
+ public final IBinder onBind(@NonNull Intent intent) {
+ if (SERVICE_INTERFACE.equals(intent.getAction())) {
+ return new IInlineSuggestionRenderService.Stub() {
+ @Override
+ public void renderSuggestion(@NonNull IInlineSuggestionUiCallback callback,
+ @NonNull InlinePresentation presentation, int width, int height) {
+ mHandler.sendMessage(obtainMessage(
+ InlineSuggestionRenderService::handleRenderSuggestion,
+ InlineSuggestionRenderService.this, callback, presentation,
+ width, height));
+ }
+ }.asBinder();
+ }
+
+ Log.w(TAG, "Tried to bind to wrong intent (should be " + SERVICE_INTERFACE + ": " + intent);
+ return null;
+ }
+
+ /**
+ * Renders the slice into a view.
+ */
+ @Nullable
+ public View onRenderSuggestion(@NonNull InlinePresentation presentation,
+ int width, int height) {
+ Log.e(TAG, "service implementation (" + getClass() + " does not implement "
+ + "onRenderSuggestion()");
+ return null;
+ }
+}
diff --git a/core/java/android/service/controls/TokenProvider.aidl b/core/java/android/service/controls/TokenProvider.aidl
new file mode 100644
index 0000000..8f4b795
--- /dev/null
+++ b/core/java/android/service/controls/TokenProvider.aidl
@@ -0,0 +1,7 @@
+package android.service.controls;
+
+/** @hide */
+interface TokenProvider {
+ void setAuthToken(String token);
+ String getAccountName();
+}
\ No newline at end of file
diff --git a/core/java/android/speech/tts/TextToSpeechService.java b/core/java/android/speech/tts/TextToSpeechService.java
index 7815864..26c8314 100644
--- a/core/java/android/speech/tts/TextToSpeechService.java
+++ b/core/java/android/speech/tts/TextToSpeechService.java
@@ -1259,6 +1259,7 @@
@Override
public IBinder onBind(Intent intent) {
if (TextToSpeech.Engine.INTENT_ACTION_TTS_SERVICE.equals(intent.getAction())) {
+ Binder.allowBlocking(mBinder.asBinder());
return mBinder;
}
return null;
diff --git a/core/java/android/telephony/CellBroadcastIntents.java b/core/java/android/telephony/CellBroadcastIntents.java
index 8446253..2e08108 100644
--- a/core/java/android/telephony/CellBroadcastIntents.java
+++ b/core/java/android/telephony/CellBroadcastIntents.java
@@ -16,22 +16,23 @@
package android.telephony;
+import android.Manifest;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
+import android.app.AppOpsManager;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
-import android.content.pm.PackageManager;
-import android.os.Bundle;
import android.os.Handler;
import android.os.UserHandle;
+import android.provider.Telephony;
/**
* A static helper class used to send Intents with prepopulated flags.
* <p>
- * This is intended to be used by the CellBroadcastService and will throw a security exception if
- * used from a UID besides the network stack UID.
+ * This is intended to be used by the CellBroadcastService and does nothing if the caller does not
+ * have permission to broadcast {@link Telephony.Sms.Intents.SMS_CB_RECEIVED_ACTION}.
*
* @hide
*/
@@ -39,6 +40,8 @@
public class CellBroadcastIntents {
private static final String LOG_TAG = "CellBroadcastIntents";
+ private static final String EXTRA_MESSAGE = "message";
+
/**
* @hide
*/
@@ -46,50 +49,71 @@
}
/**
- * Returns an intent which can be received by background BroadcastReceivers. This is only
- * intended to be used by the CellBroadcastService and will throw a security exception if called
- * from another UID.
+ * Broadcasts an SMS_CB_RECEIVED_ACTION intent which can be received by background
+ * BroadcastReceivers. This is only intended to be used by the CellBroadcastService and will
+ * do nothing if the caller does not have permission to broadcast
+ * {@link Telephony.Sms.Intents.SMS_CB_RECEIVED_ACTION}.
*
* @param context The context from which to send the broadcast
* @param user The user from which to send the broadcast
- * @param intent The Intent to broadcast; all receivers matching this Intent will
- * receive the broadcast.
- * @param receiverPermission String naming a permissions that a receiver must hold in order to
- * receive your broadcast. If null, no permission is required.
- * @param receiverAppOp The app op associated with the broadcast. If null, no appOp is
- * required. If both receiverAppOp and receiverPermission are
- * non-null, a receiver must have both of them to receive the
- * broadcast
+ * @param smsCbMessage The SmsCbMessage to include with the intent
* @param resultReceiver Your own BroadcastReceiver to treat as the final receiver of the
* broadcast.
* @param scheduler A custom Handler with which to schedule the resultReceiver
* callback; if null it will be scheduled in the Context's main
* thread.
* @param initialCode An initial value for the result code. Often Activity.RESULT_OK.
- * @param initialData An initial value for the result data. Often null.
- * @param initialExtras An initial value for the result extras. Often null.
+ * @param slotIndex The slot index to include in the intent
*/
- public static void sendOrderedBroadcastForBackgroundReceivers(@NonNull Context context,
- @Nullable UserHandle user, @NonNull Intent intent, @Nullable String receiverPermission,
- @Nullable String receiverAppOp, @Nullable BroadcastReceiver resultReceiver,
- @Nullable Handler scheduler, int initialCode, @Nullable String initialData,
- @Nullable Bundle initialExtras) {
- int status = context.checkCallingOrSelfPermission(
- "android.permission.GRANT_RUNTIME_PERMISSIONS_TO_TELEPHONY_DEFAULTS");
- if (status == PackageManager.PERMISSION_DENIED) {
- throw new SecurityException(
- "Caller does not have permission to send broadcast for background receivers");
- }
- Intent backgroundIntent = new Intent(intent);
+ public static void sendSmsCbReceivedBroadcast(@NonNull Context context,
+ @Nullable UserHandle user, @NonNull SmsCbMessage smsCbMessage,
+ @Nullable BroadcastReceiver resultReceiver, @Nullable Handler scheduler,
+ int initialCode, int slotIndex) {
+ Intent backgroundIntent = new Intent(Telephony.Sms.Intents.SMS_CB_RECEIVED_ACTION);
+ backgroundIntent.putExtra(EXTRA_MESSAGE, smsCbMessage);
backgroundIntent.setFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND);
+ putPhoneIdAndSubIdExtra(context, backgroundIntent, slotIndex);
+
+ String receiverPermission = Manifest.permission.RECEIVE_SMS;
+ String receiverAppOp = AppOpsManager.OPSTR_RECEIVE_SMS;
if (user != null) {
context.createContextAsUser(user, 0).sendOrderedBroadcast(backgroundIntent,
receiverPermission, receiverAppOp, resultReceiver, scheduler, initialCode,
- initialData, initialExtras);
+ null, null);
} else {
context.sendOrderedBroadcast(backgroundIntent, receiverPermission,
- receiverAppOp, resultReceiver, scheduler, initialCode, initialData,
- initialExtras);
+ receiverAppOp, resultReceiver, scheduler, initialCode, null, null);
+ }
+ }
+
+ /**
+ * Put the phone ID and sub ID into an intent as extras.
+ */
+ private static void putPhoneIdAndSubIdExtra(Context context, Intent intent, int phoneId) {
+ int subId = getSubIdForPhone(context, phoneId);
+ if (subId != SubscriptionManager.INVALID_SUBSCRIPTION_ID) {
+ intent.putExtra("subscription", subId);
+ intent.putExtra(SubscriptionManager.EXTRA_SUBSCRIPTION_INDEX, subId);
+ }
+ intent.putExtra("phone", phoneId);
+ intent.putExtra(SubscriptionManager.EXTRA_SLOT_INDEX, phoneId);
+ }
+
+ /**
+ * Get the subscription ID for a phone ID, or INVALID_SUBSCRIPTION_ID if the phone does not
+ * have an active sub
+ * @param phoneId the phoneId to use
+ * @return the associated sub id
+ */
+ private static int getSubIdForPhone(Context context, int phoneId) {
+ SubscriptionManager subMan =
+ (SubscriptionManager) context.getSystemService(
+ Context.TELEPHONY_SUBSCRIPTION_SERVICE);
+ int[] subIds = subMan.getSubscriptionIds(phoneId);
+ if (subIds != null) {
+ return subIds[0];
+ } else {
+ return SubscriptionManager.INVALID_SUBSCRIPTION_ID;
}
}
}
diff --git a/core/java/android/telephony/TelephonyRegistryManager.java b/core/java/android/telephony/TelephonyRegistryManager.java
index 6787c46..4024db1 100644
--- a/core/java/android/telephony/TelephonyRegistryManager.java
+++ b/core/java/android/telephony/TelephonyRegistryManager.java
@@ -20,8 +20,12 @@
import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
import android.annotation.TestApi;
+import android.compat.Compatibility;
+import android.compat.annotation.ChangeId;
+import android.compat.annotation.EnabledAfter;
import android.content.Context;
import android.os.Binder;
+import android.os.Build;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.telephony.Annotation.ApnType;
@@ -199,6 +203,13 @@
}
/**
+ * To check the SDK version for {@link #listenForSubscriber}.
+ */
+ @ChangeId
+ @EnabledAfter(targetSdkVersion = Build.VERSION_CODES.P)
+ private static final long LISTEN_CODE_CHANGE = 147600208L;
+
+ /**
* Listen for incoming subscriptions
* @param subId Subscription ID
* @param pkg Package name
@@ -210,6 +221,16 @@
public void listenForSubscriber(int subId, @NonNull String pkg, @NonNull String featureId,
@NonNull PhoneStateListener listener, int events, boolean notifyNow) {
try {
+ // subId from PhoneStateListener is deprecated Q on forward, use the subId from
+ // TelephonyManager instance. Keep using subId from PhoneStateListener for pre-Q.
+ if (Compatibility.isChangeEnabled(LISTEN_CODE_CHANGE)) {
+ // Since mSubId in PhoneStateListener is deprecated from Q on forward, this is
+ // the only place to set mSubId and its for "informational" only.
+ listener.mSubId = (events == PhoneStateListener.LISTEN_NONE)
+ ? SubscriptionManager.INVALID_SUBSCRIPTION_ID : subId;
+ } else if (listener.mSubId != null) {
+ subId = listener.mSubId;
+ }
sRegistry.listenForSubscriber(
subId, pkg, featureId, listener.callback, events, notifyNow);
} catch (RemoteException e) {
diff --git a/core/java/android/view/IPinnedStackController.aidl b/core/java/android/view/IPinnedStackController.aidl
index 00edb3a..cb82f16 100644
--- a/core/java/android/view/IPinnedStackController.aidl
+++ b/core/java/android/view/IPinnedStackController.aidl
@@ -53,9 +53,4 @@
* {@param bounds} here is the final destination bounds.
*/
void resetBoundsAnimation(in Rect bounds);
-
- /**
- * Reports the current default and movement bounds to controller.
- */
- void reportBounds(in Rect defaultBounds, in Rect movementBounds);
}
diff --git a/core/java/android/view/KeyEvent.java b/core/java/android/view/KeyEvent.java
index c638717..c91096e 100644
--- a/core/java/android/view/KeyEvent.java
+++ b/core/java/android/view/KeyEvent.java
@@ -19,6 +19,7 @@
import static android.view.Display.INVALID_DISPLAY;
import android.annotation.NonNull;
+import android.annotation.Nullable;
import android.annotation.TestApi;
import android.compat.annotation.UnsupportedAppUsage;
import android.os.Build;
@@ -1269,6 +1270,7 @@
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023)
private int mSource;
private int mDisplayId;
+ private @Nullable byte[] mHmac;
@UnsupportedAppUsage
private int mMetaState;
@UnsupportedAppUsage
@@ -1546,6 +1548,7 @@
mDeviceId = origEvent.mDeviceId;
mSource = origEvent.mSource;
mDisplayId = origEvent.mDisplayId;
+ mHmac = origEvent.mHmac == null ? null : origEvent.mHmac.clone();
mScanCode = origEvent.mScanCode;
mFlags = origEvent.mFlags;
mCharacters = origEvent.mCharacters;
@@ -1573,6 +1576,7 @@
mDeviceId = origEvent.mDeviceId;
mSource = origEvent.mSource;
mDisplayId = origEvent.mDisplayId;
+ mHmac = null; // Don't copy HMAC, it will be invalid because eventTime is changing
mScanCode = origEvent.mScanCode;
mFlags = origEvent.mFlags;
mCharacters = origEvent.mCharacters;
@@ -1600,7 +1604,8 @@
*/
public static KeyEvent obtain(long downTime, long eventTime, int action,
int code, int repeat, int metaState,
- int deviceId, int scancode, int flags, int source, int displayId, String characters) {
+ int deviceId, int scancode, int flags, int source, int displayId, @Nullable byte[] hmac,
+ String characters) {
KeyEvent ev = obtain();
ev.mDownTime = downTime;
ev.mEventTime = eventTime;
@@ -1613,6 +1618,7 @@
ev.mFlags = flags;
ev.mSource = source;
ev.mDisplayId = displayId;
+ ev.mHmac = hmac;
ev.mCharacters = characters;
return ev;
}
@@ -1627,7 +1633,7 @@
int code, int repeat, int metaState,
int deviceId, int scancode, int flags, int source, String characters) {
return obtain(downTime, eventTime, action, code, repeat, metaState, deviceId, scancode,
- flags, source, INVALID_DISPLAY, characters);
+ flags, source, INVALID_DISPLAY, null /* hmac */, characters);
}
/**
@@ -1650,6 +1656,7 @@
ev.mFlags = other.mFlags;
ev.mSource = other.mSource;
ev.mDisplayId = other.mDisplayId;
+ ev.mHmac = other.mHmac == null ? null : other.mHmac.clone();
ev.mCharacters = other.mCharacters;
return ev;
}
@@ -1738,6 +1745,7 @@
mDeviceId = origEvent.mDeviceId;
mSource = origEvent.mSource;
mDisplayId = origEvent.mDisplayId;
+ mHmac = null; // Don't copy the hmac, it will be invalid since action is changing
mScanCode = origEvent.mScanCode;
mFlags = origEvent.mFlags;
// Don't copy mCharacters, since one way or the other we'll lose it
@@ -3091,6 +3099,7 @@
mDeviceId = in.readInt();
mSource = in.readInt();
mDisplayId = in.readInt();
+ mHmac = in.createByteArray();
mAction = in.readInt();
mKeyCode = in.readInt();
mRepeatCount = in.readInt();
@@ -3109,6 +3118,7 @@
out.writeInt(mDeviceId);
out.writeInt(mSource);
out.writeInt(mDisplayId);
+ out.writeByteArray(mHmac);
out.writeInt(mAction);
out.writeInt(mKeyCode);
out.writeInt(mRepeatCount);
diff --git a/core/java/android/view/WindowManagerGlobal.java b/core/java/android/view/WindowManagerGlobal.java
index d39c3c0..f03c4e7 100644
--- a/core/java/android/view/WindowManagerGlobal.java
+++ b/core/java/android/view/WindowManagerGlobal.java
@@ -29,7 +29,6 @@
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.SystemProperties;
-import android.provider.DeviceConfig;
import android.util.AndroidRuntimeException;
import android.util.ArraySet;
import android.util.Log;
@@ -63,10 +62,7 @@
* This flag controls whether ViewRootImpl will utilize the Blast Adapter
* to send buffer updates to SurfaceFlinger
*/
- public static final boolean USE_BLAST_ADAPTER =
- SystemProperties.getBoolean(String.join(".", "persist.device_config",
- DeviceConfig.NAMESPACE_WINDOW_MANAGER_NATIVE_BOOT,
- WM_USE_BLAST_ADAPTER_FLAG), false);
+ public static final boolean USE_BLAST_ADAPTER = false;
/**
* The user is navigating with keys (not the touch screen), so
diff --git a/core/java/com/android/internal/config/sysui/SystemUiDeviceConfigFlags.java b/core/java/com/android/internal/config/sysui/SystemUiDeviceConfigFlags.java
index 5103e5f..b232efc 100644
--- a/core/java/com/android/internal/config/sysui/SystemUiDeviceConfigFlags.java
+++ b/core/java/com/android/internal/config/sysui/SystemUiDeviceConfigFlags.java
@@ -367,7 +367,8 @@
/**
* (boolean) Whether to force the Nav Bar handle to remain visible over the lockscreen.
*/
- public static final String NAV_BAR_HANDLE_SHOW_OVER_LOCKSCREEN = "nav_bar_handle_show_over_lockscreen";
+ public static final String NAV_BAR_HANDLE_SHOW_OVER_LOCKSCREEN =
+ "nav_bar_handle_show_over_lockscreen";
private SystemUiDeviceConfigFlags() {
}
diff --git a/core/java/com/android/internal/util/ConnectivityUtil.java b/core/java/com/android/internal/util/LocationPermissionChecker.java
similarity index 71%
rename from core/java/com/android/internal/util/ConnectivityUtil.java
rename to core/java/com/android/internal/util/LocationPermissionChecker.java
index 799352b..2db0e99 100644
--- a/core/java/com/android/internal/util/ConnectivityUtil.java
+++ b/core/java/com/android/internal/util/LocationPermissionChecker.java
@@ -33,28 +33,59 @@
/**
- * Utility methods for common functionality using by different networks.
+ * The methods used for location permission and location mode checking.
*
* @hide
*/
-public class ConnectivityUtil {
+public class LocationPermissionChecker {
- private static final String TAG = "ConnectivityUtil";
+ private static final String TAG = "LocationPermissionChecker";
private final Context mContext;
- private final AppOpsManager mAppOps;
+ private final AppOpsManager mAppOpsManager;
private final UserManager mUserManager;
+ private final LocationManager mLocationManager;
- public ConnectivityUtil(Context context) {
+ public LocationPermissionChecker(Context context) {
mContext = context;
- mAppOps = (AppOpsManager) mContext.getSystemService(Context.APP_OPS_SERVICE);
+ mAppOpsManager = (AppOpsManager) mContext.getSystemService(Context.APP_OPS_SERVICE);
mUserManager = (UserManager) mContext.getSystemService(Context.USER_SERVICE);
+ mLocationManager =
+ (LocationManager) context.getSystemService(Context.LOCATION_SERVICE);
}
/**
- * API to determine if the caller has fine/coarse location permission (depending on
- * config/targetSDK level) and the location mode is enabled for the user. SecurityException is
- * thrown if the caller has no permission or the location mode is disabled.
+ * Check location permission granted by the caller.
+ *
+ * This API check if the location mode enabled for the caller and the caller has
+ * ACCESS_COARSE_LOCATION permission is targetSDK<29, otherwise, has ACCESS_FINE_LOCATION.
+ *
+ * @param pkgName package name of the application requesting access
+ * @param featureId The feature in the package
+ * @param uid The uid of the package
+ * @param message A message describing why the permission was checked. Only needed if this is
+ * not inside of a two-way binder call from the data receiver
+ *
+ * @return {@code true} returns if the caller has location permission and the location mode is
+ * enabled.
+ */
+ public boolean checkLocationPermission(String pkgName, @Nullable String featureId,
+ int uid, @Nullable String message) {
+ try {
+ enforceLocationPermission(pkgName, featureId, uid, message);
+ return true;
+ } catch (SecurityException e) {
+ return false;
+ }
+ }
+
+ /**
+ * Enforce the caller has location permission.
+ *
+ * This API determines if the location mode enabled for the caller and the caller has
+ * ACCESS_COARSE_LOCATION permission is targetSDK<29, otherwise, has ACCESS_FINE_LOCATION.
+ * SecurityException is thrown if the caller has no permission or the location mode is disabled.
+ *
* @param pkgName package name of the application requesting access
* @param featureId The feature in the package
* @param uid The uid of the package
@@ -62,31 +93,21 @@
* not inside of a two-way binder call from the data receiver
*/
public void enforceLocationPermission(String pkgName, @Nullable String featureId, int uid,
- @Nullable String message)
- throws SecurityException {
+ @Nullable String message) throws SecurityException {
+
checkPackage(uid, pkgName);
// Location mode must be enabled
if (!isLocationModeEnabled()) {
- // Location mode is disabled, scan results cannot be returned
throw new SecurityException("Location mode is disabled for the device");
}
// LocationAccess by App: caller must have Coarse/Fine Location permission to have access to
// location information.
- boolean canAppPackageUseLocation = checkCallersLocationPermission(pkgName, featureId,
- uid, /* coarseForTargetSdkLessThanQ */ true, message);
-
- // If neither caller or app has location access, there is no need to check
- // any other permissions. Deny access to scan results.
- if (!canAppPackageUseLocation) {
+ if (!checkCallersLocationPermission(pkgName, featureId,
+ uid, /* coarseForTargetSdkLessThanQ */ true, message)) {
throw new SecurityException("UID " + uid + " has no location permission");
}
- // If the User or profile is current, permission is granted
- // Otherwise, uid must have INTERACT_ACROSS_USERS_FULL permission.
- if (!isCurrentProfile(uid) && !checkInteractAcrossUsersFull(uid)) {
- throw new SecurityException("UID " + uid + " profile not permitted");
- }
}
/**
@@ -104,6 +125,7 @@
*/
public boolean checkCallersLocationPermission(String pkgName, @Nullable String featureId,
int uid, boolean coarseForTargetSdkLessThanQ, @Nullable String message) {
+
boolean isTargetSdkLessThanQ = isTargetSdkLessThan(pkgName, Build.VERSION_CODES.Q, uid);
String permissionType = Manifest.permission.ACCESS_FINE_LOCATION;
@@ -111,8 +133,7 @@
// Having FINE permission implies having COARSE permission (but not the reverse)
permissionType = Manifest.permission.ACCESS_COARSE_LOCATION;
}
- if (getUidPermission(permissionType, uid)
- == PackageManager.PERMISSION_DENIED) {
+ if (getUidPermission(permissionType, uid) == PackageManager.PERMISSION_DENIED) {
return false;
}
@@ -134,10 +155,8 @@
* Retrieves a handle to LocationManager (if not already done) and check if location is enabled.
*/
public boolean isLocationModeEnabled() {
- LocationManager locationManager =
- (LocationManager) mContext.getSystemService(Context.LOCATION_SERVICE);
try {
- return locationManager.isLocationEnabledForUser(UserHandle.of(
+ return mLocationManager.isLocationEnabledForUser(UserHandle.of(
getCurrentUser()));
} catch (Exception e) {
Log.e(TAG, "Failure to get location mode via API, falling back to settings", e);
@@ -166,27 +185,16 @@
private boolean noteAppOpAllowed(String op, String pkgName, @Nullable String featureId,
int uid, @Nullable String message) {
- return mAppOps.noteOp(op, uid, pkgName, featureId, message) == AppOpsManager.MODE_ALLOWED;
+ return mAppOpsManager.noteOp(op, uid, pkgName, featureId, message)
+ == AppOpsManager.MODE_ALLOWED;
}
- private void checkPackage(int uid, String pkgName) throws SecurityException {
+ private void checkPackage(int uid, String pkgName)
+ throws SecurityException {
if (pkgName == null) {
throw new SecurityException("Checking UID " + uid + " but Package Name is Null");
}
- mAppOps.checkPackage(uid, pkgName);
- }
-
- private boolean isCurrentProfile(int uid) {
- UserHandle currentUser = UserHandle.of(getCurrentUser());
- UserHandle callingUser = UserHandle.getUserHandleForUid(uid);
- return currentUser.equals(callingUser)
- || mUserManager.isSameProfileGroup(currentUser, callingUser);
- }
-
- private boolean checkInteractAcrossUsersFull(int uid) {
- return getUidPermission(
- android.Manifest.permission.INTERACT_ACROSS_USERS_FULL, uid)
- == PackageManager.PERMISSION_GRANTED;
+ mAppOpsManager.checkPackage(uid, pkgName);
}
@VisibleForTesting
diff --git a/core/jni/android/graphics/Bitmap.cpp b/core/jni/android/graphics/Bitmap.cpp
index eb7d432..30e914d 100755
--- a/core/jni/android/graphics/Bitmap.cpp
+++ b/core/jni/android/graphics/Bitmap.cpp
@@ -34,7 +34,6 @@
#include <string>
#define DEBUG_PARCEL 0
-#define ASHMEM_BITMAP_MIN_SIZE (128 * (1 << 10))
static jclass gBitmap_class;
static jfieldID gBitmap_nativePtr;
@@ -587,7 +586,6 @@
android::Parcel* p = android::parcelForJavaObject(env, parcel);
- const bool isMutable = p->readInt32() != 0;
const SkColorType colorType = (SkColorType)p->readInt32();
const SkAlphaType alphaType = (SkAlphaType)p->readInt32();
const uint32_t colorSpaceSize = p->readUint32();
@@ -636,11 +634,10 @@
// Map the bitmap in place from the ashmem region if possible otherwise copy.
sk_sp<Bitmap> nativeBitmap;
- if (blob.fd() >= 0 && (blob.isMutable() || !isMutable) && (size >= ASHMEM_BITMAP_MIN_SIZE)) {
+ if (blob.fd() >= 0 && !blob.isMutable()) {
#if DEBUG_PARCEL
- ALOGD("Bitmap.createFromParcel: mapped contents of %s bitmap from %s blob "
+ ALOGD("Bitmap.createFromParcel: mapped contents of bitmap from %s blob "
"(fds %s)",
- isMutable ? "mutable" : "immutable",
blob.isMutable() ? "mutable" : "immutable",
p->allowFds() ? "allowed" : "forbidden");
#endif
@@ -657,7 +654,7 @@
// Map the pixels in place and take ownership of the ashmem region. We must also respect the
// rowBytes value already set on the bitmap instead of attempting to compute our own.
nativeBitmap = Bitmap::createFrom(bitmap->info(), bitmap->rowBytes(), dupFd,
- const_cast<void*>(blob.data()), size, !isMutable);
+ const_cast<void*>(blob.data()), size, true);
if (!nativeBitmap) {
close(dupFd);
blob.release();
@@ -695,7 +692,7 @@
}
return createBitmap(env, nativeBitmap.release(),
- getPremulBitmapCreateFlags(isMutable), NULL, NULL, density);
+ getPremulBitmapCreateFlags(false), NULL, NULL, density);
#else
doThrowRE(env, "Cannot use parcels outside of Android");
return NULL;
@@ -703,9 +700,7 @@
}
static jboolean Bitmap_writeToParcel(JNIEnv* env, jobject,
- jlong bitmapHandle,
- jboolean isMutable, jint density,
- jobject parcel) {
+ jlong bitmapHandle, jint density, jobject parcel) {
#ifdef __ANDROID__ // Layoutlib does not support parcel
if (parcel == NULL) {
SkDebugf("------- writeToParcel null parcel\n");
@@ -718,7 +713,6 @@
auto bitmapWrapper = reinterpret_cast<BitmapWrapper*>(bitmapHandle);
bitmapWrapper->getSkBitmap(&bitmap);
- p->writeInt32(isMutable);
p->writeInt32(bitmap.colorType());
p->writeInt32(bitmap.alphaType());
SkColorSpace* colorSpace = bitmap.colorSpace();
@@ -745,7 +739,7 @@
// Transfer the underlying ashmem region if we have one and it's immutable.
android::status_t status;
int fd = bitmapWrapper->bitmap().getAshmemFd();
- if (fd >= 0 && !isMutable && p->allowFds()) {
+ if (fd >= 0 && p->allowFds()) {
#if DEBUG_PARCEL
ALOGD("Bitmap.writeToParcel: transferring immutable bitmap's ashmem fd as "
"immutable blob (fds %s)",
@@ -761,17 +755,14 @@
}
// Copy the bitmap to a new blob.
- bool mutableCopy = isMutable;
#if DEBUG_PARCEL
- ALOGD("Bitmap.writeToParcel: copying %s bitmap into new %s blob (fds %s)",
- isMutable ? "mutable" : "immutable",
- mutableCopy ? "mutable" : "immutable",
+ ALOGD("Bitmap.writeToParcel: copying bitmap into new blob (fds %s)",
p->allowFds() ? "allowed" : "forbidden");
#endif
size_t size = bitmap.computeByteSize();
android::Parcel::WritableBlob blob;
- status = p->writeBlob(size, mutableCopy, &blob);
+ status = p->writeBlob(size, false, &blob);
if (status) {
doThrowRE(env, "Could not copy bitmap to parcel blob.");
return JNI_FALSE;
@@ -1109,7 +1100,7 @@
{ "nativeCreateFromParcel",
"(Landroid/os/Parcel;)Landroid/graphics/Bitmap;",
(void*)Bitmap_createFromParcel },
- { "nativeWriteToParcel", "(JZILandroid/os/Parcel;)Z",
+ { "nativeWriteToParcel", "(JILandroid/os/Parcel;)Z",
(void*)Bitmap_writeToParcel },
{ "nativeExtractAlpha", "(JJ[I)Landroid/graphics/Bitmap;",
(void*)Bitmap_extractAlpha },
diff --git a/core/jni/android_view_InputEventSender.cpp b/core/jni/android_view_InputEventSender.cpp
index f90d1cf..84acf9a 100644
--- a/core/jni/android_view_InputEventSender.cpp
+++ b/core/jni/android_view_InputEventSender.cpp
@@ -113,10 +113,13 @@
}
uint32_t publishedSeq = mNextPublishedSeq++;
- status_t status = mInputPublisher.publishKeyEvent(publishedSeq,
- event->getDeviceId(), event->getSource(), event->getDisplayId(), event->getAction(),
- event->getFlags(), event->getKeyCode(), event->getScanCode(), event->getMetaState(),
- event->getRepeatCount(), event->getDownTime(), event->getEventTime());
+ status_t status =
+ mInputPublisher.publishKeyEvent(publishedSeq, event->getDeviceId(), event->getSource(),
+ event->getDisplayId(), event->getHmac(),
+ event->getAction(), event->getFlags(),
+ event->getKeyCode(), event->getScanCode(),
+ event->getMetaState(), event->getRepeatCount(),
+ event->getDownTime(), event->getEventTime());
if (status) {
ALOGW("Failed to send key event on channel '%s'. status=%d",
getInputChannelName().c_str(), status);
@@ -134,17 +137,24 @@
uint32_t publishedSeq;
for (size_t i = 0; i <= event->getHistorySize(); i++) {
publishedSeq = mNextPublishedSeq++;
- status_t status = mInputPublisher.publishMotionEvent(publishedSeq,
- event->getDeviceId(), event->getSource(), event->getDisplayId(),
- event->getAction(), event->getActionButton(), event->getFlags(),
- event->getEdgeFlags(), event->getMetaState(), event->getButtonState(),
- event->getClassification(),
- event->getXOffset(), event->getYOffset(),
- event->getXPrecision(), event->getYPrecision(),
- event->getRawXCursorPosition(), event->getRawYCursorPosition(),
- event->getDownTime(), event->getHistoricalEventTime(i),
- event->getPointerCount(), event->getPointerProperties(),
- event->getHistoricalRawPointerCoords(0, i));
+ status_t status =
+ mInputPublisher.publishMotionEvent(publishedSeq, event->getDeviceId(),
+ event->getSource(), event->getDisplayId(),
+ event->getHmac(), event->getAction(),
+ event->getActionButton(), event->getFlags(),
+ event->getEdgeFlags(), event->getMetaState(),
+ event->getButtonState(),
+ event->getClassification(), event->getXScale(),
+ event->getYScale(), event->getXOffset(),
+ event->getYOffset(), event->getXPrecision(),
+ event->getYPrecision(),
+ event->getRawXCursorPosition(),
+ event->getRawYCursorPosition(),
+ event->getDownTime(),
+ event->getHistoricalEventTime(i),
+ event->getPointerCount(),
+ event->getPointerProperties(),
+ event->getHistoricalRawPointerCoords(0, i));
if (status) {
ALOGW("Failed to send motion event sample on channel '%s'. status=%d",
getInputChannelName().c_str(), status);
diff --git a/core/jni/android_view_KeyEvent.cpp b/core/jni/android_view_KeyEvent.cpp
index f010772..57979bd 100644
--- a/core/jni/android_view_KeyEvent.cpp
+++ b/core/jni/android_view_KeyEvent.cpp
@@ -20,15 +20,53 @@
#include <android_runtime/AndroidRuntime.h>
#include <android_runtime/Log.h>
-#include <utils/Log.h>
#include <input/Input.h>
+#include <nativehelper/ScopedPrimitiveArray.h>
#include <nativehelper/ScopedUtfChars.h>
+#include <utils/Log.h>
+#include <optional>
#include "android_view_KeyEvent.h"
#include "core_jni_helpers.h"
namespace android {
+/**
+ * Convert an std::array of bytes into a Java object.
+ */
+template <size_t N>
+static ScopedLocalRef<jbyteArray> toJbyteArray(JNIEnv* env, const std::array<uint8_t, N>& data) {
+ ScopedLocalRef<jbyteArray> array(env, env->NewByteArray(N));
+ if (array.get() == nullptr) {
+ jniThrowException(env, "java/lang/OutOfMemoryError", nullptr);
+ return array;
+ }
+ static_assert(sizeof(char) == sizeof(uint8_t));
+ env->SetByteArrayRegion(array.get(), 0, N, reinterpret_cast<const signed char*>(data.data()));
+ return array;
+}
+
+/**
+ * Convert a Java object into an std::array of bytes of size N.
+ * If the object is null, or the length is unexpected, return std::nullopt.
+ */
+template <size_t N>
+static std::optional<std::array<uint8_t, N>> fromJobject(JNIEnv* env, jobject object) {
+ if (object == nullptr) {
+ return std::nullopt;
+ }
+ jbyteArray javaArray = reinterpret_cast<jbyteArray>(object);
+ ScopedByteArrayRO bytes(env, javaArray);
+ if (bytes.size() != N) {
+ ALOGE("Could not initialize array from java object, expected length %zu but got %zu", N,
+ bytes.size());
+ return std::nullopt;
+ }
+ std::array<uint8_t, N> array;
+ std::move(bytes.get(), bytes.get() + N, array.begin());
+ return array;
+}
+
// ----------------------------------------------------------------------------
static struct {
@@ -40,6 +78,7 @@
jfieldID mDeviceId;
jfieldID mSource;
jfieldID mDisplayId;
+ jfieldID mHmac;
jfieldID mMetaState;
jfieldID mAction;
jfieldID mKeyCode;
@@ -54,20 +93,16 @@
// ----------------------------------------------------------------------------
jobject android_view_KeyEvent_fromNative(JNIEnv* env, const KeyEvent* event) {
- jobject eventObj = env->CallStaticObjectMethod(gKeyEventClassInfo.clazz,
- gKeyEventClassInfo.obtain,
- nanoseconds_to_milliseconds(event->getDownTime()),
- nanoseconds_to_milliseconds(event->getEventTime()),
- event->getAction(),
- event->getKeyCode(),
- event->getRepeatCount(),
- event->getMetaState(),
- event->getDeviceId(),
- event->getScanCode(),
- event->getFlags(),
- event->getSource(),
- event->getDisplayId(),
- NULL);
+ ScopedLocalRef<jbyteArray> hmac = toJbyteArray(env, event->getHmac());
+ jobject eventObj =
+ env->CallStaticObjectMethod(gKeyEventClassInfo.clazz, gKeyEventClassInfo.obtain,
+ nanoseconds_to_milliseconds(event->getDownTime()),
+ nanoseconds_to_milliseconds(event->getEventTime()),
+ event->getAction(), event->getKeyCode(),
+ event->getRepeatCount(), event->getMetaState(),
+ event->getDeviceId(), event->getScanCode(),
+ event->getFlags(), event->getSource(),
+ event->getDisplayId(), hmac.get(), NULL);
if (env->ExceptionCheck()) {
ALOGE("An exception occurred while obtaining a key event.");
LOGE_EX(env);
@@ -82,6 +117,11 @@
jint deviceId = env->GetIntField(eventObj, gKeyEventClassInfo.mDeviceId);
jint source = env->GetIntField(eventObj, gKeyEventClassInfo.mSource);
jint displayId = env->GetIntField(eventObj, gKeyEventClassInfo.mDisplayId);
+ jobject hmacObj = env->GetObjectField(eventObj, gKeyEventClassInfo.mHmac);
+ std::optional<std::array<uint8_t, 32>> hmac = fromJobject<32>(env, hmacObj);
+ if (!hmac) {
+ hmac = INVALID_HMAC;
+ }
jint metaState = env->GetIntField(eventObj, gKeyEventClassInfo.mMetaState);
jint action = env->GetIntField(eventObj, gKeyEventClassInfo.mAction);
jint keyCode = env->GetIntField(eventObj, gKeyEventClassInfo.mKeyCode);
@@ -91,10 +131,9 @@
jlong downTime = env->GetLongField(eventObj, gKeyEventClassInfo.mDownTime);
jlong eventTime = env->GetLongField(eventObj, gKeyEventClassInfo.mEventTime);
- event->initialize(deviceId, source, displayId, action, flags, keyCode, scanCode, metaState,
- repeatCount,
- milliseconds_to_nanoseconds(downTime),
- milliseconds_to_nanoseconds(eventTime));
+ event->initialize(deviceId, source, displayId, *hmac, action, flags, keyCode, scanCode,
+ metaState, repeatCount, milliseconds_to_nanoseconds(downTime),
+ milliseconds_to_nanoseconds(eventTime));
return OK;
}
@@ -134,8 +173,9 @@
jclass clazz = FindClassOrDie(env, "android/view/KeyEvent");
gKeyEventClassInfo.clazz = MakeGlobalRefOrDie(env, clazz);
- gKeyEventClassInfo.obtain = GetStaticMethodIDOrDie(env, gKeyEventClassInfo.clazz,
- "obtain", "(JJIIIIIIIIILjava/lang/String;)Landroid/view/KeyEvent;");
+ gKeyEventClassInfo.obtain =
+ GetStaticMethodIDOrDie(env, gKeyEventClassInfo.clazz, "obtain",
+ "(JJIIIIIIIII[BLjava/lang/String;)Landroid/view/KeyEvent;");
gKeyEventClassInfo.recycle = GetMethodIDOrDie(env, gKeyEventClassInfo.clazz,
"recycle", "()V");
@@ -143,6 +183,7 @@
gKeyEventClassInfo.mSource = GetFieldIDOrDie(env, gKeyEventClassInfo.clazz, "mSource", "I");
gKeyEventClassInfo.mDisplayId = GetFieldIDOrDie(env, gKeyEventClassInfo.clazz, "mDisplayId",
"I");
+ gKeyEventClassInfo.mHmac = GetFieldIDOrDie(env, gKeyEventClassInfo.clazz, "mHmac", "[B");
gKeyEventClassInfo.mMetaState = GetFieldIDOrDie(env, gKeyEventClassInfo.clazz, "mMetaState",
"I");
gKeyEventClassInfo.mAction = GetFieldIDOrDie(env, gKeyEventClassInfo.clazz, "mAction", "I");
diff --git a/core/jni/android_view_KeyEvent.h b/core/jni/android_view_KeyEvent.h
index 586eb2f..dab6bb7 100644
--- a/core/jni/android_view_KeyEvent.h
+++ b/core/jni/android_view_KeyEvent.h
@@ -42,4 +42,4 @@
} // namespace android
-#endif // _ANDROID_OS_KEYEVENT_H
+#endif // _ANDROID_VIEW_KEYEVENT_H
diff --git a/core/jni/android_view_MotionEvent.cpp b/core/jni/android_view_MotionEvent.cpp
index feb9fe3..3335fb2 100644
--- a/core/jni/android_view_MotionEvent.cpp
+++ b/core/jni/android_view_MotionEvent.cpp
@@ -330,14 +330,12 @@
// ----------------------------------------------------------------------------
-static jlong android_view_MotionEvent_nativeInitialize(JNIEnv* env, jclass clazz,
- jlong nativePtr,
- jint deviceId, jint source, jint displayId, jint action, jint flags, jint edgeFlags,
- jint metaState, jint buttonState, jint classification,
- jfloat xOffset, jfloat yOffset, jfloat xPrecision, jfloat yPrecision,
- jlong downTimeNanos, jlong eventTimeNanos,
- jint pointerCount, jobjectArray pointerPropertiesObjArray,
- jobjectArray pointerCoordsObjArray) {
+static jlong android_view_MotionEvent_nativeInitialize(
+ JNIEnv* env, jclass clazz, jlong nativePtr, jint deviceId, jint source, jint displayId,
+ jint action, jint flags, jint edgeFlags, jint metaState, jint buttonState,
+ jint classification, jfloat xOffset, jfloat yOffset, jfloat xPrecision, jfloat yPrecision,
+ jlong downTimeNanos, jlong eventTimeNanos, jint pointerCount,
+ jobjectArray pointerPropertiesObjArray, jobjectArray pointerCoordsObjArray) {
if (!validatePointerCount(env, pointerCount)
|| !validatePointerPropertiesArray(env, pointerPropertiesObjArray, pointerCount)
|| !validatePointerCoordsObjArray(env, pointerCoordsObjArray, pointerCount)) {
@@ -371,11 +369,12 @@
env->DeleteLocalRef(pointerCoordsObj);
}
- event->initialize(deviceId, source, displayId, action, 0, flags, edgeFlags, metaState,
- buttonState, static_cast<MotionClassification>(classification),
- xOffset, yOffset, xPrecision, yPrecision,
- AMOTION_EVENT_INVALID_CURSOR_POSITION, AMOTION_EVENT_INVALID_CURSOR_POSITION,
- downTimeNanos, eventTimeNanos, pointerCount, pointerProperties, rawPointerCoords);
+ event->initialize(deviceId, source, displayId, INVALID_HMAC, action, 0, flags, edgeFlags,
+ metaState, buttonState, static_cast<MotionClassification>(classification),
+ 1 /*xScale*/, 1 /*yScale*/, xOffset, yOffset, xPrecision, yPrecision,
+ AMOTION_EVENT_INVALID_CURSOR_POSITION, AMOTION_EVENT_INVALID_CURSOR_POSITION,
+ downTimeNanos, eventTimeNanos, pointerCount, pointerProperties,
+ rawPointerCoords);
return reinterpret_cast<jlong>(event);
@@ -757,155 +756,76 @@
// ----------------------------------------------------------------------------
static const JNINativeMethod gMotionEventMethods[] = {
- /* name, signature, funcPtr */
- { "nativeInitialize",
- "(JIIIIIIIIIFFFFJJI[Landroid/view/MotionEvent$PointerProperties;"
- "[Landroid/view/MotionEvent$PointerCoords;)J",
- (void*)android_view_MotionEvent_nativeInitialize },
- { "nativeDispose",
- "(J)V",
- (void*)android_view_MotionEvent_nativeDispose },
- { "nativeAddBatch",
- "(JJ[Landroid/view/MotionEvent$PointerCoords;I)V",
- (void*)android_view_MotionEvent_nativeAddBatch },
- { "nativeReadFromParcel",
- "(JLandroid/os/Parcel;)J",
- (void*)android_view_MotionEvent_nativeReadFromParcel },
- { "nativeWriteToParcel",
- "(JLandroid/os/Parcel;)V",
- (void*)android_view_MotionEvent_nativeWriteToParcel },
- { "nativeAxisToString", "(I)Ljava/lang/String;",
- (void*)android_view_MotionEvent_nativeAxisToString },
- { "nativeAxisFromString", "(Ljava/lang/String;)I",
- (void*)android_view_MotionEvent_nativeAxisFromString },
- { "nativeGetPointerProperties",
- "(JILandroid/view/MotionEvent$PointerProperties;)V",
- (void*)android_view_MotionEvent_nativeGetPointerProperties },
- { "nativeGetPointerCoords",
- "(JIILandroid/view/MotionEvent$PointerCoords;)V",
- (void*)android_view_MotionEvent_nativeGetPointerCoords },
+ /* name, signature, funcPtr */
+ {"nativeInitialize",
+ "(JIIIIIIIIIFFFFJJI[Landroid/view/MotionEvent$PointerProperties;"
+ "[Landroid/view/MotionEvent$PointerCoords;)J",
+ (void*)android_view_MotionEvent_nativeInitialize},
+ {"nativeDispose", "(J)V", (void*)android_view_MotionEvent_nativeDispose},
+ {"nativeAddBatch", "(JJ[Landroid/view/MotionEvent$PointerCoords;I)V",
+ (void*)android_view_MotionEvent_nativeAddBatch},
+ {"nativeReadFromParcel", "(JLandroid/os/Parcel;)J",
+ (void*)android_view_MotionEvent_nativeReadFromParcel},
+ {"nativeWriteToParcel", "(JLandroid/os/Parcel;)V",
+ (void*)android_view_MotionEvent_nativeWriteToParcel},
+ {"nativeAxisToString", "(I)Ljava/lang/String;",
+ (void*)android_view_MotionEvent_nativeAxisToString},
+ {"nativeAxisFromString", "(Ljava/lang/String;)I",
+ (void*)android_view_MotionEvent_nativeAxisFromString},
+ {"nativeGetPointerProperties", "(JILandroid/view/MotionEvent$PointerProperties;)V",
+ (void*)android_view_MotionEvent_nativeGetPointerProperties},
+ {"nativeGetPointerCoords", "(JIILandroid/view/MotionEvent$PointerCoords;)V",
+ (void*)android_view_MotionEvent_nativeGetPointerCoords},
- // --------------- @FastNative ----------------------
- { "nativeGetPointerId",
- "(JI)I",
- (void*)android_view_MotionEvent_nativeGetPointerId },
- { "nativeGetToolType",
- "(JI)I",
- (void*)android_view_MotionEvent_nativeGetToolType },
- { "nativeGetEventTimeNanos",
- "(JI)J",
- (void*)android_view_MotionEvent_nativeGetEventTimeNanos },
- { "nativeGetRawAxisValue",
- "(JIII)F",
- (void*)android_view_MotionEvent_nativeGetRawAxisValue },
- { "nativeGetAxisValue",
- "(JIII)F",
- (void*)android_view_MotionEvent_nativeGetAxisValue },
- { "nativeTransform",
- "(JLandroid/graphics/Matrix;)V",
- (void*)android_view_MotionEvent_nativeTransform },
+ // --------------- @FastNative ----------------------
+ {"nativeGetPointerId", "(JI)I", (void*)android_view_MotionEvent_nativeGetPointerId},
+ {"nativeGetToolType", "(JI)I", (void*)android_view_MotionEvent_nativeGetToolType},
+ {"nativeGetEventTimeNanos", "(JI)J",
+ (void*)android_view_MotionEvent_nativeGetEventTimeNanos},
+ {"nativeGetRawAxisValue", "(JIII)F", (void*)android_view_MotionEvent_nativeGetRawAxisValue},
+ {"nativeGetAxisValue", "(JIII)F", (void*)android_view_MotionEvent_nativeGetAxisValue},
+ {"nativeTransform", "(JLandroid/graphics/Matrix;)V",
+ (void*)android_view_MotionEvent_nativeTransform},
- // --------------- @CriticalNative ------------------
+ // --------------- @CriticalNative ------------------
- { "nativeCopy",
- "(JJZ)J",
- (void*)android_view_MotionEvent_nativeCopy },
- { "nativeGetDeviceId",
- "(J)I",
- (void*)android_view_MotionEvent_nativeGetDeviceId },
- { "nativeGetSource",
- "(J)I",
- (void*)android_view_MotionEvent_nativeGetSource },
- { "nativeSetSource",
- "(JI)V",
- (void*)android_view_MotionEvent_nativeSetSource },
- { "nativeGetDisplayId",
- "(J)I",
- (void*)android_view_MotionEvent_nativeGetDisplayId },
- { "nativeSetDisplayId",
- "(JI)V",
- (void*)android_view_MotionEvent_nativeSetDisplayId },
- { "nativeGetAction",
- "(J)I",
- (void*)android_view_MotionEvent_nativeGetAction },
- { "nativeSetAction",
- "(JI)V",
- (void*)android_view_MotionEvent_nativeSetAction },
- { "nativeGetActionButton",
- "(J)I",
- (void*)android_view_MotionEvent_nativeGetActionButton},
- { "nativeSetActionButton",
- "(JI)V",
- (void*)android_view_MotionEvent_nativeSetActionButton},
- { "nativeIsTouchEvent",
- "(J)Z",
- (void*)android_view_MotionEvent_nativeIsTouchEvent },
- { "nativeGetFlags",
- "(J)I",
- (void*)android_view_MotionEvent_nativeGetFlags },
- { "nativeSetFlags",
- "(JI)V",
- (void*)android_view_MotionEvent_nativeSetFlags },
- { "nativeGetEdgeFlags",
- "(J)I",
- (void*)android_view_MotionEvent_nativeGetEdgeFlags },
- { "nativeSetEdgeFlags",
- "(JI)V",
- (void*)android_view_MotionEvent_nativeSetEdgeFlags },
- { "nativeGetMetaState",
- "(J)I",
- (void*)android_view_MotionEvent_nativeGetMetaState },
- { "nativeGetButtonState",
- "(J)I",
- (void*)android_view_MotionEvent_nativeGetButtonState },
- { "nativeSetButtonState",
- "(JI)V",
- (void*)android_view_MotionEvent_nativeSetButtonState },
- { "nativeGetClassification",
- "(J)I",
- (void*)android_view_MotionEvent_nativeGetClassification },
- { "nativeOffsetLocation",
- "(JFF)V",
- (void*)android_view_MotionEvent_nativeOffsetLocation },
- { "nativeGetXOffset",
- "(J)F",
- (void*)android_view_MotionEvent_nativeGetXOffset },
- { "nativeGetYOffset",
- "(J)F",
- (void*)android_view_MotionEvent_nativeGetYOffset },
- { "nativeGetXPrecision",
- "(J)F",
- (void*)android_view_MotionEvent_nativeGetXPrecision },
- { "nativeGetYPrecision",
- "(J)F",
- (void*)android_view_MotionEvent_nativeGetYPrecision },
- { "nativeGetXCursorPosition",
- "(J)F",
- (void*)android_view_MotionEvent_nativeGetXCursorPosition },
- { "nativeGetYCursorPosition",
- "(J)F",
- (void*)android_view_MotionEvent_nativeGetYCursorPosition },
- { "nativeSetCursorPosition",
- "(JFF)V",
- (void*)android_view_MotionEvent_nativeSetCursorPosition },
- { "nativeGetDownTimeNanos",
- "(J)J",
- (void*)android_view_MotionEvent_nativeGetDownTimeNanos },
- { "nativeSetDownTimeNanos",
- "(JJ)V",
- (void*)android_view_MotionEvent_nativeSetDownTimeNanos },
- { "nativeGetPointerCount",
- "(J)I",
- (void*)android_view_MotionEvent_nativeGetPointerCount },
- { "nativeFindPointerIndex",
- "(JI)I",
- (void*)android_view_MotionEvent_nativeFindPointerIndex },
- { "nativeGetHistorySize",
- "(J)I",
- (void*)android_view_MotionEvent_nativeGetHistorySize },
- { "nativeScale",
- "(JF)V",
- (void*)android_view_MotionEvent_nativeScale },
+ {"nativeCopy", "(JJZ)J", (void*)android_view_MotionEvent_nativeCopy},
+ {"nativeGetDeviceId", "(J)I", (void*)android_view_MotionEvent_nativeGetDeviceId},
+ {"nativeGetSource", "(J)I", (void*)android_view_MotionEvent_nativeGetSource},
+ {"nativeSetSource", "(JI)V", (void*)android_view_MotionEvent_nativeSetSource},
+ {"nativeGetDisplayId", "(J)I", (void*)android_view_MotionEvent_nativeGetDisplayId},
+ {"nativeSetDisplayId", "(JI)V", (void*)android_view_MotionEvent_nativeSetDisplayId},
+ {"nativeGetAction", "(J)I", (void*)android_view_MotionEvent_nativeGetAction},
+ {"nativeSetAction", "(JI)V", (void*)android_view_MotionEvent_nativeSetAction},
+ {"nativeGetActionButton", "(J)I", (void*)android_view_MotionEvent_nativeGetActionButton},
+ {"nativeSetActionButton", "(JI)V", (void*)android_view_MotionEvent_nativeSetActionButton},
+ {"nativeIsTouchEvent", "(J)Z", (void*)android_view_MotionEvent_nativeIsTouchEvent},
+ {"nativeGetFlags", "(J)I", (void*)android_view_MotionEvent_nativeGetFlags},
+ {"nativeSetFlags", "(JI)V", (void*)android_view_MotionEvent_nativeSetFlags},
+ {"nativeGetEdgeFlags", "(J)I", (void*)android_view_MotionEvent_nativeGetEdgeFlags},
+ {"nativeSetEdgeFlags", "(JI)V", (void*)android_view_MotionEvent_nativeSetEdgeFlags},
+ {"nativeGetMetaState", "(J)I", (void*)android_view_MotionEvent_nativeGetMetaState},
+ {"nativeGetButtonState", "(J)I", (void*)android_view_MotionEvent_nativeGetButtonState},
+ {"nativeSetButtonState", "(JI)V", (void*)android_view_MotionEvent_nativeSetButtonState},
+ {"nativeGetClassification", "(J)I",
+ (void*)android_view_MotionEvent_nativeGetClassification},
+ {"nativeOffsetLocation", "(JFF)V", (void*)android_view_MotionEvent_nativeOffsetLocation},
+ {"nativeGetXOffset", "(J)F", (void*)android_view_MotionEvent_nativeGetXOffset},
+ {"nativeGetYOffset", "(J)F", (void*)android_view_MotionEvent_nativeGetYOffset},
+ {"nativeGetXPrecision", "(J)F", (void*)android_view_MotionEvent_nativeGetXPrecision},
+ {"nativeGetYPrecision", "(J)F", (void*)android_view_MotionEvent_nativeGetYPrecision},
+ {"nativeGetXCursorPosition", "(J)F",
+ (void*)android_view_MotionEvent_nativeGetXCursorPosition},
+ {"nativeGetYCursorPosition", "(J)F",
+ (void*)android_view_MotionEvent_nativeGetYCursorPosition},
+ {"nativeSetCursorPosition", "(JFF)V",
+ (void*)android_view_MotionEvent_nativeSetCursorPosition},
+ {"nativeGetDownTimeNanos", "(J)J", (void*)android_view_MotionEvent_nativeGetDownTimeNanos},
+ {"nativeSetDownTimeNanos", "(JJ)V", (void*)android_view_MotionEvent_nativeSetDownTimeNanos},
+ {"nativeGetPointerCount", "(J)I", (void*)android_view_MotionEvent_nativeGetPointerCount},
+ {"nativeFindPointerIndex", "(JI)I", (void*)android_view_MotionEvent_nativeFindPointerIndex},
+ {"nativeGetHistorySize", "(J)I", (void*)android_view_MotionEvent_nativeGetHistorySize},
+ {"nativeScale", "(JF)V", (void*)android_view_MotionEvent_nativeScale},
};
int register_android_view_MotionEvent(JNIEnv* env) {
diff --git a/core/jni/android_view_MotionEvent.h b/core/jni/android_view_MotionEvent.h
index 0cf1fb2..9ce4bf3 100644
--- a/core/jni/android_view_MotionEvent.h
+++ b/core/jni/android_view_MotionEvent.h
@@ -38,4 +38,4 @@
} // namespace android
-#endif // _ANDROID_OS_KEYEVENT_H
+#endif // _ANDROID_VIEW_MOTIONEVENT_H
diff --git a/core/proto/android/server/windowmanagerservice.proto b/core/proto/android/server/windowmanagerservice.proto
index 0c74842..927be50 100644
--- a/core/proto/android/server/windowmanagerservice.proto
+++ b/core/proto/android/server/windowmanagerservice.proto
@@ -147,7 +147,8 @@
optional int32 id = 2;
repeated StackProto stacks = 3;
optional DockedStackDividerControllerProto docked_stack_divider_controller = 4;
- optional PinnedStackControllerProto pinned_stack_controller = 5;
+ // Will be removed soon.
+ optional PinnedStackControllerProto pinned_stack_controller = 5 [deprecated=true];
/* non app windows */
repeated WindowTokenProto above_app_windows = 6;
repeated WindowTokenProto below_app_windows = 7;
@@ -184,8 +185,8 @@
message PinnedStackControllerProto {
option (.android.msg_privacy).dest = DEST_AUTOMATIC;
- optional .android.graphics.RectProto default_bounds = 1;
- optional .android.graphics.RectProto movement_bounds = 2;
+ optional .android.graphics.RectProto default_bounds = 1 [deprecated=true];
+ optional .android.graphics.RectProto movement_bounds = 2 [deprecated=true];
}
/* represents TaskStack */
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 020a835..e9d5b2b 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -3339,6 +3339,13 @@
<permission android:name="android.permission.BIND_AUTOFILL_FIELD_CLASSIFICATION_SERVICE"
android:protectionLevel="signature" />
+ <!-- Must be required by an {@link android.service.autofill.InlineSuggestionRenderService}
+ to ensure that only the system can bind to it.
+ @hide This is not a third-party API (intended for OEMs and system apps).
+ -->
+ <permission android:name="android.permission.BIND_INLINE_SUGGESTION_RENDER_SERVICE"
+ android:protectionLevel="signature" />
+
<!-- Must be required by a android.service.textclassifier.TextClassifierService,
to ensure that only the system can bind to it.
@SystemApi @hide This is not a third-party API (intended for OEMs and system apps).
diff --git a/core/res/res/values-af/strings.xml b/core/res/res/values-af/strings.xml
index de8f55b..c34a485 100644
--- a/core/res/res/values-af/strings.xml
+++ b/core/res/res/values-af/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Jy het jou ontsluitpatroon <xliff:g id="NUMBER_0">%1$d</xliff:g> keer verkeerdelik geteken. Na nog <xliff:g id="NUMBER_1">%2$d</xliff:g> onsuksesvolle pogings, sal jy gevra word om jou foon te ontsluit deur middel van \'n e-posrekening.\n\n Probeer weer oor <xliff:g id="NUMBER_2">%3$d</xliff:g> sekondes."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Verwyder"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Verhoog volume bo aanbevole vlak?\n\nOm lang tydperke teen hoë volume te luister, kan jou gehoor beskadig."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Gebruik toeganklikheidkortpad?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Wanneer die kortpad aan is, sal \'n toeganklikheidkenmerk begin word as albei volumeknoppies 3 sekondes lank gedruk word.\n\n Bestaande toeganklikheidkenmerk:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n Jy kan die kenmerk in Instellings > Toeganklikheid verander."</string>
diff --git a/core/res/res/values-am/strings.xml b/core/res/res/values-am/strings.xml
index ec9abfe..23e6ccd 100644
--- a/core/res/res/values-am/strings.xml
+++ b/core/res/res/values-am/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"የመክፈቻ ስርዓተ ጥለቱን <xliff:g id="NUMBER_0">%1$d</xliff:g> ጊዜ በትክክል አልሳሉትም። ከ<xliff:g id="NUMBER_1">%2$d</xliff:g> ተጨማሪ ያልተሳኩ ሙከራዎች በኋላ የኢሜይል መለያ ተጠቅመው ስልክዎን እንዲከፍቱ ይጠየቃሉ።\n\nእባክዎ ከ<xliff:g id="NUMBER_2">%3$d</xliff:g> ሰከንዶች በኋላ እንደገና ይሞክሩ።"</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"አስወግድ"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"ድምጹ ከሚመከረው መጠን በላይ ከፍ ይበል?\n\nበከፍተኛ ድምጽ ለረጅም ጊዜ ማዳመጥ ጆሮዎን ሊጎዳው ይችላል።"</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"የተደራሽነት አቋራጭ ጥቅም ላይ ይዋል?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"አቋራጩ ሲበራ ሁለቱንም የድምፅ አዝራሮች ለ3 ሰከንዶች ተጭኖ መቆየት የተደራሽነት ባህሪን ያስጀምረዋል።\n\n አሁን ያለ የተደራሽነት ባህሪ፦\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n ባህሪውን በቅንብሮች > ተደራሽነት ውስጥ ሊለውጡት ይችላሉ።"</string>
diff --git a/core/res/res/values-ar/strings.xml b/core/res/res/values-ar/strings.xml
index 0d70a11..80c04eb 100644
--- a/core/res/res/values-ar/strings.xml
+++ b/core/res/res/values-ar/strings.xml
@@ -222,7 +222,7 @@
<string name="reboot_to_update_prepare" msgid="6978842143587422365">"جارٍ الإعداد للتحديث…"</string>
<string name="reboot_to_update_package" msgid="4644104795527534811">"جارٍ معالجة حزمة التحديث…"</string>
<string name="reboot_to_update_reboot" msgid="4474726009984452312">"جارٍ إعادة التشغيل…"</string>
- <string name="reboot_to_reset_title" msgid="2226229680017882787">"إعادة الضبط بحسب بيانات المصنع"</string>
+ <string name="reboot_to_reset_title" msgid="2226229680017882787">"إعادة الضبط على الإعدادات الأصلية"</string>
<string name="reboot_to_reset_message" msgid="3347690497972074356">"جارٍ إعادة التشغيل…"</string>
<string name="shutdown_progress" msgid="5017145516412657345">"جارٍ إيقاف التشغيل..."</string>
<string name="shutdown_confirm" product="tablet" msgid="2872769463279602432">"سيتم إيقاف تشغيل الجهاز اللوحي."</string>
@@ -320,7 +320,7 @@
<string name="capability_title_canRetrieveWindowContent" msgid="7554282892101587296">"استرداد محتوى النافذة"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="6195610527625237661">"فحص محتوى نافذة يتم التفاعل معها"</string>
<string name="capability_title_canRequestTouchExploration" msgid="327598364696316213">"تشغيل الاستكشاف باللمس"</string>
- <string name="capability_desc_canRequestTouchExploration" msgid="4394677060796752976">"سيتم نطق العناصر التي تم النقر عليها بصوت عال ويمكن استكشاف الشاشة باستخدام الإيماءات."</string>
+ <string name="capability_desc_canRequestTouchExploration" msgid="4394677060796752976">"سيتم قول العناصر التي تم النقر عليها بصوت عال ويمكن استكشاف الشاشة باستخدام الإيماءات."</string>
<string name="capability_title_canRequestFilterKeyEvents" msgid="2772371671541753254">"ملاحظة النص الذي تكتبه"</string>
<string name="capability_desc_canRequestFilterKeyEvents" msgid="2381315802405773092">"يتضمن بيانات شخصية مثل أرقام بطاقات الائتمان وكلمات المرور."</string>
<string name="capability_title_canControlMagnification" msgid="7701572187333415795">"التحكم في تكبير الشاشة"</string>
@@ -676,8 +676,8 @@
<string name="policylab_forceLock" msgid="7360335502968476434">"قفل الشاشة"</string>
<string name="policydesc_forceLock" msgid="1008844760853899693">"التحكّم في طريقة ووقت قفل الشاشة"</string>
<string name="policylab_wipeData" msgid="1359485247727537311">"محو جميع البيانات"</string>
- <string name="policydesc_wipeData" product="tablet" msgid="7245372676261947507">"يمكنك محو بيانات الجهاز اللوحي بدون تحذير، وذلك عبر إجراء إعادة الضبط بحسب بيانات المصنع."</string>
- <string name="policydesc_wipeData" product="tv" msgid="513862488950801261">"يمكنك محو بيانات جهاز Android TV بدون تحذير عن طريق تنفيذ إعادة الضبط بحسب بيانات المصنع."</string>
+ <string name="policydesc_wipeData" product="tablet" msgid="7245372676261947507">"يمكنك محو بيانات الجهاز اللوحي بدون تحذير، وذلك عبر إجراء إعادة الضبط على الإعدادات الأصلية."</string>
+ <string name="policydesc_wipeData" product="tv" msgid="513862488950801261">"يمكنك محو بيانات جهاز Android TV بدون تحذير عن طريق تنفيذ إعادة الضبط على الإعدادات الأصلية."</string>
<string name="policydesc_wipeData" product="default" msgid="8036084184768379022">"محو بيانات الهاتف بدون تحذير، وذلك من خلال إعادة ضبط البيانات على الإعدادات الأصلية"</string>
<string name="policylab_wipeData_secondaryUser" msgid="413813645323433166">"محو بيانات المستخدم"</string>
<string name="policydesc_wipeData_secondaryUser" product="tablet" msgid="2336676480090926470">"لمحو بيانات هذا المستخدم على هذا الجهاز اللوحي بدون تحذير."</string>
@@ -1701,6 +1701,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"لقد رسمت نقش فتح القفل بشكل غير صحيح <xliff:g id="NUMBER_0">%1$d</xliff:g> مرة. بعد إجراء <xliff:g id="NUMBER_1">%2$d</xliff:g> من المحاولات غير الناجحة الأخرى، ستُطالب بإلغاء تأمين الهاتف باستخدام حساب بريد إلكتروني لإلغاء تأمين الهاتف.\n\n أعد المحاولة خلال <xliff:g id="NUMBER_2">%3$d</xliff:g> ثانية."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"إزالة"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"هل تريد رفع مستوى الصوت فوق المستوى الموصى به؟\n\nقد يضر سماع صوت عالٍ لفترات طويلة بسمعك."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"هل تريد استخدام اختصار \"سهولة الاستخدام\"؟"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"عند تشغيل الاختصار، يؤدي الضغط على زرّي مستوى الصوت لمدة 3 ثوانٍ إلى تفعيل ميزة \"سهولة الاستخدام\".\n\n ميزة \"سهولة الاستخدام\" الحالية:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n يمكنك تغيير الميزة من \"الإعدادات\" > \"سهولة الاستخدام\"."</string>
@@ -1932,7 +1934,7 @@
<string name="zen_mode_default_events_name" msgid="2280682960128512257">"حدث"</string>
<string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"النوم"</string>
<string name="muted_by" msgid="91464083490094950">"يعمل <xliff:g id="THIRD_PARTY">%1$s</xliff:g> على كتم بعض الأصوات."</string>
- <string name="system_error_wipe_data" msgid="5910572292172208493">"حدثت مشكلة داخلية في جهازك، وقد لا يستقر وضعه حتى إجراء إعادة الضبط بحسب بيانات المصنع."</string>
+ <string name="system_error_wipe_data" msgid="5910572292172208493">"حدثت مشكلة داخلية في جهازك، وقد لا يستقر وضعه حتى إجراء إعادة الضبط على الإعدادات الأصلية."</string>
<string name="system_error_manufacturer" msgid="703545241070116315">"حدثت مشكلة داخلية في جهازك. يمكنك الاتصال بالمصنِّع للحصول على تفاصيل."</string>
<string name="stk_cc_ussd_to_dial" msgid="3139884150741157610">"تم تغيير طلب USSD إلى مكالمة عادية."</string>
<string name="stk_cc_ussd_to_ss" msgid="4826846653052609738">"تم تغيير طلب USSD إلى طلب SS."</string>
diff --git a/core/res/res/values-as/strings.xml b/core/res/res/values-as/strings.xml
index ad11a37..73e32b8 100644
--- a/core/res/res/values-as/strings.xml
+++ b/core/res/res/values-as/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"আপুনি আপোনাৰ ল\'ক খোলাৰ আৰ্হিটো <xliff:g id="NUMBER_0">%1$d</xliff:g>বাৰ ভুলকৈ আঁকিছে। <xliff:g id="NUMBER_1">%2$d</xliff:g>তকৈ বেছি বাৰ ভুল আৰ্হি আঁকিলে আপোনাৰ ফ\'নটো কোনো একাউণ্টৰ জৰিয়তে আনলক কৰিবলৈ কোৱা হ\'ব।\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> ছেকেণ্ডৰ পিছত আকৌ চেষ্টা কৰক।"</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"আঁতৰাওক"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"অনুমোদিত স্তৰতকৈ ওপৰলৈ ভলিউম বঢ়াব নেকি?\n\nদীৰ্ঘ সময়ৰ বাবে উচ্চ ভলিউমত শুনাৰ ফলত শ্ৰৱণ ক্ষমতাৰ ক্ষতি হ\'ব পাৰে।"</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"দিব্যাংগসকলৰ সুবিধাৰ শ্বৰ্টকাট ব্যৱহাৰ কৰেনে?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"শ্বৰ্টকাট অন হৈ থকাৰ সময়ত দুয়োটা ভলিউম বুটামত ৩ ছেকেণ্ডৰ বাবে ছাপ দি থাকিলে দিব্যাংগসকলৰ বাবে থকা সুবিধা এটা আৰম্ভ হ\'ব। \n\n চলিত দিব্যাংগসকলৰ সুবিধা:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n আপুনি এই সুবিধাটো ছেটিংসমূহ > দিব্যাংগসকলৰ বাবে সুবিধা-লৈ গৈ সলনি কৰিব পাৰে।"</string>
diff --git a/core/res/res/values-az/strings.xml b/core/res/res/values-az/strings.xml
index a535f1f..c894c29 100644
--- a/core/res/res/values-az/strings.xml
+++ b/core/res/res/values-az/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Siz artıq modeli <xliff:g id="NUMBER_0">%1$d</xliff:g> dəfə yanlış daxil etmisiniz.<xliff:g id="NUMBER_1">%2$d</xliff:g> dəfə də yanlış daxil etsəniz, telefonun kilidinin açılması üçün elektron poçt ünvanınız tələb olunacaq.\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> saniyə ərzində yenidən cəhd edin."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" - "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Yığışdır"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Səsin həcmi tövsiyə olunan səviyyədən artıq olsun?\n\nYüksək səsi uzun zaman dinləmək eşitmə qabiliyyətinizə zərər vura bilər."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Əlçatımlılıq Qısayolu istifadə edilsin?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Qısayol aktiv olduqda hər iki səs düyməsinə 3 saniyə basıb saxlamaqla əlçatımlılıq funksiyası işə başlayacaq.\n\n Cari əlçatımlılıq funksiyası:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n Funksiyanı Ayarlar və Əçatımlılıq bölməsində dəyişə bilərsiniz."</string>
diff --git a/core/res/res/values-b+sr+Latn/strings.xml b/core/res/res/values-b+sr+Latn/strings.xml
index 249e5af..909c315 100644
--- a/core/res/res/values-b+sr+Latn/strings.xml
+++ b/core/res/res/values-b+sr+Latn/strings.xml
@@ -1635,6 +1635,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Nacrtali ste šablon za otključavanje netačno <xliff:g id="NUMBER_0">%1$d</xliff:g> puta. Posle još <xliff:g id="NUMBER_1">%2$d</xliff:g> neuspešna(ih) pokušaja, od vas će biti zatraženo da otključate telefon pomoću naloga e-pošte.\n\nProbajte ponovo za <xliff:g id="NUMBER_2">%3$d</xliff:g> sekunde/i."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" – "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Ukloni"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Želite da pojačate zvuk iznad preporučenog nivoa?\n\nSlušanje glasne muzike duže vreme može da vam ošteti sluh."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Želite li da koristite prečicu za pristupačnost?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Kada je prečica uključena, pritisnite oba dugmeta za jačinu zvuka da biste pokrenuli funkciju pristupačnosti.\n\n Aktuelna funkcija pristupačnosti:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n Možete da promenite funkciju u odeljku Podešavanja > Pristupačnost."</string>
diff --git a/core/res/res/values-be/strings.xml b/core/res/res/values-be/strings.xml
index dc4c56e..19dcf92 100644
--- a/core/res/res/values-be/strings.xml
+++ b/core/res/res/values-be/strings.xml
@@ -1657,6 +1657,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Вы няправільна ўвялі графічны ключ разблакiроўкi пэўную колькасць разоў: <xliff:g id="NUMBER_0">%1$d</xliff:g>. Пасля яшчэ некалькiх няўдалых спроб (<xliff:g id="NUMBER_1">%2$d</xliff:g>) вам будзе прапанавана разблакiраваць тэлефон, увайшоўшы ў Google.\n\n Паўтарыце спробу праз <xliff:g id="NUMBER_2">%3$d</xliff:g> с."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Выдалiць"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Павялiчыць гук вышэй рэкамендаванага ўзроўню?\n\nДоўгае праслухоўванне музыкi на вялiкай гучнасцi можа пашкодзiць ваш слых."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Выкарыстоўваць камбінацыю хуткага доступу для спецыяльных магчымасцей?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Калі камбінацыя хуткага доступу ўключана, вы можаце націснуць абедзве кнопкі гучнасці і ўтрымліваць іх 3 секунды, каб уключыць функцыю спецыяльных магчымасцей.\n\n Бягучая функцыя спецыяльных магчымасцей:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n Вы можаце змяніць гэту функцыю ў меню \"Налады > Спецыяльныя магчымасці\"."</string>
diff --git a/core/res/res/values-bg/strings.xml b/core/res/res/values-bg/strings.xml
index 30b7d30..8a68766 100644
--- a/core/res/res/values-bg/strings.xml
+++ b/core/res/res/values-bg/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Начертахте неправилно фигурата си за отключване <xliff:g id="NUMBER_0">%1$d</xliff:g> пъти. След още <xliff:g id="NUMBER_1">%2$d</xliff:g> неуспешни опита ще бъдете помолени да отключите телефона посредством имейл адрес.\n\n Опитайте отново след <xliff:g id="NUMBER_2">%3$d</xliff:g> секунди."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" – "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Премахване"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Да се увеличи ли силата на звука над препоръчителното ниво?\n\nПродължителното слушане при висока сила на звука може да увреди слуха ви."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Искате ли да използвате пряк път към функцията за достъпност?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Когато прекият път е включен, можете да стартирате дадена функция за достъпност, като натиснете двата бутона за промяна на силата на звука и ги задържите 3 секунди.\n\n Текущата функция за достъпност е:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n Можете да промените функцията от „Настройки“ > „Достъпност“."</string>
diff --git a/core/res/res/values-bn/strings.xml b/core/res/res/values-bn/strings.xml
index d85b5d6..9ca383d 100644
--- a/core/res/res/values-bn/strings.xml
+++ b/core/res/res/values-bn/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"আপনি আপনার আনলকের প্যাটার্ন আঁকার ক্ষেত্রে <xliff:g id="NUMBER_0">%1$d</xliff:g> বার ভুল করেছেন৷ আর <xliff:g id="NUMBER_1">%2$d</xliff:g> বার অসফল প্রচেষ্টা করা হলে আপনাকে একটি ইমেল অ্যাকাউন্ট মারফত আপনার ফোন আনলক করতে বলা হবে৷\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> সেকেন্ডের মধ্যে আবার চেষ্টা করুন৷"</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"সরান"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"প্রস্তাবিত স্তরের চেয়ে বেশি উঁচুতে ভলিউম বাড়াবেন?\n\nউঁচু ভলিউমে বেশি সময় ধরে কিছু শুনলে আপনার শ্রবনশক্তির ক্ষতি হতে পারে।"</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"অ্যাক্সেসযোগ্যতা শর্টকাট ব্যবহার করবেন?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"শর্টকাটটি চালু থাকলে দুটি ভলিউম বোতাম একসাথে ৩ সেকেন্ড টিপে ধরে রাখলে একটি অ্যাকসেসিবিলিটি বৈশিষ্ট্য চালু হবে।\n\n বর্তমান অ্যাকসেসিবিলিটি বৈশিষ্ট্য:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n আপনি এই বৈশিষ্ট্যটি সেটিংস > অ্যাকসেসিবিলিটিতে গিয়ে পরিবর্তন করতে পারবেন।"</string>
diff --git a/core/res/res/values-bs/strings.xml b/core/res/res/values-bs/strings.xml
index c8c65bb..5f83aa4 100644
--- a/core/res/res/values-bs/strings.xml
+++ b/core/res/res/values-bs/strings.xml
@@ -1637,6 +1637,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Pogrešno ste nacrtali uzorak za otključavanje <xliff:g id="NUMBER_0">%1$d</xliff:g> puta. Ako napravite još <xliff:g id="NUMBER_1">%2$d</xliff:g> pokušaja bez uspjeha, od vas će se tražiti da otključate telefon pomoću e-pošte. \n\n Pokušajte ponovo za <xliff:g id="NUMBER_2">%3$d</xliff:g> s."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Ukloni"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Želite li pojačati zvuk iznad preporučenog nivoa?\n\nDužim slušanjem glasnog zvuka možete oštetiti sluh."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Želite li koristiti Prečicu za pristupačnost?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Kada je prečica uključena, pritiskom na oba dugmeta za podešavanje jačine zvuka u trajanju od 3 sekunde pokrenut će se funkcija za pristupačnost.\n\n Trenutna funkcija za pristupačnost je:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n Funkciju možete promijeniti ako odete u Postavke > Pristupačnost."</string>
diff --git a/core/res/res/values-ca/strings.xml b/core/res/res/values-ca/strings.xml
index 42bebe1..930065b 100644
--- a/core/res/res/values-ca/strings.xml
+++ b/core/res/res/values-ca/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Has dibuixat el patró de desbloqueig <xliff:g id="NUMBER_0">%1$d</xliff:g> vegades de manera incorrecta. Si falles <xliff:g id="NUMBER_1">%2$d</xliff:g> vegades més, se\'t demanarà que desbloquegis el telèfon amb un compte de correu electrònic.\n\n Torna-ho a provar d\'aquí a <xliff:g id="NUMBER_2">%3$d</xliff:g> segons."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Elimina"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Vols apujar el volum per sobre del nivell recomanat?\n\nSi escoltes música a un volum alt durant períodes llargs, pots danyar-te l\'oïda."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Vols fer servir la drecera d\'accessibilitat?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Si la drecera està activada, prem els dos botons de volum durant 3 segons, per iniciar una funció d\'accessibilitat.\n\n Funció d\'accessibilitat actual:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n Pots canviar la funció a Configuració > Accessibilitat."</string>
diff --git a/core/res/res/values-cs/strings.xml b/core/res/res/values-cs/strings.xml
index 2c16291..2c017dd 100644
--- a/core/res/res/values-cs/strings.xml
+++ b/core/res/res/values-cs/strings.xml
@@ -1657,6 +1657,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Již <xliff:g id="NUMBER_0">%1$d</xliff:g>krát jste nesprávně nakreslili své heslo odemknutí. Po <xliff:g id="NUMBER_1">%2$d</xliff:g> dalších neúspěšných pokusech budete požádáni o odemčení telefonu pomocí e-mailového účtu.\n\n Zkuste to znovu za <xliff:g id="NUMBER_2">%3$d</xliff:g> s."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" – "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Odebrat"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Zvýšit hlasitost nad doporučenou úroveň?\n\nDlouhodobý poslech hlasitého zvuku může poškodit sluch."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Použít zkratku přístupnosti?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Když je tato zkratka zapnutá, můžete funkci přístupnosti spustit tím, že na tři sekundy podržíte obě tlačítka hlasitosti.\n\n Aktuální funkce přístupnosti:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n Funkci můžete změnit v Nastavení > Přístupnost."</string>
diff --git a/core/res/res/values-da/strings.xml b/core/res/res/values-da/strings.xml
index f86db77..4ebea89 100644
--- a/core/res/res/values-da/strings.xml
+++ b/core/res/res/values-da/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Du har tegnet dit oplåsningsmønster forkert <xliff:g id="NUMBER_0">%1$d</xliff:g> gange. Efter <xliff:g id="NUMBER_1">%2$d</xliff:g> yderligere mislykkede forsøg til vil du blive bedt om at låse din telefon op ved hjælp af en mailkonto.\n\n Prøv igen om <xliff:g id="NUMBER_2">%3$d</xliff:g> sekunder."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" – "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Fjern"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Vil du skrue højere op end det anbefalede lydstyrkeniveau?\n\nDu kan skade hørelsen ved at lytte til meget høj musik over længere tid."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Vil du bruge genvejen til Hjælpefunktioner?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Når genvejen er slået til, kan du starte en hjælpefunktion ved at trykke på begge lydstyrkeknapper i tre sekunder.\n\n Nuværende hjælpefunktion:\n<xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n Du kan skifte funktion i Indstillinger > Hjælpefunktioner."</string>
diff --git a/core/res/res/values-de/strings.xml b/core/res/res/values-de/strings.xml
index d6a9a01..6fa0ac1 100644
--- a/core/res/res/values-de/strings.xml
+++ b/core/res/res/values-de/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Du hast dein Entsperrungsmuster <xliff:g id="NUMBER_0">%1$d</xliff:g>-mal falsch gezeichnet. Nach <xliff:g id="NUMBER_1">%2$d</xliff:g> weiteren erfolglosen Versuchen wirst du aufgefordert, dein Telefon mithilfe eines E-Mail-Kontos zu entsperren.\n\n Versuche es in <xliff:g id="NUMBER_2">%3$d</xliff:g> Sekunden erneut."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" – "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Entfernen"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Lautstärke über den Schwellenwert anheben?\n\nWenn du über einen längeren Zeitraum Musik in hoher Lautstärke hörst, kann dies dein Gehör schädigen."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Verknüpfung für Bedienungshilfen verwenden?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Wenn die Verknüpfung aktiviert ist, kannst du die beiden Lautstärketasten drei Sekunden lang gedrückt halten, um eine Bedienungshilfe zu starten.\n\n Aktuelle Bedienungshilfe:\n<xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n Du kannst die Bedienungshilfe unter \"Einstellungen\" > \"Bedienungshilfen\" ändern."</string>
diff --git a/core/res/res/values-el/strings.xml b/core/res/res/values-el/strings.xml
index 67285e9..81a16f2 100644
--- a/core/res/res/values-el/strings.xml
+++ b/core/res/res/values-el/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Σχεδιάσατε το μοτίβο ξεκλειδώματος εσφαλμένα <xliff:g id="NUMBER_0">%1$d</xliff:g> φορές. Μετά από <xliff:g id="NUMBER_1">%2$d</xliff:g> ανεπιτυχείς προσπάθειες ακόμη, θα σας ζητηθεί να ξεκλειδώσετε το τηλέφωνό σας με τη χρήση ενός λογαριασμού ηλεκτρονικού ταχυδρομείου.\n\n Δοκιμάστε ξανά σε <xliff:g id="NUMBER_2">%3$d</xliff:g> δευτερόλεπτα."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Κατάργηση"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Αυξάνετε την ένταση ήχου πάνω από το επίπεδο ασφαλείας;\n\nΑν ακούτε μουσική σε υψηλή ένταση για μεγάλο χρονικό διάστημα ενδέχεται να προκληθεί βλάβη στην ακοή σας."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Να χρησιμοποιείται η συντόμευση προσβασιμότητας;"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Όταν η συντόμευση είναι ενεργοποιημένη, το πάτημα και των δύο κουμπιών έντασης ήχου για 3 δευτερόλεπτα θα ξεκινήσει μια λειτουργία προσβασιμότητας.\n\n Τρέχουσα λειτουργία προσβασιμότητας:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n Μπορείτε να αλλάξετε τη λειτουργία από τις Ρυθμίσεις > Προσβασιμότητα."</string>
diff --git a/core/res/res/values-en-rAU/strings.xml b/core/res/res/values-en-rAU/strings.xml
index ed31c22..87e0c90 100644
--- a/core/res/res/values-en-rAU/strings.xml
+++ b/core/res/res/values-en-rAU/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"You have incorrectly drawn your unlock pattern <xliff:g id="NUMBER_0">%1$d</xliff:g> times. After <xliff:g id="NUMBER_1">%2$d</xliff:g> more unsuccessful attempts, you will be asked to unlock your phone using an email account.\n\n Try again in <xliff:g id="NUMBER_2">%3$d</xliff:g> seconds."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Remove"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Raise volume above recommended level?\n\nListening at high volume for long periods may damage your hearing."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Use Accessibility Shortcut?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"When the shortcut is on, pressing both volume buttons for 3 seconds will start an accessibility feature.\n\n Current accessibility feature:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n You can change the feature in Settings > Accessibility."</string>
diff --git a/core/res/res/values-en-rCA/strings.xml b/core/res/res/values-en-rCA/strings.xml
index 6ae46b4..008ad8a 100644
--- a/core/res/res/values-en-rCA/strings.xml
+++ b/core/res/res/values-en-rCA/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"You have incorrectly drawn your unlock pattern <xliff:g id="NUMBER_0">%1$d</xliff:g> times. After <xliff:g id="NUMBER_1">%2$d</xliff:g> more unsuccessful attempts, you will be asked to unlock your phone using an email account.\n\n Try again in <xliff:g id="NUMBER_2">%3$d</xliff:g> seconds."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Remove"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Raise volume above recommended level?\n\nListening at high volume for long periods may damage your hearing."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Use Accessibility Shortcut?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"When the shortcut is on, pressing both volume buttons for 3 seconds will start an accessibility feature.\n\n Current accessibility feature:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n You can change the feature in Settings > Accessibility."</string>
diff --git a/core/res/res/values-en-rGB/strings.xml b/core/res/res/values-en-rGB/strings.xml
index ed31c22..87e0c90 100644
--- a/core/res/res/values-en-rGB/strings.xml
+++ b/core/res/res/values-en-rGB/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"You have incorrectly drawn your unlock pattern <xliff:g id="NUMBER_0">%1$d</xliff:g> times. After <xliff:g id="NUMBER_1">%2$d</xliff:g> more unsuccessful attempts, you will be asked to unlock your phone using an email account.\n\n Try again in <xliff:g id="NUMBER_2">%3$d</xliff:g> seconds."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Remove"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Raise volume above recommended level?\n\nListening at high volume for long periods may damage your hearing."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Use Accessibility Shortcut?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"When the shortcut is on, pressing both volume buttons for 3 seconds will start an accessibility feature.\n\n Current accessibility feature:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n You can change the feature in Settings > Accessibility."</string>
diff --git a/core/res/res/values-en-rIN/strings.xml b/core/res/res/values-en-rIN/strings.xml
index ed31c22..87e0c90 100644
--- a/core/res/res/values-en-rIN/strings.xml
+++ b/core/res/res/values-en-rIN/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"You have incorrectly drawn your unlock pattern <xliff:g id="NUMBER_0">%1$d</xliff:g> times. After <xliff:g id="NUMBER_1">%2$d</xliff:g> more unsuccessful attempts, you will be asked to unlock your phone using an email account.\n\n Try again in <xliff:g id="NUMBER_2">%3$d</xliff:g> seconds."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Remove"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Raise volume above recommended level?\n\nListening at high volume for long periods may damage your hearing."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Use Accessibility Shortcut?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"When the shortcut is on, pressing both volume buttons for 3 seconds will start an accessibility feature.\n\n Current accessibility feature:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n You can change the feature in Settings > Accessibility."</string>
diff --git a/core/res/res/values-en-rXC/strings.xml b/core/res/res/values-en-rXC/strings.xml
index 07cb6c7..777107a 100644
--- a/core/res/res/values-en-rXC/strings.xml
+++ b/core/res/res/values-en-rXC/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"You have incorrectly drawn your unlock pattern <xliff:g id="NUMBER_0">%1$d</xliff:g> times. After <xliff:g id="NUMBER_1">%2$d</xliff:g> more unsuccessful attempts, you will be asked to unlock your phone using an email account.\n\n Try again in <xliff:g id="NUMBER_2">%3$d</xliff:g> seconds."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Remove"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Raise volume above recommended level?\n\nListening at high volume for long periods may damage your hearing."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Use Accessibility Shortcut?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"When the shortcut is on, pressing both volume buttons for 3 seconds will start an accessibility feature.\n\n Current accessibility feature:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n You can change the feature in Settings > Accessibility."</string>
diff --git a/core/res/res/values-es-rUS/strings.xml b/core/res/res/values-es-rUS/strings.xml
index 6f83551..4335c2b 100644
--- a/core/res/res/values-es-rUS/strings.xml
+++ b/core/res/res/values-es-rUS/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Dibujaste incorrectamente tu patrón de desbloqueo <xliff:g id="NUMBER_0">%1$d</xliff:g> veces. Luego de <xliff:g id="NUMBER_1">%2$d</xliff:g> intentos incorrectos más, se te solicitará que desbloquees tu dispositivo mediante el uso de una cuenta de correo.\n\n Vuelve a intentarlo en <xliff:g id="NUMBER_2">%3$d</xliff:g> segundos."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Eliminar"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"¿Quieres subir el volumen por encima del nivel recomendado?\n\nEscuchar a un alto volumen durante largos períodos puede dañar tu audición."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"¿Usar acceso directo de accesibilidad?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Cuando el acceso directo está activado, puedes presionar los botones de volumen durante 3 segundos para iniciar una función de accesibilidad.\n\n Función de accesibilidad actual:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n Puedes cambiar la función en Configuración > Accesibilidad."</string>
diff --git a/core/res/res/values-es/strings.xml b/core/res/res/values-es/strings.xml
index 737a83b..8d750ca 100644
--- a/core/res/res/values-es/strings.xml
+++ b/core/res/res/values-es/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Has fallado <xliff:g id="NUMBER_0">%1$d</xliff:g> veces al dibujar el patrón de desbloqueo. Si fallas otras <xliff:g id="NUMBER_1">%2$d</xliff:g> veces, deberás usar una cuenta de correo electrónico para desbloquear el teléfono.\n\n Inténtalo de nuevo en <xliff:g id="NUMBER_2">%3$d</xliff:g> segundos."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Quitar"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"¿Quieres subir el volumen por encima del nivel recomendado?\n\nEscuchar sonidos fuertes durante mucho tiempo puede dañar los oídos."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"¿Utilizar acceso directo de accesibilidad?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Si el acceso directo está activado, pulsa los dos botones de volumen durante tres segundos para iniciar una función de accesibilidad.\n\n Función de accesibilidad actual:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n Puedes cambiar la función en Ajustes > Accesibilidad."</string>
diff --git a/core/res/res/values-et/strings.xml b/core/res/res/values-et/strings.xml
index 021985f..7f423e9 100644
--- a/core/res/res/values-et/strings.xml
+++ b/core/res/res/values-et/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Joonistasite oma avamismustri <xliff:g id="NUMBER_0">%1$d</xliff:g> korda valesti. Pärast veel <xliff:g id="NUMBER_1">%2$d</xliff:g> ebaõnnestunud katset palutakse teil telefon avada meilikontoga.\n\n Proovige uuesti <xliff:g id="NUMBER_2">%3$d</xliff:g> sekundi pärast."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Eemalda"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Kas suurendada helitugevuse taset üle soovitatud taseme?\n\nPikaajaline valju helitugevusega kuulamine võib kuulmist kahjustada."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Kas kasutada juurdepääsetavuse otseteed?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Kui otsetee on sisse lülitatud, käivitab mõlema helitugevuse nupu kolm sekundit all hoidmine juurdepääsetavuse funktsiooni.\n\n Praegune juurdepääsetavuse funktsioon:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n Saate seda funktsiooni muuta valikutega Seaded > Juurdepääsetavus."</string>
diff --git a/core/res/res/values-eu/strings.xml b/core/res/res/values-eu/strings.xml
index 8ecdd07..9d014a3 100644
--- a/core/res/res/values-eu/strings.xml
+++ b/core/res/res/values-eu/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Desblokeatzeko eredua oker marraztu duzu <xliff:g id="NUMBER_0">%1$d</xliff:g> aldiz. Beste <xliff:g id="NUMBER_1">%2$d</xliff:g> aldiz oker marrazten baduzu, telefonoa posta-kontu baten bidez desblokeatzeko eskatuko dizugu.\n\n Saiatu berriro <xliff:g id="NUMBER_2">%3$d</xliff:g> segundo barru."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Kendu"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Bolumena gomendatutako mailatik gora igo nahi duzu?\n\nMusika bolumen handian eta denbora luzez entzuteak entzumena kalte diezazuke."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Erabilerraztasun-lasterbidea erabili nahi duzu?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Lasterbidea aktibatuta dagoenean, bi bolumen-botoiak hiru segundoz sakatuta abiaraziko da erabilerraztasun-eginbidea.\n\n Uneko erabilerraztasun-eginbidea:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n Eginbidea aldatzeko, joan Ezarpenak > Erabilerraztasuna atalera."</string>
diff --git a/core/res/res/values-fa/strings.xml b/core/res/res/values-fa/strings.xml
index 9c3403b..58ce7a7 100644
--- a/core/res/res/values-fa/strings.xml
+++ b/core/res/res/values-fa/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"شما الگوی بازگشایی قفل خود را <xliff:g id="NUMBER_0">%1$d</xliff:g> بار اشتباه کشیدهاید. پس از <xliff:g id="NUMBER_1">%2$d</xliff:g> تلاش ناموفق، از شما خواسته میشود که با استفاده از یک حساب ایمیل قفل تلفن خود را باز کنید.\n\n لطفاً پس از <xliff:g id="NUMBER_2">%3$d</xliff:g> ثانیه دوباره امتحان کنید."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"حذف"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"میزان صدا را به بالاتر از حد توصیه شده افزایش میدهید؟\n\nگوش دادن به صداهای بلند برای مدت طولانی میتواند به شنواییتان آسیب وارد کند."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"از میانبر دسترسپذیری استفاده شود؟"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"وقتی میانبر روشن است، اگر هر دو دکمه صدا را ۳ ثانیه فشار دهید یکی از قابلیتهای دسترسپذیری شروع میشود.\n\n قابلیت دسترسپذیری کنونی:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n میتوانید در «تنظیمات > دسترسپذیری»، قابلیت را تغییر دهید."</string>
diff --git a/core/res/res/values-fi/strings.xml b/core/res/res/values-fi/strings.xml
index a42b87d..e0f4ed4 100644
--- a/core/res/res/values-fi/strings.xml
+++ b/core/res/res/values-fi/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Piirsit lukituksenpoistokuvion väärin <xliff:g id="NUMBER_0">%1$d</xliff:g> kertaa. Jos piirrät kuvion väärin vielä <xliff:g id="NUMBER_1">%2$d</xliff:g> kertaa, sinua pyydetään poistamaan puhelimesi lukitus sähköpostitilin avulla.\n\n Yritä uudelleen <xliff:g id="NUMBER_2">%3$d</xliff:g> sekunnin kuluttua."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" – "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Poista"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Nostetaanko äänenvoimakkuus suositellun tason yläpuolelle?\n\nPitkäkestoinen kova äänenvoimakkuus saattaa heikentää kuuloa."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Käytetäänkö esteettömyyden pikanäppäintä?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Kun pikanäppäin on käytössä, voit käynnistää esteettömyystoiminnon pitämällä molempia äänenvoimakkuuspainikkeita painettuna kolmen sekunnin ajan.\n\n Tällä hetkellä valittu esteettömyystoiminto:\n<xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n Voit vaihtaa toimintoa valitsemalla Asetukset > Esteettömyys."</string>
diff --git a/core/res/res/values-fr-rCA/strings.xml b/core/res/res/values-fr-rCA/strings.xml
index 47f4184..5d99db1 100644
--- a/core/res/res/values-fr-rCA/strings.xml
+++ b/core/res/res/values-fr-rCA/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Vous avez dessiné un schéma de déverrouillage incorrect à <xliff:g id="NUMBER_0">%1$d</xliff:g> reprises. Si vous échouez encore <xliff:g id="NUMBER_1">%2$d</xliff:g> fois, vous devrez déverrouiller votre téléphone à l\'aide d\'un compte de messagerie électronique.\n\n Veuillez réessayer dans <xliff:g id="NUMBER_2">%3$d</xliff:g> secondes."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Supprimer"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Augmenter le volume au-dessus du niveau recommandé?\n\nL\'écoute prolongée à un volume élevé peut endommager vos facultés auditives."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Utiliser le raccourci d\'accessibilité?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Quand le raccourci est activé, appuyez sur les deux boutons de volume pendant trois secondes pour lancer une fonctionnalité d\'accessibilité.\n\n Fonctionnalité d\'accessibilité utilisée actuellement :\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n Vous pouvez changer de fonctionnalité sous Paramètres > Accessibilité."</string>
diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml
index 7898e79..3f4f3e6 100644
--- a/core/res/res/values-fr/strings.xml
+++ b/core/res/res/values-fr/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Vous avez dessiné un schéma de déverrouillage incorrect à <xliff:g id="NUMBER_0">%1$d</xliff:g> reprises. Si vous échouez encore <xliff:g id="NUMBER_1">%2$d</xliff:g> fois, vous devrez déverrouiller votre téléphone à l\'aide d\'un compte de messagerie électronique.\n\n Veuillez réessayer dans <xliff:g id="NUMBER_2">%3$d</xliff:g> secondes."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Supprimer"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Augmenter le volume au dessus du niveau recommandé ?\n\nL\'écoute prolongée à un volume élevé peut endommager vos facultés auditives."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Utiliser le raccourci d\'accessibilité ?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Quand le raccourci est activé, appuyez sur les deux boutons de volume pendant trois secondes pour lancer une fonctionnalité d\'accessibilité.\n\n Fonctionnalité d\'accessibilité utilisée actuellement :\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n Vous pouvez changer de fonctionnalité dans Paramètres > Accessibilité."</string>
diff --git a/core/res/res/values-gl/strings.xml b/core/res/res/values-gl/strings.xml
index e7498b9..2e5052c 100644
--- a/core/res/res/values-gl/strings.xml
+++ b/core/res/res/values-gl/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Debuxaches o padrón de desbloqueo incorrectamente <xliff:g id="NUMBER_0">%1$d</xliff:g> veces. Se realizas <xliff:g id="NUMBER_1">%2$d</xliff:g> intentos incorrectos máis, terás que desbloquear o teléfono a través dunha conta de correo electrónico.\n\n Téntao de novo dentro de <xliff:g id="NUMBER_2">%3$d</xliff:g> segundos."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Eliminar"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Queres subir o volume máis do nivel recomendado?\n\nA reprodución de son a un volume elevado durante moito tempo pode provocar danos nos oídos."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Queres utilizar o atallo de accesibilidade?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Cando o atallo está activado, podes premer os dous botóns de volume durante 3 segundos para iniciar unha función de accesibilidade.\n\n Función de accesibilidade actual:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n Podes cambiar a función en Configuración > Accesibilidade."</string>
diff --git a/core/res/res/values-gu/strings.xml b/core/res/res/values-gu/strings.xml
index b52d99ef..8081ef2 100644
--- a/core/res/res/values-gu/strings.xml
+++ b/core/res/res/values-gu/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"તમે તમારી અનલૉક પૅટર્ન <xliff:g id="NUMBER_0">%1$d</xliff:g> વખત ખોટી રીતે દોરી. હજી <xliff:g id="NUMBER_1">%2$d</xliff:g> અસફળ પ્રયાસ પછી, તમને ઇમેઇલ એકાઉન્ટનો ઉપયોગ કરીને ફોનને અનલૉક કરવાનું કહેવામાં આવશે.\n\n<xliff:g id="NUMBER_2">%3$d</xliff:g> સેકન્ડમાં ફરીથી પ્રયાસ કરો."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"દૂર કરો"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"ભલામણ કરેલ સ્તરની ઉપર વૉલ્યૂમ વધાર્યો?\n\nલાંબા સમય સુધી ઊંચા અવાજે સાંભળવું તમારી શ્રવણક્ષમતાને નુકસાન પહોંચાડી શકે છે."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"ઍક્સેસિબિલિટી શૉર્ટકટનો ઉપયોગ કરીએ?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"જ્યારે શૉર્ટકટ ચાલુ હોય, ત્યારે બન્ને વૉલ્યૂમ બટનને 3 સેકન્ડ સુધી દબાવી રાખવાથી ઍક્સેસિબિલિટી સુવિધા શરૂ થઈ જશે.\n\n વર્તમાન ઍક્સેસિબિલિટી સુવિધા:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n તમે સેટિંગ્સ > ઍક્સેસિબિલિટીમાં જઈને આ સુવિધા બદલી શકો છો."</string>
@@ -1987,8 +1989,7 @@
<string name="mime_type_spreadsheet_ext" msgid="8720173181137254414">"<xliff:g id="EXTENSION">%1$s</xliff:g> સ્પ્રેડશીટ"</string>
<string name="mime_type_presentation" msgid="1145384236788242075">"પ્રસ્તુતિ"</string>
<string name="mime_type_presentation_ext" msgid="8761049335564371468">"<xliff:g id="EXTENSION">%1$s</xliff:g> પ્રસ્તુતિ"</string>
- <!-- no translation found for bluetooth_airplane_mode_toast (2066399056595768554) -->
- <skip />
+ <string name="bluetooth_airplane_mode_toast" msgid="2066399056595768554">"એરપ્લેન મોડ દરમિયાન બ્લૂટૂથ ચાલુ રહેશે"</string>
<string name="car_loading_profile" msgid="8219978381196748070">"લોડિંગ"</string>
<plurals name="file_count" formatted="false" msgid="7063513834724389247">
<item quantity="one"><xliff:g id="FILE_NAME_2">%s</xliff:g> + <xliff:g id="COUNT_3">%d</xliff:g> ફાઇલ</item>
@@ -2009,8 +2010,7 @@
<!-- no translation found for accessibility_system_action_accessibility_menu_label (8436484650391125184) -->
<skip />
<string name="accessibility_freeform_caption" msgid="8377519323496290122">"<xliff:g id="APP_NAME">%1$s</xliff:g>નું કૅપ્શન બાર."</string>
- <!-- no translation found for as_app_forced_to_restricted_bucket (8233871289353898964) -->
- <skip />
+ <string name="as_app_forced_to_restricted_bucket" msgid="8233871289353898964">"<xliff:g id="PACKAGE_NAME">%1$s</xliff:g>ને પ્રતિબંધિત સમૂહમાં મૂકવામાં આવ્યું છે"</string>
<!-- no translation found for resolver_personal_tab (2051260504014442073) -->
<skip />
<!-- no translation found for resolver_work_tab (2690019516263167035) -->
diff --git a/core/res/res/values-hi/strings.xml b/core/res/res/values-hi/strings.xml
index 3140c76..05efcd8 100644
--- a/core/res/res/values-hi/strings.xml
+++ b/core/res/res/values-hi/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"आपने अपने अनलॉक आकार को <xliff:g id="NUMBER_0">%1$d</xliff:g> बार गलत तरीके से आरेखित किया है. <xliff:g id="NUMBER_1">%2$d</xliff:g> और असफल प्रयासों के बाद, आपसे अपने फ़ोन को किसी ईमेल खाते का उपयोग करके अनलॉक करने के लिए कहा जाएगा.\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> सेकंड में फिर से प्रयास करें."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"निकालें"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"वॉल्यूम को सुझाए गए स्तर से ऊपर बढ़ाएं?\n\nअत्यधिक वॉल्यूम पर ज़्यादा समय तक सुनने से आपकी सुनने की क्षमता को नुकसान हो सकता है."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"सुलभता शॉर्टकट का इस्तेमाल करना चाहते हैं?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"इस शॉर्टकट के चालू होने पर, दोनों वॉल्यूम बटनों को 3 सेकंड तक दबाने से सुलभता सुविधा शुरू हो जाएगी.\n\n मौजूदा सुलभता सुविधा:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n आप इस सुविधा को सेटिंग > सुलभता पर जाकर बदल सकते हैं."</string>
diff --git a/core/res/res/values-hr/strings.xml b/core/res/res/values-hr/strings.xml
index feb29e2..e4cefe8 100644
--- a/core/res/res/values-hr/strings.xml
+++ b/core/res/res/values-hr/strings.xml
@@ -1635,6 +1635,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Netočno ste iscrtali obrazac za otključavanje <xliff:g id="NUMBER_0">%1$d</xliff:g> puta. Nakon još ovoliko neuspješnih pokušaja: <xliff:g id="NUMBER_1">%2$d</xliff:g> morat ćete otključati telefon pomoću računa e-pošte.\n\n Pokušajte ponovo za <xliff:g id="NUMBER_2">%3$d</xliff:g> s."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" – "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Ukloni"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Želite li pojačati zvuk iznad preporučene razine?\n\nDugotrajno slušanje glasne glazbe može vam oštetiti sluh."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Želite li upotrebljavati prečac za pristupačnost?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Kada je taj prečac uključen, pritiskom na obje tipke za glasnoću na 3 sekunde pokrenut će se značajka pristupačnosti.\n\n Trenutačna značajka pristupačnosti:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n Značajku možete promijeniti u Postavkama > Pristupačnost."</string>
diff --git a/core/res/res/values-hu/strings.xml b/core/res/res/values-hu/strings.xml
index 20d38ae..08cb1c7 100644
--- a/core/res/res/values-hu/strings.xml
+++ b/core/res/res/values-hu/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"<xliff:g id="NUMBER_0">%1$d</xliff:g> alkalommal helytelenül rajzolta le a feloldási mintát. További <xliff:g id="NUMBER_1">%2$d</xliff:g> sikertelen kísérlet után egy e-mail fiók használatával kell feloldania a telefonját.\n\n Kérjük, próbálja újra <xliff:g id="NUMBER_2">%3$d</xliff:g> másodperc múlva."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" – "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Eltávolítás"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Az ajánlott szint fölé szeretné emelni a hangerőt?\n\nHa hosszú időn át teszi ki magát nagy hangerőnek, azzal károsíthatja a hallását."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Szeretné használni a Kisegítő lehetőségek billentyűparancsot?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Ha be van kapcsolva a billentyűparancs, a két hangerőgomb 3 másodpercig tartó lenyomásával elindíthatja a kisegítő lehetőségek egyik funkcióját.\n\n A kisegítő lehetőségek jelenleg beállított funkciója:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n A funkciót a Beállítások > Kisegítő lehetőségek menüpontban módosíthatja."</string>
diff --git a/core/res/res/values-hy/strings.xml b/core/res/res/values-hy/strings.xml
index d13b9ea..9d33f6b 100644
--- a/core/res/res/values-hy/strings.xml
+++ b/core/res/res/values-hy/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Դուք <xliff:g id="NUMBER_0">%1$d</xliff:g> անգամ սխալ եք հավաքել ձեր ապակողպման նմուշը: <xliff:g id="NUMBER_1">%2$d</xliff:g> անգամից ավել անհաջող փորձերից հետո ձեզ կառաջարկվի ապակողպել ձեր հեռախոսը` օգտագործելով էլփոստի հաշիվ:\n\n Փորձեք կրկին <xliff:g id="NUMBER_2">%3$d</xliff:g> վայրկյանից:"</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Հեռացնել"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Ձայնը բարձրացնե՞լ խորհուրդ տրվող մակարդակից ավել:\n\nԵրկարատև բարձրաձայն լսելը կարող է վնասել ձեր լսողությունը:"</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Օգտագործե՞լ Մատչելիության դյուրանցումը։"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Հատուկ գործառույթն օգտագործելու համար սեղմեք և 3 վայրկյան սեղմած պահեք ձայնի ուժգնության երկու կոճակները, երբ գործառույթը միացված է։\n\n Մատչելիության ակտիվ գործառույթը՝\n<xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n Գործառույթը կարող եք փոփոխել՝ անցնելով Կարգավորումներ > Հատուկ գործառույթներ։"</string>
diff --git a/core/res/res/values-in/strings.xml b/core/res/res/values-in/strings.xml
index c2a0817..4813610 100644
--- a/core/res/res/values-in/strings.xml
+++ b/core/res/res/values-in/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Anda telah <xliff:g id="NUMBER_0">%1$d</xliff:g> kali salah menggambar pola pembuka kunci. Setelah <xliff:g id="NUMBER_1">%2$d</xliff:g> lagi upaya gagal, Anda akan diminta membuka kunci ponsel menggunakan akun email.\n\nCoba lagi dalam <xliff:g id="NUMBER_2">%3$d</xliff:g> detik."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Hapus"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Mengeraskan volume di atas tingkat yang disarankan?\n\nMendengarkan dengan volume keras dalam waktu yang lama dapat merusak pendengaran Anda."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Gunakan Pintasan Aksesibilitas?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Saat pintasan aktif, menekan kedua tombol volume selama 3 detik akan memulai fitur aksesibilitas.\n\n Fitur aksesibilitas saat ini:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n Anda dapat mengubah fitur di Setelan > Aksesibilitas."</string>
diff --git a/core/res/res/values-is/strings.xml b/core/res/res/values-is/strings.xml
index c596c12..bf3fe87 100644
--- a/core/res/res/values-is/strings.xml
+++ b/core/res/res/values-is/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Þú hefur teiknað rangt opnunarmynstur <xliff:g id="NUMBER_0">%1$d</xliff:g> sinnum. Eftir <xliff:g id="NUMBER_1">%2$d</xliff:g> árangurslausar tilraunir í viðbót verður þú beðin(n) um að opna símann með tölvupóstreikningi.\n\n Reyndu aftur eftir <xliff:g id="NUMBER_2">%3$d</xliff:g> sekúndur."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Fjarlægja"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Hækka hljóðstyrk umfram ráðlagðan styrk?\n\nEf hlustað er á háum hljóðstyrk í langan tíma kann það að skaða heyrnina."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Viltu nota aðgengisflýtileið?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Þegar flýtileiðin er virk er kveikt á aðgengiseiginleikanum með því að halda báðum hljóðstyrkshnöppunum inni í þrjár sekúndur.\n\n Virkur aðgengiseiginleiki:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n Hægt er að skipta um eiginleika í Stillingar > Aðgengi."</string>
diff --git a/core/res/res/values-it/strings.xml b/core/res/res/values-it/strings.xml
index 1144995..72ca138 100644
--- a/core/res/res/values-it/strings.xml
+++ b/core/res/res/values-it/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"<xliff:g id="NUMBER_0">%1$d</xliff:g> tentativi errati di inserimento della sequenza di sblocco. Dopo altri <xliff:g id="NUMBER_1">%2$d</xliff:g> tentativi falliti, ti verrà chiesto di sbloccare il telefono con un account email.\n\n Riprova tra <xliff:g id="NUMBER_2">%3$d</xliff:g> secondi."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" – "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Rimuovi"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Vuoi aumentare il volume oltre il livello consigliato?\n\nL\'ascolto ad alto volume per lunghi periodi di tempo potrebbe danneggiare l\'udito."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Usare la scorciatoia Accessibilità?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Quando la scorciatoia è attiva, puoi premere entrambi i pulsanti del volume per tre secondi per avviare una funzione di accessibilità.\n\n Funzione di accessibilità corrente:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n Puoi cambiare la funzione in Impostazioni > Accessibilità."</string>
diff --git a/core/res/res/values-iw/strings.xml b/core/res/res/values-iw/strings.xml
index bce62ab..9c8d0a3 100644
--- a/core/res/res/values-iw/strings.xml
+++ b/core/res/res/values-iw/strings.xml
@@ -1657,6 +1657,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"שרטטת את קו ביטול הנעילה באופן שגוי <xliff:g id="NUMBER_0">%1$d</xliff:g> פעמים. לאחר <xliff:g id="NUMBER_1">%2$d</xliff:g> ניסיונות כושלים נוספים, תתבקש לבטל את נעילת הטלפון באמצעות חשבון אימייל.\n\nנסה שוב בעוד <xliff:g id="NUMBER_2">%3$d</xliff:g> שניות."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"הסר"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"האם להעלות את עוצמת הקול מעל לרמה המומלצת?\n\nהאזנה בעוצמת קול גבוהה למשכי זמן ממושכים עלולה לפגוע בשמיעה."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"להשתמש בקיצור הדרך לתכונת הנגישות?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"כשקיצור הדרך מופעל, לחיצה על שני לחצני עוצמת השמע למשך שלוש שניות מפעילה את תכונת הנגישות.\n\n תכונת הנגישות המוגדרת כרגע:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n אפשר לשנות את התכונה בקטע \'הגדרות ונגישות\'."</string>
@@ -2053,8 +2055,7 @@
<string name="mime_type_spreadsheet_ext" msgid="8720173181137254414">"גיליון אלקטרוני <xliff:g id="EXTENSION">%1$s</xliff:g>"</string>
<string name="mime_type_presentation" msgid="1145384236788242075">"מצגת"</string>
<string name="mime_type_presentation_ext" msgid="8761049335564371468">"מצגת <xliff:g id="EXTENSION">%1$s</xliff:g>"</string>
- <!-- no translation found for bluetooth_airplane_mode_toast (2066399056595768554) -->
- <skip />
+ <string name="bluetooth_airplane_mode_toast" msgid="2066399056595768554">"Bluetooth יישאר מופעל במהלך מצב טיסה"</string>
<string name="car_loading_profile" msgid="8219978381196748070">"בטעינה"</string>
<plurals name="file_count" formatted="false" msgid="7063513834724389247">
<item quantity="two"><xliff:g id="FILE_NAME_2">%s</xliff:g> + <xliff:g id="COUNT_3">%d</xliff:g> קבצים</item>
@@ -2077,8 +2078,7 @@
<!-- no translation found for accessibility_system_action_accessibility_menu_label (8436484650391125184) -->
<skip />
<string name="accessibility_freeform_caption" msgid="8377519323496290122">"סרגל כיתוב של <xliff:g id="APP_NAME">%1$s</xliff:g>."</string>
- <!-- no translation found for as_app_forced_to_restricted_bucket (8233871289353898964) -->
- <skip />
+ <string name="as_app_forced_to_restricted_bucket" msgid="8233871289353898964">"<xliff:g id="PACKAGE_NAME">%1$s</xliff:g> התווספה לקטגוריה \'מוגבל\'"</string>
<!-- no translation found for resolver_personal_tab (2051260504014442073) -->
<skip />
<!-- no translation found for resolver_work_tab (2690019516263167035) -->
diff --git a/core/res/res/values-ja/strings.xml b/core/res/res/values-ja/strings.xml
index 1ef4a13..529d011 100644
--- a/core/res/res/values-ja/strings.xml
+++ b/core/res/res/values-ja/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"ロック解除パターンの入力を<xliff:g id="NUMBER_0">%1$d</xliff:g>回間違えました。あと<xliff:g id="NUMBER_1">%2$d</xliff:g>回間違えると、モバイルデバイスのロック解除にメールアカウントが必要になります。\n\n<xliff:g id="NUMBER_2">%3$d</xliff:g>秒後にもう一度お試しください。"</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" - "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"削除"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"推奨レベルを超えるまで音量を上げますか?\n\n大音量で長時間聞き続けると、聴力を損なう恐れがあります。"</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"ユーザー補助機能のショートカットの使用"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"ショートカットが ON の場合、両方の音量ボタンを 3 秒間押し続けるとユーザー補助機能が起動します。\n\n現在のユーザー補助機能:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\nユーザー補助機能は [設定] > [ユーザー補助] で変更できます。"</string>
diff --git a/core/res/res/values-ka/strings.xml b/core/res/res/values-ka/strings.xml
index 41b2388..3f97338 100644
--- a/core/res/res/values-ka/strings.xml
+++ b/core/res/res/values-ka/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"თქვენ არასწორად დახატეთ თქვენი განბლოკვის ნიმუში <xliff:g id="NUMBER_0">%1$d</xliff:g>-ჯერ. კიდევ <xliff:g id="NUMBER_1">%2$d</xliff:g> წარუმატებელი ცდის შემდეგ, დაგჭირდებათ თქვენი ტელეფონის განბლოკვა ელფოსტის ანგარიშის გამოყენებით.\n\n ხელახლა სცადეთ <xliff:g id="NUMBER_2">%3$d</xliff:g> წამში."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"ამოშლა"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"გსურთ ხმის რეკომენდებულ დონეზე მაღლა აწევა?\n\nხანგრძლივად ხმამაღლა მოსმენით შესაძლოა სმენადობა დაიზიანოთ."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"გსურთ მარტივი წვდომის მალსახმობის გამოყენება?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"მალსახმობის ჩართვის შემთხვევაში, ხმის ორივე ღილაკზე 3 წამის განმავლობაში დაჭერით მარტივი წვდომის ფუნქცია ჩაირთვება.\n\n მარტივი წვდომის ამჟამინდელი ფუნქციაა:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n ამ ფუნქციის შეცვლა შეგიძლიათ აქ: პარამეტრები > მარტივი წვდომა."</string>
diff --git a/core/res/res/values-kk/strings.xml b/core/res/res/values-kk/strings.xml
index 3ea4d351..bccd3f4 100644
--- a/core/res/res/values-kk/strings.xml
+++ b/core/res/res/values-kk/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Бекітпені ашу кескінін <xliff:g id="NUMBER_0">%1$d</xliff:g> рет қате сыздыңыз. <xliff:g id="NUMBER_1">%2$d</xliff:g> сәтсіз әрекеттен кейін телефоныңызды есептік жазба арқылы ашу өтінішін аласыз. \n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> секундтан кейін қайта әрекеттеніңіз."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Алып тастау"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Дыбыс деңгейін ұсынылған деңгейден көтеру керек пе?\n\nЖоғары дыбыс деңгейінде ұзақ кезеңдер бойы тыңдау есту қабілетіңізге зиян тигізуі мүмкін."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Арнайы мүмкіндік төте жолын пайдалану керек пе?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Бұл төте жол қосулы кезде дыбыс деңгейі түймелерінің екеуін де 3 секунд бойы басқанда арнайы мүмкіндік іске қосылады.\n\n Ағымдағы арнайы мүмкіндік:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n Бұл мүмкіндікті \"Параметрлер\" > \"Арнайы мүмкіндіктер\" тармағында өзгертуге болады."</string>
diff --git a/core/res/res/values-km/strings.xml b/core/res/res/values-km/strings.xml
index 4f7c0fe..ee451e9 100644
--- a/core/res/res/values-km/strings.xml
+++ b/core/res/res/values-km/strings.xml
@@ -1615,6 +1615,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"អ្នកបានគូរលំនាំដោះសោរបស់អ្នកមិនត្រឹមត្រូវចំនួន <xliff:g id="NUMBER_0">%1$d</xliff:g> ដង។ បន្ទាប់ពីការព្យាយាមមិនជោគជ័យច្រើនជាង <xliff:g id="NUMBER_1">%2$d</xliff:g> ដង អ្នកនឹងត្រូវបានស្នើឲ្យដោះសោទូរស័ព្ទរបស់អ្នកដោយប្រើគណនីអ៊ីមែល។\n\n ព្យាយាមម្ដងទៀតក្នុងរយៈពេល <xliff:g id="NUMBER_2">%3$d</xliff:g> វិនាទី។"</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"លុបចេញ"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"បង្កើនកម្រិតសំឡេងលើសពីកម្រិតបានផ្ដល់យោបល់?\n\nការស្ដាប់នៅកម្រិតសំឡេងខ្លាំងយូរអាចធ្វើឲ្យខូចត្រចៀក។"</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"ប្រើប្រាស់ផ្លូវកាត់ភាពងាយស្រួល?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"នៅពេលផ្លូវកាត់នេះបើក ការចុចប៊ូតុងកម្រិតសំឡេងទាំងពីរឲ្យជាប់រយៈពេល 3 វិនាទីនឹងចាប់ផ្តើមមុខងារភាពងាយស្រួល។\n\n មុខងារភាពងាយស្រួលបច្ចុប្បន្ន៖\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n អ្នកអាចផ្លាស់ប្តូរមុខងារនេះបាននៅក្នុងការ កំណត់ > ភាពងាយស្រួល។"</string>
diff --git a/core/res/res/values-kn/strings.xml b/core/res/res/values-kn/strings.xml
index 9efa857..7528284 100644
--- a/core/res/res/values-kn/strings.xml
+++ b/core/res/res/values-kn/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"ನಿಮ್ಮ ಅನ್ಲಾಕ್ ಪ್ಯಾಟರ್ನ್ ಅನ್ನು ನೀವು <xliff:g id="NUMBER_0">%1$d</xliff:g> ಬಾರಿ ತಪ್ಪಾಗಿ ಡ್ರಾ ಮಾಡಿರುವಿರಿ. <xliff:g id="NUMBER_1">%2$d</xliff:g> ಹೆಚ್ಚಿನ ವಿಫಲ ಪ್ರಯತ್ನಗಳ ಬಳಿಕ, ನಿಮ್ಮ ಇಮೇಲ್ ಖಾತೆಯನ್ನು ಬಳಸಿಕೊಂಡು ನಿಮ್ಮ ಫೋನ್ ಅನ್ಲಾಕ್ ಮಾಡುವಂತೆ ನಿಮ್ಮಲ್ಲಿ ಕೇಳಿಕೊಳ್ಳಲಾಗುತ್ತದೆ.\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> ಸೆಕೆಂಡುಗಳಲ್ಲಿ ಮತ್ತೆ ಪ್ರಯತ್ನಿಸಿ."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"ತೆಗೆದುಹಾಕು"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"ವಾಲ್ಯೂಮ್ ಅನ್ನು ಶಿಫಾರಸು ಮಾಡಲಾದ ಮಟ್ಟಕ್ಕಿಂತಲೂ ಹೆಚ್ಚು ಮಾಡುವುದೇ?\n\nದೀರ್ಘ ಅವಧಿಯವರೆಗೆ ಹೆಚ್ಚಿನ ವಾಲ್ಯೂಮ್ನಲ್ಲಿ ಆಲಿಸುವುದರಿಂದ ನಿಮ್ಮ ಆಲಿಸುವಿಕೆ ಸಾಮರ್ಥ್ಯಕ್ಕೆ ಹಾನಿಯುಂಟು ಮಾಡಬಹುದು."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"ಪ್ರವೇಶಿಸುವಿಕೆ ಶಾರ್ಟ್ಕಟ್ ಬಳಸುವುದೇ?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"ಶಾರ್ಟ್ಕಟ್ ಆನ್ ಆಗಿರುವಾಗ ಪ್ರವೇಶಿಸುವಿಕೆ ವೈಶಿಷ್ಟ್ಯ ಆನ್ ಮಾಡಲು, ಎರಡೂ ವಾಲ್ಯೂಮ್ ಬಟನ್ಗಳನ್ನು ನೀವು 3 ಸೆಕೆಂಡುಗಳ ಕಾಲ ಒತ್ತಬೇಕು.\n\nಪ್ರಸ್ತುತ ಪ್ರವೇಶಿಸುವಿಕೆ ವೈಶಿಷ್ಟ್ಯ: \n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n ಸೆಟ್ಟಿಂಗ್ಗಳು ಮತ್ತು ಪ್ರವೇಶಿಸುವಿಕೆಯಲ್ಲಿ ನೀವು ವೈಶಿಷ್ಟ್ಯವನ್ನು ಬದಲಾಯಿಸಬಹುದು."</string>
@@ -1987,8 +1989,7 @@
<string name="mime_type_spreadsheet_ext" msgid="8720173181137254414">"<xliff:g id="EXTENSION">%1$s</xliff:g> ಸ್ಪ್ರೆಡ್ಶೀಟ್"</string>
<string name="mime_type_presentation" msgid="1145384236788242075">"ಪ್ರಸ್ತುತಿ"</string>
<string name="mime_type_presentation_ext" msgid="8761049335564371468">"<xliff:g id="EXTENSION">%1$s</xliff:g> ಪ್ರಸ್ತುತಿ"</string>
- <!-- no translation found for bluetooth_airplane_mode_toast (2066399056595768554) -->
- <skip />
+ <string name="bluetooth_airplane_mode_toast" msgid="2066399056595768554">"ಏರ್ಪ್ಲೇನ್ ಮೋಡ್ನಲ್ಲಿರುವಾಗಲೂ ಬ್ಲೂಟೂತ್ ಆನ್ ಆಗಿರುತ್ತದೆ"</string>
<string name="car_loading_profile" msgid="8219978381196748070">"ಲೋಡ್ ಆಗುತ್ತಿದೆ"</string>
<plurals name="file_count" formatted="false" msgid="7063513834724389247">
<item quantity="one"><xliff:g id="FILE_NAME_2">%s</xliff:g> + <xliff:g id="COUNT_3">%d</xliff:g> ಫೈಲ್ಗಳು</item>
@@ -2009,8 +2010,7 @@
<!-- no translation found for accessibility_system_action_accessibility_menu_label (8436484650391125184) -->
<skip />
<string name="accessibility_freeform_caption" msgid="8377519323496290122">"<xliff:g id="APP_NAME">%1$s</xliff:g> ಆ್ಯಪ್ನ ಶೀರ್ಷಿಕೆಯ ಪಟ್ಟಿ."</string>
- <!-- no translation found for as_app_forced_to_restricted_bucket (8233871289353898964) -->
- <skip />
+ <string name="as_app_forced_to_restricted_bucket" msgid="8233871289353898964">"<xliff:g id="PACKAGE_NAME">%1$s</xliff:g> ಅನ್ನು ನಿರ್ಬಂಧಿತ ಬಕೆಟ್ಗೆ ಹಾಕಲಾಗಿದೆ"</string>
<!-- no translation found for resolver_personal_tab (2051260504014442073) -->
<skip />
<!-- no translation found for resolver_work_tab (2690019516263167035) -->
diff --git a/core/res/res/values-ko/strings.xml b/core/res/res/values-ko/strings.xml
index 90fa0fa..d5b4507 100644
--- a/core/res/res/values-ko/strings.xml
+++ b/core/res/res/values-ko/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"잠금해제 패턴을 <xliff:g id="NUMBER_0">%1$d</xliff:g>회 잘못 그렸습니다. <xliff:g id="NUMBER_1">%2$d</xliff:g>회 더 실패하면 이메일 계정을 사용하여 휴대전화를 잠금해제해야 합니다.\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g>초 후에 다시 시도해 주세요."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"삭제"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"권장 수준 이상으로 볼륨을 높이시겠습니까?\n\n높은 볼륨으로 장시간 청취하면 청력에 손상이 올 수 있습니다."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"접근성 단축키를 사용하시겠습니까?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"단축키가 사용 설정된 경우 두 개의 볼륨 버튼을 3초간 누르면 접근성 기능이 시작됩니다.\n\n 현재 접근성 기능:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n \'설정 > 접근성\'에서 기능을 변경할 수 있습니다."</string>
diff --git a/core/res/res/values-ky/strings.xml b/core/res/res/values-ky/strings.xml
index 07a6e3f..533e0b8 100644
--- a/core/res/res/values-ky/strings.xml
+++ b/core/res/res/values-ky/strings.xml
@@ -540,7 +540,7 @@
<string name="fingerprint_error_timeout" msgid="2946635815726054226">"Манжа изин күтүү мөөнөтү бүттү. Кайра аракет кылыңыз."</string>
<string name="fingerprint_error_canceled" msgid="540026881380070750">"Манжа изи иш-аракети жокко чыгарылды."</string>
<string name="fingerprint_error_user_canceled" msgid="7685676229281231614">"Манжа изи операциясын колдонуучу жокко чыгарды."</string>
- <string name="fingerprint_error_lockout" msgid="7853461265604738671">"Аракеттер өтө көп болду. Кийинчерээк кайра аракет кылыңыз."</string>
+ <string name="fingerprint_error_lockout" msgid="7853461265604738671">"Аракеттер өтө көп болду. Бир аздан кийин кайталап көрүңүз."</string>
<string name="fingerprint_error_lockout_permanent" msgid="3895478283943513746">"Өтө көп жолу аракет жасадыңыз. Манжа изинин сенсору өчүрүлдү."</string>
<string name="fingerprint_error_unable_to_process" msgid="1148553603490048742">"Кайра бир аракеттениңиз."</string>
<string name="fingerprint_error_no_fingerprints" msgid="8671811719699072411">"Бир да манжа изи катталган эмес."</string>
@@ -583,7 +583,7 @@
<string name="face_error_no_space" msgid="5649264057026021723">"Жаңы жүздү сактоо мүмкүн эмес. Адегенде эскисин өчүрүңүз."</string>
<string name="face_error_canceled" msgid="2164434737103802131">"Жүздүн аныктыгын текшерүү жокко чыгарылды."</string>
<string name="face_error_user_canceled" msgid="8553045452825849843">"Жүзүнөн таануу функциясын колдонуучу өчүрүп салды."</string>
- <string name="face_error_lockout" msgid="7864408714994529437">"Өтө көп жолу аракет жасадыңыз. Кийинчерээк кайра аракет кылыңыз."</string>
+ <string name="face_error_lockout" msgid="7864408714994529437">"Өтө көп жолу аракет жасадыңыз. Бир аздан кийин кайталап көрүңүз."</string>
<string name="face_error_lockout_permanent" msgid="8277853602168960343">"Өтө көп жолу аракет кылдыңыз. Жүзүнөн таануу функциясы өчүрүлдү."</string>
<string name="face_error_unable_to_process" msgid="5723292697366130070">"Жүз ырасталбай жатат. Кайра аракет кылыңыз."</string>
<string name="face_error_not_enrolled" msgid="7369928733504691611">"Жүзүнөн таануу функциясын жөндөй элексиз."</string>
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Графикалык ачкычты <xliff:g id="NUMBER_0">%1$d</xliff:g> жолу туура эмес көрсөттүңүз. <xliff:g id="NUMBER_1">%2$d</xliff:g> жолу туура эмес көрсөтүлгөндөн кийин, телефондун кулпусун ачуу үчүн Google аккаунтуңузга кирүүгө туура келет.\n\n<xliff:g id="NUMBER_2">%3$d</xliff:g> секундадан кийин кайталап көрсөңүз болот."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Алып салуу"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Сунушталган деңгээлден да катуулатып уккуңуз келеби?\n\nМузыканы узакка чейин катуу уксаңыз, угууңуз начарлап кетиши мүмкүн."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Ыкчам иштетесизби?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Атайын мүмкүнчүлүктөр функциясын пайдалануу үчүн, ал күйгүзүлгөндө, үндү катуулатып/акырындаткан эки баскычты тең үч секунддай кое бербей басып туруңуз.\n\n Учурдагы атайын мүмкүнчүлүктөрдүн жөндөөлөрү:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\nЖөндөөлөр > Атайын мүмкүнчүлүктөр бөлүмүнөн өзгөртө аласыз."</string>
diff --git a/core/res/res/values-lo/strings.xml b/core/res/res/values-lo/strings.xml
index 05f9698..7a3e85e 100644
--- a/core/res/res/values-lo/strings.xml
+++ b/core/res/res/values-lo/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"ທ່ານແຕ້ມຮູບແບບປົດລັອກຂອງທ່ານຜິດ <xliff:g id="NUMBER_0">%1$d</xliff:g> ເທື່ອແລ້ວ. ຫຼັງຈາກຄວາມພະຍາຍາມອີກ <xliff:g id="NUMBER_1">%2$d</xliff:g> ເທື່ອ ທ່ານຈະຖືກຖາມໃຫ້ປົດລັອກໂທລະສັບຂອງທ່ານດ້ວຍບັນຊີອີເມວ.\n\n ລອງໃໝ່ອີກຄັ້ງໃນ <xliff:g id="NUMBER_2">%3$d</xliff:g> ວິນາທີ."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"ລຶບອອກ"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"ເພີ່ມລະດັບສຽງໃຫ້ເກີນກວ່າລະດັບທີ່ແນະນຳບໍ?\n\nການຮັບຟັງສຽງໃນລະດັບທີ່ສູງເປັນໄລຍະເວລາດົນອາດເຮັດໃຫ້ການຟັງຂອງທ່ານມີບັນຫາໄດ້."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"ໃຊ້ປຸ່ມລັດການຊ່ວຍເຂົ້າເຖິງບໍ?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"ເມື່ອເປີດໃຊ້ປຸ່ມລັດແລ້ວ, ໃຫ້ກົດປຸ່ມສຽງທັງສອງຄ້າງໄວ້ 3 ວິນາທີເພື່ອເລີ່ມຄຸນສົມບັດການຊ່ວຍເຂົ້າເຖິງ.\n\n ຄຸນສົມບັດການຊ່ວຍເຂົ້າເຖິງປັດຈຸບັນ:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n ທ່ານສາມາດປ່ຽນຄຸນສົມບັດໄດ້ໃນການຕັ້ງຄ່າ > ການຊ່ວຍເຂົ້າເຖິງ."</string>
diff --git a/core/res/res/values-lt/strings.xml b/core/res/res/values-lt/strings.xml
index 4f48685..265c97e 100644
--- a/core/res/res/values-lt/strings.xml
+++ b/core/res/res/values-lt/strings.xml
@@ -1657,6 +1657,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Netinkamai nupiešėte atrakinimo piešinį <xliff:g id="NUMBER_0">%1$d</xliff:g> k. Po dar <xliff:g id="NUMBER_1">%2$d</xliff:g> nesėkm. band. būsite paprašyti atrakinti telefoną naudodami „Google“ prisijungimo duomenis.\n\n Bandykite dar kartą po <xliff:g id="NUMBER_2">%3$d</xliff:g> sek."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" – "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Pašalinti"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Padidinti garsą daugiau nei rekomenduojamas lygis?\n\nIlgai klausydami dideliu garsu galite pažeisti klausą."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Naudoti spartųjį pritaikymo neįgaliesiems klavišą?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Kai spartusis klavišas įjungtas, spaudžiant abu garsumo mygtukus 3 sekundes bus paleista pritaikymo neįgaliesiems funkcija.\n\n Dabartinė pritaikymo neįgaliesiems funkcija:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>„\n“\n Funkciją galite pakeisti skiltyje „Nustatymai“ > „Pritaikymas neįgaliesiems“."</string>
diff --git a/core/res/res/values-lv/strings.xml b/core/res/res/values-lv/strings.xml
index ae9abc6..a535f6d 100644
--- a/core/res/res/values-lv/strings.xml
+++ b/core/res/res/values-lv/strings.xml
@@ -1635,6 +1635,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Jūs nepareizi norādījāt atbloķēšanas kombināciju <xliff:g id="NUMBER_0">%1$d</xliff:g> reizes. Pēc vēl <xliff:g id="NUMBER_1">%2$d</xliff:g> neveiksmīgiem mēģinājumiem tālrunis būs jāatbloķē, izmantojot e-pasta kontu.\n\nMēģiniet vēlreiz pēc <xliff:g id="NUMBER_2">%3$d</xliff:g> sekundēm."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Noņemt"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Vai palielināt skaļumu virs ieteicamā līmeņa?\n\nIlgstoši klausoties skaņu lielā skaļumā, var tikt bojāta dzirde."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Vai izmantot pieejamības saīsni?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Ja saīsne ir iespējota, vienlaikus nospiežot abas skaļuma regulēšanas pogas un trīs sekundes turot tās, tiks palaista pieejamības funkcija.\n\n Pašreiz iestatītā pieejamības funkcija:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n Šo funkciju var mainīt sadaļā Iestatījumi > Pieejamība."</string>
diff --git a/core/res/res/values-mk/strings.xml b/core/res/res/values-mk/strings.xml
index f1e5406..2f75269 100644
--- a/core/res/res/values-mk/strings.xml
+++ b/core/res/res/values-mk/strings.xml
@@ -1615,6 +1615,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Погрешно сте ја употребиле вашата шема на отклучување <xliff:g id="NUMBER_0">%1$d</xliff:g> пати. По <xliff:g id="NUMBER_1">%2$d</xliff:g> неуспешни обиди, ќе побараат од вас да го отклучите телефонот со користење сметка на е-пошта.\n\n Обидете се повторно за <xliff:g id="NUMBER_2">%3$d</xliff:g> секунди."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Отстрани"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Да го зголемиме звукот над препорачаното ниво?\n\nСлушањето звуци со голема јачина подолги периоди може да ви го оштети сетилото за слух."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Да се користи кратенка за „Пристапност“?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Кога е вклучена кратенката, ако ги притиснете двете копчиња за јачина на звук во времетраење од 3 секунди, ќе се стартува функција на пристапност.\n\n Тековна функција на пристапност:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n Функцијата може да ја промените во „Поставки“ > „Пристапност“."</string>
diff --git a/core/res/res/values-ml/strings.xml b/core/res/res/values-ml/strings.xml
index f0cc48c..25d7212 100644
--- a/core/res/res/values-ml/strings.xml
+++ b/core/res/res/values-ml/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"നിങ്ങളുടെ അൺലോക്ക് പാറ്റേൺ <xliff:g id="NUMBER_0">%1$d</xliff:g> തവണ തെറ്റായി വരച്ചു. <xliff:g id="NUMBER_1">%2$d</xliff:g> ശ്രമങ്ങൾ കൂടി വിജയിച്ചില്ലെങ്കിൽ, ഒരു ഇമെയിൽ അക്കൗണ്ട് ഉപയോഗിച്ച് ഫോൺ അൺലോക്ക് ചെയ്യാൻ നിങ്ങളോട് ആവശ്യപ്പെടും.\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> സെക്കൻഡിനുള്ള വീണ്ടും ശ്രമിക്കുക."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"നീക്കംചെയ്യുക"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"മുകളിൽക്കൊടുത്തിരിക്കുന്ന ശുപാർശചെയ്ത ലെവലിലേക്ക് വോളിയം വർദ്ധിപ്പിക്കണോ?\n\nഉയർന്ന വോളിയത്തിൽ ദീർഘനേരം കേൾക്കുന്നത് നിങ്ങളുടെ ശ്രവണ ശേഷിയെ ദോഷകരമായി ബാധിക്കാം."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"ഉപയോഗസഹായി കുറുക്കുവഴി ഉപയോഗിക്കണോ?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"കുറുക്കുവഴി ഓണാണെങ്കിൽ, രണ്ട് വോളിയം ബട്ടണുകളും 3 സെക്കൻഡ് നേരത്തേക്ക് അമർത്തുന്നത് ഉപയോഗസഹായി ഫീച്ചർ ആരംഭിക്കും.\n\n നിലവിലെ ഉപയോഗസഹായി ഫീച്ചർ:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n ക്രമീകരണം > ഉപയോഗസഹായി എന്നതിൽ ഏത് സമയത്തും നിങ്ങൾക്ക് ഫീച്ചർ മാറ്റാവുന്നതാണ്."</string>
@@ -1987,8 +1989,7 @@
<string name="mime_type_spreadsheet_ext" msgid="8720173181137254414">"<xliff:g id="EXTENSION">%1$s</xliff:g> സ്പ്രെഡ്ഷീറ്റ്"</string>
<string name="mime_type_presentation" msgid="1145384236788242075">"അവതരണം"</string>
<string name="mime_type_presentation_ext" msgid="8761049335564371468">"<xliff:g id="EXTENSION">%1$s</xliff:g> അവതരണം"</string>
- <!-- no translation found for bluetooth_airplane_mode_toast (2066399056595768554) -->
- <skip />
+ <string name="bluetooth_airplane_mode_toast" msgid="2066399056595768554">"ഫ്ലൈറ്റ് മോഡ് ഓണാക്കിയിരിക്കുമ്പോഴും Bluetooth ലഭ്യമാകും"</string>
<string name="car_loading_profile" msgid="8219978381196748070">"ലോഡ് ചെയ്യുന്നു"</string>
<plurals name="file_count" formatted="false" msgid="7063513834724389247">
<item quantity="other"><xliff:g id="FILE_NAME_2">%s</xliff:g> + <xliff:g id="COUNT_3">%d</xliff:g> ഫയലുകൾ</item>
@@ -2009,8 +2010,7 @@
<!-- no translation found for accessibility_system_action_accessibility_menu_label (8436484650391125184) -->
<skip />
<string name="accessibility_freeform_caption" msgid="8377519323496290122">"<xliff:g id="APP_NAME">%1$s</xliff:g> എന്നതിന്റെ അടിക്കുറിപ്പ് ബാർ."</string>
- <!-- no translation found for as_app_forced_to_restricted_bucket (8233871289353898964) -->
- <skip />
+ <string name="as_app_forced_to_restricted_bucket" msgid="8233871289353898964">"<xliff:g id="PACKAGE_NAME">%1$s</xliff:g> നിയന്ത്രിത ബക്കറ്റിലേക്ക് നീക്കി"</string>
<!-- no translation found for resolver_personal_tab (2051260504014442073) -->
<skip />
<!-- no translation found for resolver_work_tab (2690019516263167035) -->
diff --git a/core/res/res/values-mn/strings.xml b/core/res/res/values-mn/strings.xml
index 3be3a04..3acdb72 100644
--- a/core/res/res/values-mn/strings.xml
+++ b/core/res/res/values-mn/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Та тайлах хээг <xliff:g id="NUMBER_0">%1$d</xliff:g> удаа буруу зурлаа. <xliff:g id="NUMBER_1">%2$d</xliff:g> удаа дахин буруу оруулбал, та утсаа тайлахын тулд имэйл бүртгэлээ ашиглах шаардлагатай болно.\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> секундын дараа дахин оролдоно уу."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Устгах"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Дууг санал болгосноос чанга болгож өсгөх үү?\n\nУрт хугацаанд чанга хөгжим сонсох нь таны сонсголыг муутгаж болно."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Хүртээмжийн товчлолыг ашиглах уу?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Товчлолыг асаасан үед дуун товчлуурыг 3 секунд дарснаар хүртээмжийн онцлогийг эхлүүлнэ.\n\n Одоогийн хүртээмжийн онцлог:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n Онцлогийг Тохиргоо > Хүртээмж хэсэгт өөрчлөх боломжтой."</string>
@@ -1987,8 +1989,7 @@
<string name="mime_type_spreadsheet_ext" msgid="8720173181137254414">"<xliff:g id="EXTENSION">%1$s</xliff:g>-н хүснэгт"</string>
<string name="mime_type_presentation" msgid="1145384236788242075">"Үзүүлэн"</string>
<string name="mime_type_presentation_ext" msgid="8761049335564371468">"<xliff:g id="EXTENSION">%1$s</xliff:g>-н үзүүлэн"</string>
- <!-- no translation found for bluetooth_airplane_mode_toast (2066399056595768554) -->
- <skip />
+ <string name="bluetooth_airplane_mode_toast" msgid="2066399056595768554">"Нислэгийн горимын үеэр Bluetooth асаалттай байх болно"</string>
<string name="car_loading_profile" msgid="8219978381196748070">"Ачаалж байна"</string>
<plurals name="file_count" formatted="false" msgid="7063513834724389247">
<item quantity="other"><xliff:g id="FILE_NAME_2">%s</xliff:g> + <xliff:g id="COUNT_3">%d</xliff:g> файл</item>
@@ -2009,8 +2010,7 @@
<!-- no translation found for accessibility_system_action_accessibility_menu_label (8436484650391125184) -->
<skip />
<string name="accessibility_freeform_caption" msgid="8377519323496290122">"<xliff:g id="APP_NAME">%1$s</xliff:g>-н гарчгийн талбар."</string>
- <!-- no translation found for as_app_forced_to_restricted_bucket (8233871289353898964) -->
- <skip />
+ <string name="as_app_forced_to_restricted_bucket" msgid="8233871289353898964">"<xliff:g id="PACKAGE_NAME">%1$s</xliff:g>-г ХЯЗГААРЛАСАН сагс руу орууллаа"</string>
<!-- no translation found for resolver_personal_tab (2051260504014442073) -->
<skip />
<!-- no translation found for resolver_work_tab (2690019516263167035) -->
diff --git a/core/res/res/values-mr/strings.xml b/core/res/res/values-mr/strings.xml
index a2bf479..ff9f3e7 100644
--- a/core/res/res/values-mr/strings.xml
+++ b/core/res/res/values-mr/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"तुम्ही तुमचा अनलॉक पॅटर्न <xliff:g id="NUMBER_0">%1$d</xliff:g> वेळा अयोग्यपणे काढला आहे. आणखी <xliff:g id="NUMBER_1">%2$d</xliff:g> अयशस्वी प्रयत्नांनंतर, तुम्हाला ईमेल खाते वापरून तुमचा फोन अनलॉक करण्यास सांगितले जाईल.\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> सेकंदांमध्ये पुन्हा प्रयत्न करा."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"काढा"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"शिफारस केलेल्या पातळीच्या वर आवाज वाढवायचा?\n\nउच्च आवाजात दीर्घ काळ ऐकण्याने आपल्या श्रवणशक्तीची हानी होऊ शकते."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"प्रवेशयोग्यता शॉर्टकट वापरायचा?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"शॉर्टकट चालू असताना, दोन्ही आवाज बटणे 3 सेकंद दाबल्याने प्रवेशयोग्यता वैशिष्ट्य सुरू होईल.\n\n वर्तमान प्रवेशयोग्यता वैशिष्ट्य:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n तुम्ही सेटिंग्ज > प्रवेशयोग्यता मध्ये वैशिष्ट्य बदलू शकता."</string>
diff --git a/core/res/res/values-ms/strings.xml b/core/res/res/values-ms/strings.xml
index f7626db..e436408 100644
--- a/core/res/res/values-ms/strings.xml
+++ b/core/res/res/values-ms/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Anda telah tersilap lukis corak buka kunci sebanyak <xliff:g id="NUMBER_0">%1$d</xliff:g> kali. Selepas <xliff:g id="NUMBER_1">%2$d</xliff:g> lagi percubaan yang tidak berjaya, anda akan diminta membuka kunci telefon anda menggunakan log masuk Google anda.\n\n Cuba lagi dalam <xliff:g id="NUMBER_2">%3$d</xliff:g> saat."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Alih keluar"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Naikkan kelantangan melebihi paras yang disyokorkan?\n\nMendengar pada kelantangan yang tinggi untuk tempoh yang lama boleh merosakkan pendengaran anda."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Gunakan Pintasan Kebolehaksesan?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Apabila pintasan dihidupkan, tindakan menekan kedua-dua butang kelantangan selama 3 saat akan memulakan ciri kebolehaksesan.\n\n Ciri kebolehaksesan semasa:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n Anda boleh menukar ciri itu dalam Tetapan > Kebolehaksesan."</string>
diff --git a/core/res/res/values-my/strings.xml b/core/res/res/values-my/strings.xml
index 556837e..56f49c2 100644
--- a/core/res/res/values-my/strings.xml
+++ b/core/res/res/values-my/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"သင် ပုံဖော်၍သော့ဖွင့်ခြင်းကို <xliff:g id="NUMBER_0">%1$d</xliff:g> အကြိမ် မှန်ကန်စွာ မပြုလုပ်နိုင်ပါ။ နောက်ထပ် <xliff:g id="NUMBER_1">%2$d</xliff:g> အကြိမ် မမှန်ကန်ပါက သင့်ဖုန်းအား အီးမေးလ်အသုံးပြု၍ သော့ဖွင့်ရန် တောင်းဆိုပါလိမ့်မည်။ \n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> စက္ကန့်အကြာတွင် ပြန်လည် ကြိုးစားပါ"</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"ဖယ်ရှားရန်"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"အသံကို အကြံပြုထားသည့် ပမာဏထက် မြှင့်ပေးရမလား?\n\nအသံကို မြင့်သည့် အဆင့်မှာ ကြာရှည်စွာ နားထောင်ခြင်းက သင်၏ နားကို ထိခိုက်စေနိုင်သည်။"</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"အများသုံးစွဲနိုင်မှု ဖြတ်လမ်းလင့်ခ်ကို အသုံးပြုလိုပါသလား။"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"ဖြတ်လမ်းလင့်ခ်ကို ဖွင့်ထားစဉ် အသံအတိုးအလျှော့ခလုတ် နှစ်ခုစလုံးကို ၃ စက္ကန့်ခန့် ဖိထားခြင်းဖြင့် အများသုံးစွဲနိုင်မှုဆိုင်ရာ ဝန်ဆောင်မှုကို ဖွင့်နိုင်သည်။\n\n လက်ရှိ အများသုံးစွဲနိုင်မှုဆိုင်ရာ ဝန်ဆောင်မှု−\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n ဝန်ဆောင်မှုကို ဆက်တင်များ > အများသုံးစွဲနိုင်မှုတွင် ပြောင်းလဲနိုင်ပါသည်။"</string>
diff --git a/core/res/res/values-nb/strings.xml b/core/res/res/values-nb/strings.xml
index 6f3b6c2..bb3d52f 100644
--- a/core/res/res/values-nb/strings.xml
+++ b/core/res/res/values-nb/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Du har tegnet opplåsningsmønsteret feil <xliff:g id="NUMBER_0">%1$d</xliff:g> ganger. Etter ytterligere <xliff:g id="NUMBER_1">%2$d</xliff:g> gale forsøk, blir du bedt om å låse opp telefonen via en e-postkonto.\n\n Prøv på nytt om <xliff:g id="NUMBER_2">%3$d</xliff:g> sekunder."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Fjern"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Vil du øke volumet til over anbefalt nivå?\n\nHvis du hører på et høyt volum over lengre perioder, kan det skade hørselen din."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Vil du bruke tilgjengelighetssnarveien?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Når snarveien er på, starter en tilgjengelighetsfunksjon når du trykker inn begge volumknappene i tre sekunder.\n\n Nåværende tilgjengelighetsfunksjon:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n Du kan endre funksjonen i Innstillinger > Tilgjengelighet."</string>
diff --git a/core/res/res/values-ne/strings.xml b/core/res/res/values-ne/strings.xml
index ebbf50b..b3d6cde 100644
--- a/core/res/res/values-ne/strings.xml
+++ b/core/res/res/values-ne/strings.xml
@@ -1619,6 +1619,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"तपाईँले आफ्नो अनलक ढाँचा गलत रूपमा <xliff:g id="NUMBER_0">%1$d</xliff:g> पटक तान्नु भएको छ। <xliff:g id="NUMBER_1">%2$d</xliff:g> धेरै असफल प्रयासहरूपछि, तपाईँलाई एउटा इमेल खाताको प्रयोग गरेर तपाईँको फोन अनलक गर्न सोधिने छ।\n\n फेरि <xliff:g id="NUMBER_2">%3$d</xliff:g> सेकेन्डमा प्रयास गर्नुहोस्।"</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"हटाउनुहोस्"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"सिफारिस तहभन्दा आवाज ठुलो गर्नुहुन्छ?\n\nलामो समय सम्म उच्च आवाजमा सुन्दा तपाईँको सुन्ने शक्तिलाई हानी गर्न सक्छ।"</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"पहुँच सम्बन्धी सर्टकट प्रयोग गर्ने हो?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"सर्टकट सक्रिय हुँदा, भोल्युमका दुवै बटनहरूलाई ३ सेकेन्डसम्म थिची राख्नाले पहुँच सम्बन्धी कुनै सुविधा सुरु हुनेछ।\n\n हाल व्यवहारमा रहेको पहुँच सम्बन्धी सुविधा:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n तपाईं सेटिङहरू अन्तर्गतको पहुँच सम्बन्धी विकल्पमा गई उक्त सुविधालाई बदल्न सक्नुहुन्छ।"</string>
@@ -1993,8 +1995,7 @@
<string name="mime_type_spreadsheet_ext" msgid="8720173181137254414">"<xliff:g id="EXTENSION">%1$s</xliff:g> स्प्रेडसिट"</string>
<string name="mime_type_presentation" msgid="1145384236788242075">"प्रस्तुति"</string>
<string name="mime_type_presentation_ext" msgid="8761049335564371468">"<xliff:g id="EXTENSION">%1$s</xliff:g> प्रस्तुति"</string>
- <!-- no translation found for bluetooth_airplane_mode_toast (2066399056595768554) -->
- <skip />
+ <string name="bluetooth_airplane_mode_toast" msgid="2066399056595768554">"हवाइजहाज मोडमा ब्लुटुथ सक्रिय रहने छ"</string>
<string name="car_loading_profile" msgid="8219978381196748070">"लोड गर्दै"</string>
<plurals name="file_count" formatted="false" msgid="7063513834724389247">
<item quantity="other"><xliff:g id="FILE_NAME_2">%s</xliff:g> + <xliff:g id="COUNT_3">%d</xliff:g> फाइलहरू</item>
@@ -2015,8 +2016,7 @@
<!-- no translation found for accessibility_system_action_accessibility_menu_label (8436484650391125184) -->
<skip />
<string name="accessibility_freeform_caption" msgid="8377519323496290122">"<xliff:g id="APP_NAME">%1$s</xliff:g> को क्याप्सन बार।"</string>
- <!-- no translation found for as_app_forced_to_restricted_bucket (8233871289353898964) -->
- <skip />
+ <string name="as_app_forced_to_restricted_bucket" msgid="8233871289353898964">"<xliff:g id="PACKAGE_NAME">%1$s</xliff:g> लाई प्रतिबन्धित बाल्टीमा राखियो"</string>
<!-- no translation found for resolver_personal_tab (2051260504014442073) -->
<skip />
<!-- no translation found for resolver_work_tab (2690019516263167035) -->
diff --git a/core/res/res/values-nl/strings.xml b/core/res/res/values-nl/strings.xml
index 0635c21..47de950 100644
--- a/core/res/res/values-nl/strings.xml
+++ b/core/res/res/values-nl/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Je hebt je ontgrendelingspatroon <xliff:g id="NUMBER_0">%1$d</xliff:g> keer onjuist getekend. Na nog eens <xliff:g id="NUMBER_1">%2$d</xliff:g> mislukte pogingen wordt u gevraagd je telefoon te ontgrendelen via een e-mailaccount.\n\n Probeer het over <xliff:g id="NUMBER_2">%3$d</xliff:g> seconden opnieuw."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Verwijderen"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Volume verhogen tot boven het aanbevolen niveau?\n\nAls je langere tijd op hoog volume naar muziek luistert, raakt je gehoor mogelijk beschadigd."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Snelkoppeling toegankelijkheid gebruiken?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Wanneer de snelkoppeling is ingeschakeld, kun je drie seconden op beide volumeknoppen drukken om een toegankelijkheidsfunctie te starten.\n\n Huidige toegankelijkheidsfunctie:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n Je kunt de functie wijzigen in Instellingen > Toegankelijkheid."</string>
diff --git a/core/res/res/values-or/strings.xml b/core/res/res/values-or/strings.xml
index 03a7ea3..1242188 100644
--- a/core/res/res/values-or/strings.xml
+++ b/core/res/res/values-or/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"ଆପଣଙ୍କ ଅନଲକ୍ ପାଟର୍ନକୁ ଆପଣ <xliff:g id="NUMBER_0">%1$d</xliff:g> ଥର ଭୁଲ ଭାବେ ଅଙ୍କନ କରିଛନ୍ତି। ଆଉ <xliff:g id="NUMBER_1">%2$d</xliff:g>ଟି ଭୁଲ ପ୍ରୟାସ ପରେ ଏକ ଇମେଲ୍ ଆକାଉଣ୍ଟ ବ୍ୟବହାର କରି ନିଜ ଫୋନ୍କୁ ଅନଲକ୍ କରିବା ପାଇଁ କୁହାଯିବ।\n\n<xliff:g id="NUMBER_2">%3$d</xliff:g> ସେକେଣ୍ଡ ପରେ ପୁଣି ଚେଷ୍ଟା କରନ୍ତୁ।"</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"ବାହାର କରନ୍ତୁ"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"ମାତ୍ରା ବଢ଼ାଇ ସୁପାରିଶ ସ୍ତର ବଢ଼ାଉଛନ୍ତି? \n\n ଲମ୍ବା ସମୟ ପର୍ଯ୍ୟନ୍ତ ଉଚ୍ଚ ଶବ୍ଦରେ ଶୁଣିଲେ ଆପଣଙ୍କ ଶ୍ରବଣ ଶକ୍ତି ଖରାପ ହୋଇପାରେ।"</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"ଆକ୍ସେସବିଲିଟି ଶର୍ଟକଟ୍ ବ୍ୟବହାର କରିବେ?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"ସର୍ଟକଟ୍ ଅନ୍ ଥିବା ବେଳେ, ଉଭୟ ଭଲ୍ୟୁମ୍ ବଟନ୍ 3 ସେକେଣ୍ଡ ପାଇଁ ଦବାଇବା ଦ୍ୱାରା ଆକ୍ସେସବିଲିଟି ବୈଶିଷ୍ଟ ଆରମ୍ଭ ହେବ।\n\n ସମ୍ପ୍ରତି ଆକ୍ସେସବିଲିଟି ବୈଶିଷ୍ଟ୍ୟ:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n ସେଟିଙ୍ଗ ଓ ଆକ୍ସେସବିଲିଟିରେ ଆପଣ ବୈଶିଷ୍ଟ୍ୟ ବଦଳାଇ ପାରିବେ।"</string>
diff --git a/core/res/res/values-pa/strings.xml b/core/res/res/values-pa/strings.xml
index b2cca4d..b6513c3 100644
--- a/core/res/res/values-pa/strings.xml
+++ b/core/res/res/values-pa/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"ਤੁਸੀਂ <xliff:g id="NUMBER_0">%1$d</xliff:g> ਵਾਰ ਆਪਣਾ ਅਣਲਾਕ ਪੈਟਰਨ ਗਲਤ ਢੰਗ ਨਾਲ ਡ੍ਰਾ ਕੀਤਾ ਹੈ। <xliff:g id="NUMBER_1">%2$d</xliff:g> ਹੋਰ ਅਸਫਲ ਕੋਸ਼ਿਸ਼ਾਂ ਤੋਂ ਬਾਅਦ, ਤੁਹਾਨੂੰ ਇੱਕ ਈਮੇਲ ਖਾਤਾ ਵਰਤਦੇ ਹੋਏ ਆਪਣਾ ਫ਼ੋਨ ਅਣਲਾਕ ਕਰਨ ਲਈ ਕਿਹਾ ਜਾਏਗਾ।\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> ਸਕਿੰਟਾਂ ਵਿੱਚ ਦੁਬਾਰਾ ਕੋਸ਼ਿਸ਼ ਕਰੋ।"</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"ਹਟਾਓ"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"ਕੀ ਵੌਲਿਊਮ ਸਿਫ਼ਾਰਸ਼ ਕੀਤੇ ਪੱਧਰ ਤੋਂ ਵਧਾਉਣੀ ਹੈ?\n\nਲੰਮੇ ਸਮੇਂ ਤੱਕ ਉੱਚ ਵੌਲਿਊਮ ਤੇ ਸੁਣਨ ਨਾਲ ਤੁਹਾਡੀ ਸੁਣਨ ਸ਼ਕਤੀ ਨੂੰ ਨੁਕਸਾਨ ਪਹੁੰਚ ਸਕਦਾ ਹੈ।"</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"ਕੀ ਪਹੁੰਚਯੋਗਤਾ ਸ਼ਾਰਟਕੱਟ ਵਰਤਣਾ ਹੈ?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"ਸ਼ਾਰਟਕੱਟ ਚਾਲੂ ਹੋਣ \'ਤੇ, ਕਿਸੇ ਪਹੁੰਚਯੋਗਤਾ ਵਿਸ਼ੇਸ਼ਤਾ ਨੂੰ ਸ਼ੁਰੂ ਕਰਨ ਲਈ ਅਵਾਜ਼ ਬਟਨਾਂ ਨੂੰ 3 ਸਕਿੰਟ ਲਈ ਦਬਾ ਕੇ ਰੱਖੋ।\n\n ਵਰਤਮਾਨ ਪਹੁੰਚਯੋਗਤਾ ਵਿਸ਼ੇਸ਼ਤਾ:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n ਤੁਸੀਂ ਸੈਟਿੰਗਾਂ > ਪਹੁੰਚਯੋਗਤਾ ਵਿੱਚ ਵਿਸ਼ੇਸ਼ਤਾ ਨੂੰ ਬਦਲ ਸਕਦੇ ਹੋ।"</string>
diff --git a/core/res/res/values-pl/strings.xml b/core/res/res/values-pl/strings.xml
index 94fd851..964c973 100644
--- a/core/res/res/values-pl/strings.xml
+++ b/core/res/res/values-pl/strings.xml
@@ -1657,6 +1657,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Po raz <xliff:g id="NUMBER_0">%1$d</xliff:g> nieprawidłowo narysowałeś wzór odblokowania. Po kolejnych <xliff:g id="NUMBER_1">%2$d</xliff:g> nieudanych próbach konieczne będzie odblokowanie telefonu przy użyciu danych logowania na konto Google.\n\n Spróbuj ponownie za <xliff:g id="NUMBER_2">%3$d</xliff:g> s."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" – "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Usuń"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Zwiększyć głośność ponad zalecany poziom?\n\nSłuchanie głośno przez długi czas może uszkodzić Twój słuch."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Użyć skrótu do ułatwień dostępu?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Gdy skrót jest włączony, jednoczesne naciśnięcie przez trzy sekundy obu klawiszy sterowania głośnością uruchomi funkcję ułatwień dostępu.\n\nBieżąca funkcja ułatwień dostępu:\n<xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\nFunkcję możesz zmienić, wybierając Ustawienia > Ułatwienia dostępu."</string>
diff --git a/core/res/res/values-pt-rBR/strings.xml b/core/res/res/values-pt-rBR/strings.xml
index 72a3ce9..a6fd0fe 100644
--- a/core/res/res/values-pt-rBR/strings.xml
+++ b/core/res/res/values-pt-rBR/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Você desenhou sua sequência de desbloqueio incorretamente <xliff:g id="NUMBER_0">%1$d</xliff:g> vezes. Se fizer mais <xliff:g id="NUMBER_1">%2$d</xliff:g> tentativas incorretas, será solicitado que você use o login do Google para desbloquear.\n\n Tente novamente em <xliff:g id="NUMBER_2">%3$d</xliff:g> segundos."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Remover"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Aumentar o volume acima do nível recomendado?\n\nOuvir em volume alto por longos períodos pode danificar sua audição."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Usar atalho de Acessibilidade?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Quando o atalho está ativado, pressione os dois botões de volume por três segundos para iniciar um recurso de acessibilidade.\n\n Recurso de acessibilidade atual:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n É possível alterar o recurso em Configurações > Acessibilidade."</string>
diff --git a/core/res/res/values-pt-rPT/strings.xml b/core/res/res/values-pt-rPT/strings.xml
index 4f45517..81f5ced 100644
--- a/core/res/res/values-pt-rPT/strings.xml
+++ b/core/res/res/values-pt-rPT/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Desenhou o padrão de desbloqueio incorretamente <xliff:g id="NUMBER_0">%1$d</xliff:g> vezes. Depois de mais <xliff:g id="NUMBER_1">%2$d</xliff:g> tentativas sem sucesso, ser-lhe-á pedido para desbloquear o telemóvel através de uma conta de email.\n\n Tente novamente dentro de <xliff:g id="NUMBER_2">%3$d</xliff:g> segundos."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" - "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Remover"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Aumentar o volume acima do nível recomendado?\n\nOuvir com um volume elevado durante longos períodos poderá ser prejudicial para a sua audição."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Pretende utilizar o atalho de acessibilidade?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Quando o atalho está ativado, premir ambos os botões de volume durante 3 segundos inicia uma funcionalidade de acessibilidade.\n\n Funcionalidade de acessibilidade atual:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n Pode alterar a funcionalidade em Definições > Acessibilidade."</string>
diff --git a/core/res/res/values-pt/strings.xml b/core/res/res/values-pt/strings.xml
index 72a3ce9..a6fd0fe 100644
--- a/core/res/res/values-pt/strings.xml
+++ b/core/res/res/values-pt/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Você desenhou sua sequência de desbloqueio incorretamente <xliff:g id="NUMBER_0">%1$d</xliff:g> vezes. Se fizer mais <xliff:g id="NUMBER_1">%2$d</xliff:g> tentativas incorretas, será solicitado que você use o login do Google para desbloquear.\n\n Tente novamente em <xliff:g id="NUMBER_2">%3$d</xliff:g> segundos."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Remover"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Aumentar o volume acima do nível recomendado?\n\nOuvir em volume alto por longos períodos pode danificar sua audição."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Usar atalho de Acessibilidade?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Quando o atalho está ativado, pressione os dois botões de volume por três segundos para iniciar um recurso de acessibilidade.\n\n Recurso de acessibilidade atual:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n É possível alterar o recurso em Configurações > Acessibilidade."</string>
diff --git a/core/res/res/values-ro/strings.xml b/core/res/res/values-ro/strings.xml
index d7cdade..cb8d3fe 100644
--- a/core/res/res/values-ro/strings.xml
+++ b/core/res/res/values-ro/strings.xml
@@ -1635,6 +1635,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Ați desenat incorect modelul pentru deblocare de <xliff:g id="NUMBER_0">%1$d</xliff:g> ori. După încă <xliff:g id="NUMBER_1">%2$d</xliff:g> încercări nereușite, vi se va solicita să deblocați telefonul cu ajutorul unui cont de e-mail.\n\n Încercați din nou peste <xliff:g id="NUMBER_2">%3$d</xliff:g> secunde."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Eliminați"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Ridicați volumul mai sus de nivelul recomandat?\n\nAscultarea la volum ridicat pe perioade lungi de timp vă poate afecta auzul."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Utilizați comanda rapidă pentru accesibilitate?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Când comanda rapidă este activată, dacă apăsați ambele butoane de volum timp de 3 secunde, veți lansa o funcție de accesibilitate.\n\n Funcția actuală de accesibilitate:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n Puteți schimba funcția în Setări > Accesibilitate."</string>
diff --git a/core/res/res/values-ru/strings.xml b/core/res/res/values-ru/strings.xml
index 91b7ca6..4821c7f 100644
--- a/core/res/res/values-ru/strings.xml
+++ b/core/res/res/values-ru/strings.xml
@@ -1657,6 +1657,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Вы <xliff:g id="NUMBER_0">%1$d</xliff:g> раз неверно указали графический ключ. После <xliff:g id="NUMBER_1">%2$d</xliff:g> неверных попыток для разблокировки телефона потребуется войти в аккаунт Google.\n\nПовтор через <xliff:g id="NUMBER_2">%3$d</xliff:g> сек."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" – "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Удалить"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Установить громкость выше рекомендуемого уровня?\n\nВоздействие громкого звука в течение долгого времени может привести к повреждению слуха."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Использовать быстрое включение?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Чтобы использовать функцию специальных возможностей, когда она включена, нажмите и удерживайте три секунды обе кнопки регулировки громкости.\n\nТекущая функция специальных возможностей:\n<xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\nВы можете изменить ее в разделе \"Настройки > Специальные возможности\"."</string>
diff --git a/core/res/res/values-si/strings.xml b/core/res/res/values-si/strings.xml
index 601f9b9..df14036 100644
--- a/core/res/res/values-si/strings.xml
+++ b/core/res/res/values-si/strings.xml
@@ -1615,6 +1615,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"ඔබ වැරදියට <xliff:g id="NUMBER_0">%1$d</xliff:g> වතාවක් ඔබගේ අගුළු හැරීමේ රටාව ඇඳ ඇත. අසාර්ථක උත්සහ කිරීම් <xliff:g id="NUMBER_1">%2$d</xliff:g> න් පසුව, ඔබගේ ඊ-තැපැල් ලිපිනය භාවිතයෙන් ඔබගේ දුරකථනය අගුළු හැරීමට ඔබගෙන් අසයි.\n\n තත්පර <xliff:g id="NUMBER_2">%3$d</xliff:g> න් පසුව නැවත උත්සහ කරන්න."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"ඉවත් කරන්න"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"නිර්දේශිතයි මට්ටමට වඩා ශබ්දය වැඩිද?\n\nදිගු කාලයක් සඳහා ඉහළ ශබ්දයක් ඇසීමෙන් ඇතැම් විට ඔබගේ ඇසීමට හානි විය හැක."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"ප්රවේශ්යතා කෙටිමඟ භාවිතා කරන්නද?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"කෙටිමඟ සක්රිය විට, හඬ බොත්තම් දෙකම තත්පර 3ක් අල්ලාගෙන සිටීමෙන් ප්රවේශ්යත අංගයක් ඇරඹේ.\n\n වත්මන් ප්රවේශ්යතා අංගය:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n සැකසීම් > ප්රවේශ්යතාව තුළ ඔබට අංගය වෙනස් කළ හැක."</string>
diff --git a/core/res/res/values-sk/strings.xml b/core/res/res/values-sk/strings.xml
index fb81855..b0dc5f3 100644
--- a/core/res/res/values-sk/strings.xml
+++ b/core/res/res/values-sk/strings.xml
@@ -1657,6 +1657,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"<xliff:g id="NUMBER_0">%1$d</xliff:g>-krát ste nesprávne nakreslili svoj bezpečnostný vzor. Po <xliff:g id="NUMBER_1">%2$d</xliff:g> ďalších neúspešných pokusoch sa zobrazí výzva na odomknutie telefónu pomocou e-mailového účtu.\n\n Skúste to znova o <xliff:g id="NUMBER_2">%3$d</xliff:g> s."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Odstrániť"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Zvýšiť hlasitosť nad odporúčanú úroveň?\n\nDlhodobé počúvanie pri vysokej hlasitosti môže poškodiť váš sluch."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Použiť skratku dostupnosti?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Keď je skratka zapnutá, stlačením obidvoch tlačidiel hlasitosti na tri sekundy spustíte funkciu dostupnosti.\n\n Aktuálna funkcia dostupnosti:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n Funkciu môžete zmeniť v časti Nastavenia > Dostupnosť."</string>
diff --git a/core/res/res/values-sl/strings.xml b/core/res/res/values-sl/strings.xml
index 9405fb2..bdd5925 100644
--- a/core/res/res/values-sl/strings.xml
+++ b/core/res/res/values-sl/strings.xml
@@ -1657,6 +1657,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Vzorec za odklepanje ste <xliff:g id="NUMBER_0">%1$d</xliff:g>-krat napačno vnesli. Po nadaljnjih <xliff:g id="NUMBER_1">%2$d</xliff:g> neuspešnih poskusih boste pozvani, da odklenete telefon z Googlovimi podatki za prijavo.\n\nPoskusite znova čez <xliff:g id="NUMBER_2">%3$d</xliff:g> s."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" – "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Odstrani"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Ali želite povečati glasnost nad priporočeno raven?\n\nDolgotrajno poslušanje pri veliki glasnosti lahko poškoduje sluh."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Želite uporabljati bližnjico funkcij za ljudi s posebnimi potrebami?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Ko je bližnjica vklopljena, pritisnite gumba za glasnost in ju pridržite tri sekunde, če želite zagnati funkcijo za ljudi s posebnimi potrebami.\n\n Trenutna funkcija za ljudi s posebnimi potrebami:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n Funkcijo lahko spremenite v »Nastavitve > Funkcije za ljudi s posebnimi potrebami«."</string>
diff --git a/core/res/res/values-sq/strings.xml b/core/res/res/values-sq/strings.xml
index fe167da..fd8dda0 100644
--- a/core/res/res/values-sq/strings.xml
+++ b/core/res/res/values-sq/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Ke vizatuar <xliff:g id="NUMBER_0">%1$d</xliff:g> herë pa sukses motivin tënd. Pas <xliff:g id="NUMBER_1">%2$d</xliff:g> tentativave të tjera të pasuksesshme, do të të duhet ta shkyçësh telefonin duke përdorur një llogari mail-i.\n\n Provo sërish për <xliff:g id="NUMBER_2">%3$d</xliff:g> sekonda."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" - "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Hiq"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Të ngrihet volumi mbi nivelin e rekomanduar?\n\nDëgjimi me volum të lartë për periudha të gjata mund të dëmtojë dëgjimin."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Të përdoret shkurtorja e qasshmërisë?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Kur shkurtorja është e aktivizuar, shtypja e të dy butonave për 3 sekonda do të nisë një funksion qasshmërie.\n\n Funksioni aktual i qasshmërisë:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n Mund ta ndryshosh funksionin te Cilësimet > Qasshmëria."</string>
diff --git a/core/res/res/values-sr/strings.xml b/core/res/res/values-sr/strings.xml
index 564612c..d82faa6 100644
--- a/core/res/res/values-sr/strings.xml
+++ b/core/res/res/values-sr/strings.xml
@@ -1635,6 +1635,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Нацртали сте шаблон за откључавање нетачно <xliff:g id="NUMBER_0">%1$d</xliff:g> пута. После још <xliff:g id="NUMBER_1">%2$d</xliff:g> неуспешна(их) покушаја, од вас ће бити затражено да откључате телефон помоћу налога е-поште.\n\nПробајте поново за <xliff:g id="NUMBER_2">%3$d</xliff:g> секунде/и."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" – "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Уклони"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Желите да појачате звук изнад препорученог нивоа?\n\nСлушање гласне музике дуже време може да вам оштети слух."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Желите ли да користите пречицу за приступачност?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Када је пречица укључена, притисните оба дугмета за јачину звука да бисте покренули функцију приступачности.\n\n Актуелна функција приступачности:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n Можете да промените функцију у одељку Подешавања > Приступачност."</string>
diff --git a/core/res/res/values-sv/strings.xml b/core/res/res/values-sv/strings.xml
index 4332352..9c7e1e5 100644
--- a/core/res/res/values-sv/strings.xml
+++ b/core/res/res/values-sv/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Du har ritat ditt grafiska lösenord fel <xliff:g id="NUMBER_0">%1$d</xliff:g> gånger. Efter ytterligare <xliff:g id="NUMBER_1">%2$d</xliff:g> försök ombeds du låsa upp mobilen med hjälp av ett e-postkonto.\n\n Försök igen om <xliff:g id="NUMBER_2">%3$d</xliff:g> sekunder."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" – "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Ta bort"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Vill du höja volymen över den rekommenderade nivån?\n\nAtt lyssna med stark volym långa stunder åt gången kan skada hörseln."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Vill du använda Aktivera tillgänglighet snabbt?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"När kortkommandot har aktiverats startar du en tillgänglighetsfunktion genom att trycka ned båda volymknapparna i tre sekunder.\n\n Aktuell tillgänglighetsfunktion:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n Du kan ändra funktionen i Inställningar > Tillgänglighet."</string>
diff --git a/core/res/res/values-sw/strings.xml b/core/res/res/values-sw/strings.xml
index d1bff3f5..f53efe0 100644
--- a/core/res/res/values-sw/strings.xml
+++ b/core/res/res/values-sw/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Umekosea kuchora mchoro wako wa kufungua mara <xliff:g id="NUMBER_0">%1$d</xliff:g>. Baada ya majaribio <xliff:g id="NUMBER_1">%2$d</xliff:g> yasiyofaulu, utaombwa kufungua simu yako kwa kutumia akaunti ya barua pepe.\n\n Jaribu tena baada ya sekunde <xliff:g id="NUMBER_2">%3$d</xliff:g>."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Ondoa"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Ungependa kupandisha sauti zaidi ya kiwango kinachopendekezwa?\n\nKusikiliza kwa sauti ya juu kwa muda mrefu kunaweza kuharibu uwezo wako wa kusikia."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Ungependa kutumia njia ya mkato ya ufikivu?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Unapowasha kipengele cha njia ya mkato, hatua ya kubonyeza vitufe vyote viwili vya sauti kwa dakika 3 itafungua kipengele cha ufikivu.\n\n Kipengele cha ufikivu kilichopo kwa sasa:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n Unaweza kubadilisha kipengele hiki katika Mipangilio > Zana za ufikivu."</string>
diff --git a/core/res/res/values-ta/strings.xml b/core/res/res/values-ta/strings.xml
index 5444f36..c7c4ea3 100644
--- a/core/res/res/values-ta/strings.xml
+++ b/core/res/res/values-ta/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"திறப்பதற்கான வடிவத்தை <xliff:g id="NUMBER_0">%1$d</xliff:g> முறை தவறாக வரைந்துள்ளீர்கள். மேலும் <xliff:g id="NUMBER_1">%2$d</xliff:g> தோல்வி முயற்சிகளுக்குப் பிறகு, மின்னஞ்சல் கணக்கைப் பயன்படுத்தி உங்கள் மொபைலைத் திறக்கக் கேட்கப்படுவீர்கள்.\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> வினாடிகள் கழித்து முயற்சிக்கவும்."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"அகற்று"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"பரிந்துரைத்த அளவை விட ஒலியை அதிகரிக்கவா?\n\nநீண்ட நேரத்திற்கு அதிகளவில் ஒலி கேட்பது கேட்கும் திறனைப் பாதிக்கலாம்."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"அணுகல்தன்மை ஷார்ட்கட்டைப் பயன்படுத்தவா?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"ஷார்ட்கட் இயக்கத்தில் இருந்தால், இரண்டு ஒலியளவு பொத்தான்களையும் 3 வினாடிகள் அழுத்தி, அணுகல்தன்மை அம்சத்தை இயக்கலாம்.\n\n தற்போதைய அணுகல்தன்மை அம்சம்:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n அமைப்புகள் > அணுகல்தன்மை என்பதற்குச் சென்று, அம்சத்தை மாற்றலாம்."</string>
diff --git a/core/res/res/values-te/strings.xml b/core/res/res/values-te/strings.xml
index f9f6479..9c77ccd 100644
--- a/core/res/res/values-te/strings.xml
+++ b/core/res/res/values-te/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"మీరు మీ అన్లాక్ నమూనాను <xliff:g id="NUMBER_0">%1$d</xliff:g> సార్లు తప్పుగా గీసారు. మరో <xliff:g id="NUMBER_1">%2$d</xliff:g> విఫల ప్రయత్నాల తర్వాత, ఇమెయిల్ ఖాతాను ఉపయోగించి మీ ఫోన్ను అన్లాక్ చేయాల్సిందిగా మిమ్మల్ని అడుగుతారు.\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> సెకన్లలో మళ్లీ ప్రయత్నించండి."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"తీసివేయి"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"వాల్యూమ్ను సిఫార్సు చేయబడిన స్థాయి కంటే ఎక్కువగా పెంచాలా?\n\nసుదీర్ఘ వ్యవధుల పాటు అధిక వాల్యూమ్లో వినడం వలన మీ వినికిడి శక్తి దెబ్బ తినవచ్చు."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"యాక్సెస్ సామర్థ్యం షార్ట్కట్ను ఉపయోగించాలా?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"షార్ట్కట్ ఆన్లో ఉన్నప్పుడు, రెండు వాల్యూమ్ బటన్లను 3 సెకన్ల పాటు నొక్కితే యాక్సెస్ సామర్థ్య ఫీచర్ ప్రారంభం అవుతుంది.\n\n ప్రస్తుత యాక్సెస్ సామర్థ్య ఫీచర్:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n సెట్టింగ్లు > యాక్సెస్ సామర్థ్యంలో మీరు ఫీచర్ను మార్చవచ్చు."</string>
@@ -1987,8 +1989,7 @@
<string name="mime_type_spreadsheet_ext" msgid="8720173181137254414">"<xliff:g id="EXTENSION">%1$s</xliff:g> స్ప్రెడ్షీట్"</string>
<string name="mime_type_presentation" msgid="1145384236788242075">"ప్రదర్శన"</string>
<string name="mime_type_presentation_ext" msgid="8761049335564371468">"<xliff:g id="EXTENSION">%1$s</xliff:g> ప్రదర్శన"</string>
- <!-- no translation found for bluetooth_airplane_mode_toast (2066399056595768554) -->
- <skip />
+ <string name="bluetooth_airplane_mode_toast" msgid="2066399056595768554">"విమానం మోడ్లో బ్లూటూత్ ఆన్లో ఉంటుంది"</string>
<string name="car_loading_profile" msgid="8219978381196748070">"లోడవుతోంది"</string>
<plurals name="file_count" formatted="false" msgid="7063513834724389247">
<item quantity="other"><xliff:g id="FILE_NAME_2">%s</xliff:g> + <xliff:g id="COUNT_3">%d</xliff:g> ఫైల్లు</item>
@@ -2009,8 +2010,7 @@
<!-- no translation found for accessibility_system_action_accessibility_menu_label (8436484650391125184) -->
<skip />
<string name="accessibility_freeform_caption" msgid="8377519323496290122">"<xliff:g id="APP_NAME">%1$s</xliff:g> క్యాప్షన్ బార్."</string>
- <!-- no translation found for as_app_forced_to_restricted_bucket (8233871289353898964) -->
- <skip />
+ <string name="as_app_forced_to_restricted_bucket" msgid="8233871289353898964">"<xliff:g id="PACKAGE_NAME">%1$s</xliff:g> పరిమితం చేయబడిన బకెట్లో ఉంచబడింది"</string>
<!-- no translation found for resolver_personal_tab (2051260504014442073) -->
<skip />
<!-- no translation found for resolver_work_tab (2690019516263167035) -->
diff --git a/core/res/res/values-th/strings.xml b/core/res/res/values-th/strings.xml
index 7796b03..efff25b 100644
--- a/core/res/res/values-th/strings.xml
+++ b/core/res/res/values-th/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"คุณวาดรูปแบบการปลดล็อกไม่ถูกต้อง <xliff:g id="NUMBER_0">%1$d</xliff:g> ครั้งแล้ว หากทำไม่สำเร็จอีก <xliff:g id="NUMBER_1">%2$d</xliff:g> ครั้ง ระบบจะขอให้คุณปลดล็อกโทรศัพท์โดยใช้ับัญชีอีเมล\n\n โปรดลองอีกครั้งในอีก <xliff:g id="NUMBER_2">%3$d</xliff:g> วินาที"</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"ลบ"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"นี่เป็นการเพิ่มระดับเสียงเกินระดับที่แนะนำ\n\nการฟังเสียงดังเป็นเวลานานอาจทำให้การได้ยินของคุณบกพร่องได้"</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"ใช้ทางลัดการช่วยเหลือพิเศษไหม"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"เมื่อทางลัดเปิดอยู่ การกดปุ่มปรับระดับเสียงทั้ง 2 ปุ่มเป็นเวลา 3 วินาทีจะเริ่มฟีเจอร์การช่วยเหลือพิเศษ\n\n ฟีเจอร์การช่วยเหลือพิเศษปัจจุบัน:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n คุณสามารถเปลี่ยนฟีเจอร์ในการตั้งค่า > การช่วยเหลือพิเศษ"</string>
diff --git a/core/res/res/values-tl/strings.xml b/core/res/res/values-tl/strings.xml
index d15bcd7..7cfa7b0 100644
--- a/core/res/res/values-tl/strings.xml
+++ b/core/res/res/values-tl/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Naguhit mo nang hindi tama ang iyong pattern sa pag-unlock nang <xliff:g id="NUMBER_0">%1$d</xliff:g> (na) beses. Pagkatapos ng <xliff:g id="NUMBER_1">%2$d</xliff:g> pang hindi matagumpay na pagtatangka, hihilingin sa iyong i-unlock ang telepono mo gamit ang isang email account.\n\n Subukang muli sa loob ng <xliff:g id="NUMBER_2">%3$d</xliff:g> (na) segundo."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Alisin"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Lakasan ang volume nang lagpas sa inirerekomendang antas?\n\nMaaaring mapinsala ng pakikinig sa malakas na volume sa loob ng mahahabang panahon ang iyong pandinig."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Gagamitin ang Shortcut sa Pagiging Accessible?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Kapag naka-on ang shortcut, magsisimula ang isang feature ng pagiging naa-access kapag pinindot ang parehong button ng volume sa loob ng 3 segundo.\n\n Kasalukuyang feature ng pagiging naa-access:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n Maaari mong baguhin ang feature sa Mga Setting > Pagiging Accessible."</string>
diff --git a/core/res/res/values-tr/strings.xml b/core/res/res/values-tr/strings.xml
index e5559c5..b47eb4b 100644
--- a/core/res/res/values-tr/strings.xml
+++ b/core/res/res/values-tr/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Kilit açma deseninizi <xliff:g id="NUMBER_0">%1$d</xliff:g> kez yanlış çizdiniz. <xliff:g id="NUMBER_1">%2$d</xliff:g> başarısız denemeden sonra telefonunuzu bir e-posta hesabı kullanarak açmanız istenir.\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> saniye içinde tekrar deneyin."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Kaldır"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Ses seviyesi önerilen düzeyin üzerine yükseltilsin mi?\n\nUzun süre yüksek ses seviyesinde dinlemek işitme duyunuza zarar verebilir."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Erişilebilirlik Kısayolu Kullanılsın mı?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Kısayol açık olduğunda, ses düğmelerinin ikisini birden 3 saniyeliğine basılı tutmanız bir erişilebilirlik özelliğini başlatır.\n\n Geçerli erişilebilirlik özelliği:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n Özelliği, Ayarlar > Erişilebilirlik seçeneğinden değiştirebilirsiniz."</string>
diff --git a/core/res/res/values-uk/strings.xml b/core/res/res/values-uk/strings.xml
index 7c06892e..22aa199 100644
--- a/core/res/res/values-uk/strings.xml
+++ b/core/res/res/values-uk/strings.xml
@@ -1657,6 +1657,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Ключ розблокування неправильно намальовано стільки разів: <xliff:g id="NUMBER_0">%1$d</xliff:g>. У вас є ще стільки спроб: <xliff:g id="NUMBER_1">%2$d</xliff:g>. У разі невдачі з’явиться запит розблокувати телефон за допомогою облікового запису електронної пошти.\n\n Повторіть спробу через <xliff:g id="NUMBER_2">%3$d</xliff:g> сек."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" – "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Вилучити"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Збільшити гучність понад рекомендований рівень?\n\nЯкщо слухати надто гучну музику тривалий час, можна пошкодити слух."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Використовувати швидке ввімкнення?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Коли ярлик увімкнено, після натискання обох клавіш гучності й утримування їх протягом 3 секунд увімкнеться функція спеціальних можливостей.\n\n Поточна функція спеціальних можливостей:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n Цю функцію можна змінити в меню \"Налаштування\" > \"Спеціальні можливості\"."</string>
diff --git a/core/res/res/values-ur/strings.xml b/core/res/res/values-ur/strings.xml
index 1b00720..a88d6c5 100644
--- a/core/res/res/values-ur/strings.xml
+++ b/core/res/res/values-ur/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"آپ نے اپنا غیر مقفل کرنے کا پیٹرن <xliff:g id="NUMBER_0">%1$d</xliff:g> بار غلط طریقے سے ڈرا کیا ہے۔ <xliff:g id="NUMBER_1">%2$d</xliff:g> مزید ناکام کوششوں کے بعد، آپ سے ایک ای میل اکاؤنٹ استعمال کرکے اپنا فون غیر مقفل کرنے کو کہا جائے گا۔\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> سیکنڈ میں دوبارہ کوشش کریں۔"</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"ہٹائیں"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"والیوم کو تجویز کردہ سطح سے زیادہ کریں؟\n\nزیادہ وقت تک اونچی آواز میں سننے سے آپ کی سماعت کو نقصان پہنچ سکتا ہے۔"</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"ایکسیسبیلٹی شارٹ کٹ استعمال کریں؟"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"شارٹ کٹ آن ہونے پر، 3 سیکنڈ تک دونوں والیوم بٹنز کو دبانے سے ایک ایکسیسبیلٹی خصوصیت شروع ہو جائے گی۔\n\n موجودہ ایکسیسبیلٹی خصوصیت:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n آپ خصوصیت کو ترتیبات > ایکسیسبیلٹی میں جا کر تبدیل کر سکتے ہیں۔"</string>
@@ -1987,8 +1989,7 @@
<string name="mime_type_spreadsheet_ext" msgid="8720173181137254414">"<xliff:g id="EXTENSION">%1$s</xliff:g> اسپریڈشیٹ"</string>
<string name="mime_type_presentation" msgid="1145384236788242075">"پیشکش"</string>
<string name="mime_type_presentation_ext" msgid="8761049335564371468">"<xliff:g id="EXTENSION">%1$s</xliff:g> پیشکش"</string>
- <!-- no translation found for bluetooth_airplane_mode_toast (2066399056595768554) -->
- <skip />
+ <string name="bluetooth_airplane_mode_toast" msgid="2066399056595768554">"ہوائی جہاز وضع کے دوران بلوٹوتھ آن رہے گا"</string>
<string name="car_loading_profile" msgid="8219978381196748070">"لوڈ ہو رہا ہے"</string>
<plurals name="file_count" formatted="false" msgid="7063513834724389247">
<item quantity="other"><xliff:g id="FILE_NAME_2">%s</xliff:g> + <xliff:g id="COUNT_3">%d</xliff:g> فائلز</item>
@@ -2009,8 +2010,7 @@
<!-- no translation found for accessibility_system_action_accessibility_menu_label (8436484650391125184) -->
<skip />
<string name="accessibility_freeform_caption" msgid="8377519323496290122">"<xliff:g id="APP_NAME">%1$s</xliff:g> کی کیپشن بار۔"</string>
- <!-- no translation found for as_app_forced_to_restricted_bucket (8233871289353898964) -->
- <skip />
+ <string name="as_app_forced_to_restricted_bucket" msgid="8233871289353898964">"<xliff:g id="PACKAGE_NAME">%1$s</xliff:g> کو پابند کردہ بکٹ میں رکھ دیا گیا ہے"</string>
<!-- no translation found for resolver_personal_tab (2051260504014442073) -->
<skip />
<!-- no translation found for resolver_work_tab (2690019516263167035) -->
diff --git a/core/res/res/values-uz/strings.xml b/core/res/res/values-uz/strings.xml
index 1193d27..a08b178 100644
--- a/core/res/res/values-uz/strings.xml
+++ b/core/res/res/values-uz/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Siz grafik kalitni <xliff:g id="NUMBER_0">%1$d</xliff:g> marta noto‘g‘ri chizdingiz. <xliff:g id="NUMBER_1">%2$d</xliff:g> marta muvaffaqiyatsiz urinishdan so‘ng, sizdan e-pochtangizdan foydalanib, telefon qulfini ochishingiz so‘raladi.\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> soniyadan so‘ng yana urinib ko‘ring."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Olib tashlash"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Tovush balandligi tavsiya etilgan darajadan ham yuqori qilinsinmi?\n\nUzoq vaqt davomida baland ovozda tinglash eshitish qobiliyatingizga salbiy ta’sir ko‘rsatishi mumkin."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Tezkor ishga tushirishdan foydalanilsinmi?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Maxsus imkoniyatlar funksiyasidan foydalanish uchun u yoniqligida ikkala ovoz balandligini boshqarish tugmasini 3 soniya bosib turing.\n\n Joriy maxsus imkoniyatlar funksiyasi:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n Bu funksiyani Sozlamalar > Maxsus imkoniyatlar orqali o‘zgartirish mumkin."</string>
diff --git a/core/res/res/values-vi/strings.xml b/core/res/res/values-vi/strings.xml
index 7cfd870..db55613 100644
--- a/core/res/res/values-vi/strings.xml
+++ b/core/res/res/values-vi/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Bạn đã <xliff:g id="NUMBER_0">%1$d</xliff:g> lần vẽ không chính xác hình mở khóa của mình. Sau <xliff:g id="NUMBER_1">%2$d</xliff:g> lần thử không thành công nữa, bạn sẽ được yêu cầu mở khóa điện thoại bằng tài khoản email.\n\n Vui lòng thử lại sau <xliff:g id="NUMBER_2">%3$d</xliff:g> giây."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Xóa"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Bạn tăng âm lượng lên quá mức khuyên dùng?\n\nViệc nghe ở mức âm lượng cao trong thời gian dài có thể gây tổn thương thính giác của bạn."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Sử dụng phím tắt Hỗ trợ tiếp cận?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Khi phím tắt được bật, nhấn cả hai nút âm lượng trong 3 giây sẽ bắt đầu một tính năng trợ năng.\n\n Tính năng trợ năng hiện tại:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n Bạn có thể thay đổi tính năng trong Cài đặt > Trợ năng."</string>
diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml
index 5d7ad5a..08d2326 100644
--- a/core/res/res/values-zh-rCN/strings.xml
+++ b/core/res/res/values-zh-rCN/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"您已连续 <xliff:g id="NUMBER_0">%1$d</xliff:g> 次画错解锁图案。如果再尝试 <xliff:g id="NUMBER_1">%2$d</xliff:g> 次后仍不成功,系统就会要求您使用自己的电子邮件帐号解锁手机。\n\n请在 <xliff:g id="NUMBER_2">%3$d</xliff:g> 秒后重试。"</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"删除"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"要将音量调高到建议的音量以上吗?\n\n长时间保持高音量可能会损伤听力。"</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"要使用无障碍快捷方式吗?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"开启快捷方式后,同时按下两个音量按钮 3 秒钟即可启动所设定的无障碍功能。\n\n当前设定的无障碍功能:\n<xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n如需更改设定的功能,请依次转到“设置”>“无障碍”。"</string>
@@ -1987,8 +1989,7 @@
<string name="mime_type_spreadsheet_ext" msgid="8720173181137254414">"<xliff:g id="EXTENSION">%1$s</xliff:g> 电子表格"</string>
<string name="mime_type_presentation" msgid="1145384236788242075">"演示文稿"</string>
<string name="mime_type_presentation_ext" msgid="8761049335564371468">"<xliff:g id="EXTENSION">%1$s</xliff:g> 演示文稿"</string>
- <!-- no translation found for bluetooth_airplane_mode_toast (2066399056595768554) -->
- <skip />
+ <string name="bluetooth_airplane_mode_toast" msgid="2066399056595768554">"在飞行模式下,蓝牙将保持开启状态"</string>
<string name="car_loading_profile" msgid="8219978381196748070">"正在加载"</string>
<plurals name="file_count" formatted="false" msgid="7063513834724389247">
<item quantity="other"><xliff:g id="FILE_NAME_2">%s</xliff:g> + <xliff:g id="COUNT_3">%d</xliff:g> 个文件</item>
@@ -2009,8 +2010,7 @@
<!-- no translation found for accessibility_system_action_accessibility_menu_label (8436484650391125184) -->
<skip />
<string name="accessibility_freeform_caption" msgid="8377519323496290122">"<xliff:g id="APP_NAME">%1$s</xliff:g>的标题栏。"</string>
- <!-- no translation found for as_app_forced_to_restricted_bucket (8233871289353898964) -->
- <skip />
+ <string name="as_app_forced_to_restricted_bucket" msgid="8233871289353898964">"<xliff:g id="PACKAGE_NAME">%1$s</xliff:g> 已被放入受限存储分区"</string>
<!-- no translation found for resolver_personal_tab (2051260504014442073) -->
<skip />
<!-- no translation found for resolver_work_tab (2690019516263167035) -->
diff --git a/core/res/res/values-zh-rHK/strings.xml b/core/res/res/values-zh-rHK/strings.xml
index 361eb4c..ea106c6 100644
--- a/core/res/res/values-zh-rHK/strings.xml
+++ b/core/res/res/values-zh-rHK/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"您已畫錯解鎖圖案 <xliff:g id="NUMBER_0">%1$d</xliff:g> 次,如果再嘗試 <xliff:g id="NUMBER_1">%2$d</xliff:g> 次仍未成功,系統會要求您透過電郵帳戶解開上鎖的手機。\n\n請在 <xliff:g id="NUMBER_2">%3$d</xliff:g> 秒後再試一次。"</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"移除"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"要調高音量 (比建議的音量更大聲) 嗎?\n\n長時間聆聽高分貝音量可能會導致您的聽力受損。"</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"要使用無障礙功能快速鍵嗎?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"快速鍵開啟後,同時按住音量按鈕 3 秒,無障礙功能便會啟用。\n\n目前的無障礙功能:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n如要變更功能,請前往「設定」>「無障礙功能」。"</string>
diff --git a/core/res/res/values-zh-rTW/strings.xml b/core/res/res/values-zh-rTW/strings.xml
index 2bcae59..7065181 100644
--- a/core/res/res/values-zh-rTW/strings.xml
+++ b/core/res/res/values-zh-rTW/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"你的解鎖圖案已畫錯 <xliff:g id="NUMBER_0">%1$d</xliff:g> 次,如果再嘗試 <xliff:g id="NUMBER_1">%2$d</xliff:g> 次仍未成功,系統就會要求你透過電子郵件帳戶解除手機的鎖定狀態。\n\n請在 <xliff:g id="NUMBER_2">%3$d</xliff:g> 秒後再試一次。"</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"移除"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"要調高音量,比建議的音量更大聲嗎?\n\n長時間聆聽高分貝音量可能會使你的聽力受損。"</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"要使用無障礙捷徑嗎?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"啟用捷徑功能後,只要同時按下兩個音量鍵 3 秒,就能啟動無障礙功能。\n\n 目前設定的無障礙功能為:\n<xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n 如要變更設定的功能,請依序輕觸 [設定] > [無障礙設定]。"</string>
diff --git a/core/res/res/values-zu/strings.xml b/core/res/res/values-zu/strings.xml
index e96696e..1cb67e1 100644
--- a/core/res/res/values-zu/strings.xml
+++ b/core/res/res/values-zu/strings.xml
@@ -1613,6 +1613,8 @@
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="5270861875006378092">"Ukulayisha ungenisa iphathini yakho yokuvula ngendlela engalungile izikhathi ezi-<xliff:g id="NUMBER_0">%1$d</xliff:g> Emva kweminye imizamo engu-<xliff:g id="NUMBER_1">%2$d</xliff:g>, uzocelwa ukuvula ifoni yakho usebenzisa ukungena ngemvume ku-Google\n\n Zame futhi emumva kwengu- <xliff:g id="NUMBER_2">%3$d</xliff:g> amasekhondi."</string>
<string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string>
<string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Susa"</string>
+ <!-- no translation found for allow_while_in_use_permission_in_fgs (4101339676785053656) -->
+ <skip />
<string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Khuphukisa ivolumu ngaphezu kweleveli enconyiwe?\n\nUkulalela ngevolumu ephezulu izikhathi ezide kungahle kulimaze ukuzwa kwakho."</string>
<string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Sebenzisa isinqamuleli sokufinyelela?"</string>
<string name="accessibility_shortcut_toogle_warning" msgid="8306239551412868396">"Uma kuvulwe isinqamuleli, ukucindezela zombili izinkinobho zevolumu amasekhondi angu-3 kuzoqala isici sokufinyelela.\n\n Isici samanje sokufinyelela:\n <xliff:g id="SERVICE_NAME">%1$s</xliff:g>\n\n Ungashintsha isici kuzilungiselelo > Ukufinyelela."</string>
diff --git a/core/tests/coretests/src/android/app/PullAtomMetadataTest.java b/core/tests/coretests/src/android/app/PullAtomMetadataTest.java
index 2e3f892..0ae6134 100644
--- a/core/tests/coretests/src/android/app/PullAtomMetadataTest.java
+++ b/core/tests/coretests/src/android/app/PullAtomMetadataTest.java
@@ -32,7 +32,7 @@
@Test
public void testEmpty() {
- PullAtomMetadata metadata = PullAtomMetadata.newBuilder().build();
+ PullAtomMetadata metadata = new PullAtomMetadata.Builder().build();
assertThat(metadata.getTimeoutNs()).isEqualTo(StatsManager.DEFAULT_TIMEOUT_NS);
assertThat(metadata.getCoolDownNs()).isEqualTo(StatsManager.DEFAULT_COOL_DOWN_NS);
assertThat(metadata.getAdditiveFields()).isNull();
@@ -42,7 +42,7 @@
public void testSetTimeoutNs() {
long timeoutNs = 500_000_000L;
PullAtomMetadata metadata =
- PullAtomMetadata.newBuilder().setTimeoutNs(timeoutNs).build();
+ new PullAtomMetadata.Builder().setTimeoutNs(timeoutNs).build();
assertThat(metadata.getTimeoutNs()).isEqualTo(timeoutNs);
assertThat(metadata.getCoolDownNs()).isEqualTo(StatsManager.DEFAULT_COOL_DOWN_NS);
assertThat(metadata.getAdditiveFields()).isNull();
@@ -52,7 +52,7 @@
public void testSetCoolDownNs() {
long coolDownNs = 10_000_000_000L;
PullAtomMetadata metadata =
- PullAtomMetadata.newBuilder().setCoolDownNs(coolDownNs).build();
+ new PullAtomMetadata.Builder().setCoolDownNs(coolDownNs).build();
assertThat(metadata.getTimeoutNs()).isEqualTo(StatsManager.DEFAULT_TIMEOUT_NS);
assertThat(metadata.getCoolDownNs()).isEqualTo(coolDownNs);
assertThat(metadata.getAdditiveFields()).isNull();
@@ -62,7 +62,7 @@
public void testSetAdditiveFields() {
int[] fields = {2, 4, 6};
PullAtomMetadata metadata =
- PullAtomMetadata.newBuilder().setAdditiveFields(fields).build();
+ new PullAtomMetadata.Builder().setAdditiveFields(fields).build();
assertThat(metadata.getTimeoutNs()).isEqualTo(StatsManager.DEFAULT_TIMEOUT_NS);
assertThat(metadata.getCoolDownNs()).isEqualTo(StatsManager.DEFAULT_COOL_DOWN_NS);
assertThat(metadata.getAdditiveFields()).isEqualTo(fields);
@@ -73,7 +73,7 @@
long timeoutNs = 300L;
long coolDownNs = 9572L;
int[] fields = {3, 2};
- PullAtomMetadata metadata = PullAtomMetadata.newBuilder()
+ PullAtomMetadata metadata = new PullAtomMetadata.Builder()
.setTimeoutNs(timeoutNs)
.setCoolDownNs(coolDownNs)
.setAdditiveFields(fields)
diff --git a/core/tests/coretests/src/android/hardware/display/BrightnessConfigurationTest.java b/core/tests/coretests/src/android/hardware/display/BrightnessConfigurationTest.java
index 895b22c..4370462 100644
--- a/core/tests/coretests/src/android/hardware/display/BrightnessConfigurationTest.java
+++ b/core/tests/coretests/src/android/hardware/display/BrightnessConfigurationTest.java
@@ -132,7 +132,7 @@
BrightnessConfiguration.Builder builder =
new BrightnessConfiguration.Builder(LUX_LEVELS, NITS_LEVELS);
builder.setShouldCollectColorSamples(true);
- builder.setShortTermModelTimeout(1234L);
+ builder.setShortTermModelTimeoutMillis(1234L);
builder.setShortTermModelLowerLuxMultiplier(0.9f);
builder.setShortTermModelUpperLuxMultiplier(0.2f);
builder.addCorrectionByCategory(3,
@@ -153,7 +153,7 @@
BrightnessConfiguration.Builder builder =
new BrightnessConfiguration.Builder(LUX_LEVELS, NITS_LEVELS);
builder.setShouldCollectColorSamples(true);
- builder.setShortTermModelTimeout(123L);
+ builder.setShortTermModelTimeoutMillis(123L);
builder.setShortTermModelLowerLuxMultiplier(0.4f);
builder.setShortTermModelUpperLuxMultiplier(0.8f);
builder.addCorrectionByCategory(3,
@@ -236,7 +236,7 @@
assertNotEquals(baseConfig, colorCollectionDiffers);
builder = new BrightnessConfiguration.Builder(LUX_LEVELS, NITS_LEVELS);
- builder.setShortTermModelTimeout(300L);
+ builder.setShortTermModelTimeoutMillis(300L);
BrightnessConfiguration timeoutDiffers = builder.build();
assertNotEquals(baseConfig, timeoutDiffers);
diff --git a/core/tests/coretests/src/android/view/KeyEventTest.java b/core/tests/coretests/src/android/view/KeyEventTest.java
index 88d3bdb..14999c7 100644
--- a/core/tests/coretests/src/android/view/KeyEventTest.java
+++ b/core/tests/coretests/src/android/view/KeyEventTest.java
@@ -20,8 +20,10 @@
import static org.junit.Assert.assertEquals;
+import android.os.Parcel;
+
+import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
-import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -40,6 +42,7 @@
private static final int SCAN_CODE = 0;
private static final int FLAGS = 0;
private static final int SOURCE = InputDevice.SOURCE_KEYBOARD;
+ private static final byte[] HMAC = null;
private static final String CHARACTERS = null;
@Test
@@ -65,25 +68,15 @@
KeyEvent keyEvent = KeyEvent.obtain(DOWN_TIME, EVENT_TIME, ACTION, KEYCODE, REPEAT,
METASTATE, DEVICE_ID, SCAN_CODE, FLAGS, SOURCE, CHARACTERS);
KeyEvent keyEvent2 = KeyEvent.obtain(keyEvent);
- assertEquals(keyEvent.getDownTime(), keyEvent2.getDownTime());
- assertEquals(keyEvent.getEventTime(), keyEvent2.getEventTime());
- assertEquals(keyEvent.getAction(), keyEvent2.getAction());
- assertEquals(keyEvent.getKeyCode(), keyEvent2.getKeyCode());
- assertEquals(keyEvent.getRepeatCount(), keyEvent2.getRepeatCount());
- assertEquals(keyEvent.getMetaState(), keyEvent2.getMetaState());
- assertEquals(keyEvent.getDeviceId(), keyEvent2.getDeviceId());
- assertEquals(keyEvent.getScanCode(), keyEvent2.getScanCode());
- assertEquals(keyEvent.getFlags(), keyEvent2.getFlags());
- assertEquals(keyEvent.getSource(), keyEvent2.getSource());
- assertEquals(keyEvent.getDisplayId(), keyEvent2.getDisplayId());
- assertEquals(keyEvent.getCharacters(), keyEvent2.getCharacters());
+ compareKeys(keyEvent, keyEvent2);
}
@Test
public void testObtainWithDisplayId() {
final int displayId = 5;
KeyEvent keyEvent = KeyEvent.obtain(DOWN_TIME, EVENT_TIME, ACTION, KEYCODE, REPEAT,
- METASTATE, DEVICE_ID, SCAN_CODE, FLAGS, SOURCE, displayId, CHARACTERS);
+ METASTATE, DEVICE_ID, SCAN_CODE, FLAGS, SOURCE, displayId, null /* hmac*/,
+ CHARACTERS);
assertEquals(DOWN_TIME, keyEvent.getDownTime());
assertEquals(EVENT_TIME, keyEvent.getEventTime());
assertEquals(ACTION, keyEvent.getAction());
@@ -97,4 +90,44 @@
assertEquals(displayId, keyEvent.getDisplayId());
assertEquals(CHARACTERS, keyEvent.getCharacters());
}
+
+ @Test
+ public void testParcelUnparcel() {
+ KeyEvent key1 = createKey();
+ Parcel parcel = Parcel.obtain();
+ key1.writeToParcel(parcel, 0 /*flags*/);
+ parcel.setDataPosition(0);
+
+ KeyEvent key2 = KeyEvent.CREATOR.createFromParcel(parcel);
+ parcel.recycle();
+
+ compareKeys(key1, key2);
+ }
+
+ @Test
+ public void testConstructor() {
+ KeyEvent key1 = createKey();
+ KeyEvent key2 = new KeyEvent(key1);
+ compareKeys(key1, key2);
+ }
+
+ private static KeyEvent createKey() {
+ return KeyEvent.obtain(DOWN_TIME, EVENT_TIME, ACTION, KEYCODE, REPEAT,
+ METASTATE, DEVICE_ID, SCAN_CODE, FLAGS, SOURCE, INVALID_DISPLAY, HMAC, CHARACTERS);
+ }
+
+ private static void compareKeys(KeyEvent key1, KeyEvent key2) {
+ assertEquals(key1.getDownTime(), key2.getDownTime());
+ assertEquals(key1.getEventTime(), key2.getEventTime());
+ assertEquals(key1.getAction(), key2.getAction());
+ assertEquals(key1.getKeyCode(), key2.getKeyCode());
+ assertEquals(key1.getRepeatCount(), key2.getRepeatCount());
+ assertEquals(key1.getMetaState(), key2.getMetaState());
+ assertEquals(key1.getDeviceId(), key2.getDeviceId());
+ assertEquals(key1.getScanCode(), key2.getScanCode());
+ assertEquals(key1.getFlags(), key2.getFlags());
+ assertEquals(key1.getSource(), key2.getSource());
+ assertEquals(key1.getDisplayId(), key2.getDisplayId());
+ assertEquals(key1.getCharacters(), key2.getCharacters());
+ }
}
diff --git a/core/tests/hosttests/test-apps/DownloadManagerTestApp/src/com/android/frameworks/downloadmanagertests/DownloadManagerTestRunner.java b/core/tests/hosttests/test-apps/DownloadManagerTestApp/src/com/android/frameworks/downloadmanagertests/DownloadManagerTestRunner.java
index 70c266a..ac63853 100644
--- a/core/tests/hosttests/test-apps/DownloadManagerTestApp/src/com/android/frameworks/downloadmanagertests/DownloadManagerTestRunner.java
+++ b/core/tests/hosttests/test-apps/DownloadManagerTestApp/src/com/android/frameworks/downloadmanagertests/DownloadManagerTestRunner.java
@@ -58,7 +58,7 @@
}
// enable verbose wifi logging
((WifiManager)getContext().getSystemService(Context.WIFI_SERVICE))
- .enableVerboseLogging(1);
+ .setVerboseLoggingEnabled(true);
super.onCreate(icicle);
}
diff --git a/core/tests/utiltests/src/com/android/internal/util/ConnectivityUtilTest.java b/core/tests/utiltests/src/com/android/internal/util/LocationPermissionCheckerTest.java
similarity index 84%
rename from core/tests/utiltests/src/com/android/internal/util/ConnectivityUtilTest.java
rename to core/tests/utiltests/src/com/android/internal/util/LocationPermissionCheckerTest.java
index 0809f69..6010f39 100644
--- a/core/tests/utiltests/src/com/android/internal/util/ConnectivityUtilTest.java
+++ b/core/tests/utiltests/src/com/android/internal/util/LocationPermissionCheckerTest.java
@@ -28,6 +28,7 @@
import static org.mockito.Mockito.when;
import android.Manifest;
+import android.app.ActivityManager;
import android.app.AppOpsManager;
import android.content.Context;
import android.content.pm.ApplicationInfo;
@@ -48,8 +49,8 @@
import java.util.HashMap;
-/** Unit tests for {@link ConnectivityUtil}. */
-public class ConnectivityUtilTest {
+/** Unit tests for {@link LocationPermissionChecker}. */
+public class LocationPermissionCheckerTest {
public static final String TAG = "ConnectivityUtilTest";
@@ -85,18 +86,7 @@
private boolean mThrowSecurityException;
private Answer<Integer> mReturnPermission;
private HashMap<String, Integer> mPermissionsList = new HashMap<String, Integer>();
-
- private class TestConnectivityUtil extends ConnectivityUtil {
-
- TestConnectivityUtil(Context context) {
- super(context);
- }
-
- @Override
- protected int getCurrentUser() {
- return mCurrentUser;
- }
- }
+ private LocationPermissionChecker mChecker;
@Before
public void setUp() {
@@ -141,11 +131,12 @@
mThrowSecurityException = true;
mMockApplInfo.targetSdkVersion = Build.VERSION_CODES.M;
mIsLocationEnabled = false;
- mCurrentUser = UserHandle.USER_SYSTEM;
+ mCurrentUser = ActivityManager.getCurrentUser();
mCoarseLocationPermission = PackageManager.PERMISSION_DENIED;
mFineLocationPermission = PackageManager.PERMISSION_DENIED;
mAllowCoarseLocationApps = AppOpsManager.MODE_ERRORED;
mAllowFineLocationApps = AppOpsManager.MODE_ERRORED;
+ mChecker = new LocationPermissionChecker(mMockContext);
}
private void setupMockInterface() {
@@ -189,8 +180,7 @@
mWifiScanAllowApps = AppOpsManager.MODE_ALLOWED;
mUid = mCurrentUser;
setupTestCase();
- new TestConnectivityUtil(mMockContext)
- .enforceLocationPermission(TEST_PKG_NAME, TEST_FEATURE_ID, mUid, null);
+ mChecker.enforceLocationPermission(TEST_PKG_NAME, TEST_FEATURE_ID, mUid, null);
}
@Test
@@ -203,8 +193,7 @@
mAllowFineLocationApps = AppOpsManager.MODE_ALLOWED;
mWifiScanAllowApps = AppOpsManager.MODE_ALLOWED;
setupTestCase();
- new TestConnectivityUtil(mMockContext)
- .enforceLocationPermission(TEST_PKG_NAME, TEST_FEATURE_ID, mUid, null);
+ mChecker.enforceLocationPermission(TEST_PKG_NAME, TEST_FEATURE_ID, mUid, null);
}
@Test
@@ -217,22 +206,8 @@
setupTestCase();
assertThrows(SecurityException.class,
- () -> new TestConnectivityUtil(mMockContext)
- .enforceLocationPermission(TEST_PKG_NAME, TEST_FEATURE_ID, mUid, null));
- }
-
- @Test
- public void testenforceCanAccessScanResults_UserOrProfileNotCurrent() throws Exception {
- mIsLocationEnabled = true;
- mThrowSecurityException = false;
- mCoarseLocationPermission = PackageManager.PERMISSION_GRANTED;
- mAllowCoarseLocationApps = AppOpsManager.MODE_ALLOWED;
- mWifiScanAllowApps = AppOpsManager.MODE_ALLOWED;
- setupTestCase();
-
- assertThrows(SecurityException.class,
- () -> new TestConnectivityUtil(mMockContext)
- .enforceLocationPermission(TEST_PKG_NAME, TEST_FEATURE_ID, mUid, null));
+ () -> mChecker.enforceLocationPermission(
+ TEST_PKG_NAME, TEST_FEATURE_ID, mUid, null));
}
@Test
@@ -241,8 +216,8 @@
mIsLocationEnabled = true;
setupTestCase();
assertThrows(SecurityException.class,
- () -> new TestConnectivityUtil(mMockContext)
- .enforceLocationPermission(TEST_PKG_NAME, TEST_FEATURE_ID, mUid, null));
+ () -> mChecker.enforceLocationPermission(
+ TEST_PKG_NAME, TEST_FEATURE_ID, mUid, null));
}
@Test
@@ -256,8 +231,8 @@
setupTestCase();
assertThrows(SecurityException.class,
- () -> new TestConnectivityUtil(mMockContext)
- .enforceLocationPermission(TEST_PKG_NAME, TEST_FEATURE_ID, mUid, null));
+ () -> mChecker.enforceLocationPermission(
+ TEST_PKG_NAME, TEST_FEATURE_ID, mUid, null));
verify(mMockAppOps, never()).noteOp(anyInt(), anyInt(), anyString());
}
@@ -272,8 +247,8 @@
setupTestCase();
assertThrows(SecurityException.class,
- () -> new TestConnectivityUtil(mMockContext)
- .enforceLocationPermission(TEST_PKG_NAME, TEST_FEATURE_ID, mUid, null));
+ () -> mChecker.enforceLocationPermission(
+ TEST_PKG_NAME, TEST_FEATURE_ID, mUid, null));
}
private static void assertThrows(Class<? extends Exception> exceptionClass, Runnable r) {
diff --git a/data/etc/platform.xml b/data/etc/platform.xml
index 0541db1..da50550 100644
--- a/data/etc/platform.xml
+++ b/data/etc/platform.xml
@@ -60,6 +60,10 @@
<group gid="log" />
</permission>
+ <permission name="android.permission.MANAGE_EXTERNAL_STORAGE" >
+ <group gid="external_storage" />
+ </permission>
+
<permission name="android.permission.ACCESS_MTP" >
<group gid="mtp" />
</permission>
diff --git a/graphics/java/android/graphics/Bitmap.java b/graphics/java/android/graphics/Bitmap.java
index ac094ba..9c2e95f 100644
--- a/graphics/java/android/graphics/Bitmap.java
+++ b/graphics/java/android/graphics/Bitmap.java
@@ -2132,7 +2132,7 @@
public void writeToParcel(Parcel p, int flags) {
checkRecycled("Can't parcel a recycled bitmap");
noteHardwareBitmapSlowCall();
- if (!nativeWriteToParcel(mNativePtr, isMutable(), mDensity, p)) {
+ if (!nativeWriteToParcel(mNativePtr, mDensity, p)) {
throw new RuntimeException("native writeToParcel failed");
}
}
@@ -2285,7 +2285,6 @@
private static native Bitmap nativeCreateFromParcel(Parcel p);
// returns true on success
private static native boolean nativeWriteToParcel(long nativeBitmap,
- boolean isMutable,
int density,
Parcel p);
// returns a new bitmap built from the native bitmap's alpha, and the paint
diff --git a/media/java/android/media/MediaFormat.java b/media/java/android/media/MediaFormat.java
index f61d55e..57405d7 100644
--- a/media/java/android/media/MediaFormat.java
+++ b/media/java/android/media/MediaFormat.java
@@ -52,6 +52,7 @@
* <tr><td>{@link #KEY_PIXEL_ASPECT_RATIO_WIDTH}</td><td>Integer</td><td>optional, the pixel aspect ratio width</td></tr>
* <tr><td>{@link #KEY_PIXEL_ASPECT_RATIO_HEIGHT}</td><td>Integer</td><td>optional, the pixel aspect ratio height</td></tr>
* <tr><td>{@link #KEY_BIT_RATE}</td><td>Integer</td><td><b>encoder-only</b>, desired bitrate in bits/second</td></tr>
+ * <tr><td>{@link #KEY_DURATION}</td><td>long</td><td>the duration of the content (in microseconds)</td></tr>
* </table>
*
* Video formats have the following keys:
diff --git a/packages/CarSystemUI/src/com/android/systemui/TEST_MAPPING b/packages/CarSystemUI/TEST_MAPPING
similarity index 100%
rename from packages/CarSystemUI/src/com/android/systemui/TEST_MAPPING
rename to packages/CarSystemUI/TEST_MAPPING
diff --git a/packages/CarSystemUI/src/com/android/systemui/CarSystemUIBinder.java b/packages/CarSystemUI/src/com/android/systemui/CarSystemUIBinder.java
index 0bd2e06..07b7b22 100644
--- a/packages/CarSystemUI/src/com/android/systemui/CarSystemUIBinder.java
+++ b/packages/CarSystemUI/src/com/android/systemui/CarSystemUIBinder.java
@@ -32,6 +32,7 @@
import com.android.systemui.statusbar.phone.StatusBar;
import com.android.systemui.statusbar.tv.TvStatusBar;
import com.android.systemui.theme.ThemeOverlayController;
+import com.android.systemui.toast.ToastUI;
import com.android.systemui.util.leak.GarbageMonitor;
import com.android.systemui.volume.VolumeUI;
@@ -163,4 +164,10 @@
@IntoMap
@ClassKey(VolumeUI.class)
public abstract SystemUI bindVolumeUI(VolumeUI sysui);
+
+ /** Inject into ToastUI. */
+ @Binds
+ @IntoMap
+ @ClassKey(ToastUI.class)
+ public abstract SystemUI bindToastUI(ToastUI service);
}
diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java b/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java
index 9d4c24e..84dde05 100644
--- a/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java
+++ b/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java
@@ -1141,7 +1141,7 @@
} else if (isActive()) {
summary.append(getSummary(mContext, /* ssid */ null, getDetailedState(),
mInfo != null && mInfo.isEphemeral(),
- mInfo != null ? mInfo.getAppPackageName() : null));
+ mInfo != null ? mInfo.getRequestingPackageName() : null));
} else { // not active
if (mConfig != null && mConfig.hasNoInternetAccess()) {
int messageID = mConfig.getNetworkSelectionStatus().isNetworkPermanentlyDisabled()
diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTracker.java b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTracker.java
index ed4ff08..26abf71 100644
--- a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTracker.java
+++ b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTracker.java
@@ -226,7 +226,7 @@
mConnectivityManager = connectivityManager;
// check if verbose logging developer option has been turned on or off
- sVerboseLogging = mWifiManager != null && (mWifiManager.getVerboseLoggingLevel() > 0);
+ sVerboseLogging = mWifiManager != null && mWifiManager.isVerboseLoggingEnabled();
mFilter = filter;
diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.java b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.java
index b93b000..78ccba0 100644
--- a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.java
+++ b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.java
@@ -102,10 +102,10 @@
if (accessPoint.getSpeed() != AccessPoint.Speed.NONE) {
visibility.append(" speed=").append(accessPoint.getSpeedLabel());
}
- visibility.append(String.format(" tx=%.1f,", info.getTxSuccessRate()));
- visibility.append(String.format("%.1f,", info.getTxRetriesRate()));
- visibility.append(String.format("%.1f ", info.getTxBadRate()));
- visibility.append(String.format("rx=%.1f", info.getRxSuccessRate()));
+ visibility.append(String.format(" tx=%.1f,", info.getSuccessfulTxPacketsPerSecond()));
+ visibility.append(String.format("%.1f,", info.getRetriedTxPacketsPerSecond()));
+ visibility.append(String.format("%.1f ", info.getLostTxPacketsPerSecond()));
+ visibility.append(String.format("rx=%.1f", info.getSuccessfulRxPacketsPerSecond()));
}
int maxRssi5 = INVALID_RSSI;
diff --git a/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/AccessPointTest.java b/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/AccessPointTest.java
index 03201ae..42f3cbb 100644
--- a/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/AccessPointTest.java
+++ b/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/AccessPointTest.java
@@ -507,7 +507,7 @@
WifiInfo wifiInfo = new WifiInfo();
wifiInfo.setSSID(WifiSsid.createFromAsciiEncoded(TEST_SSID));
wifiInfo.setEphemeral(true);
- wifiInfo.setAppPackageName(appPackageName);
+ wifiInfo.setRequestingPackageName(appPackageName);
wifiInfo.setRssi(rssi);
Context context = mock(Context.class);
diff --git a/packages/SystemUI/res/color/light_background.xml b/packages/SystemUI/res/color/light_background.xml
new file mode 100644
index 0000000..2effd99
--- /dev/null
+++ b/packages/SystemUI/res/color/light_background.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_enabled="false"
+ android:color="@color/control_default_background" />
+ <item android:color="@color/GM2_yellow_50" />
+</selector>
diff --git a/packages/SystemUI/res/color/light_foreground.xml b/packages/SystemUI/res/color/light_foreground.xml
new file mode 100644
index 0000000..8143028
--- /dev/null
+++ b/packages/SystemUI/res/color/light_foreground.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_enabled="false"
+ android:color="@color/control_default_foreground" />
+ <item android:color="@color/GM2_orange_900" />
+</selector>
diff --git a/packages/SystemUI/res/color/lock_background.xml b/packages/SystemUI/res/color/lock_background.xml
new file mode 100644
index 0000000..646fe5d
--- /dev/null
+++ b/packages/SystemUI/res/color/lock_background.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_enabled="false"
+ android:color="@color/control_default_background" />
+ <item android:color="@color/GM2_blue_50" />
+</selector>
diff --git a/packages/SystemUI/res/color/lock_foreground.xml b/packages/SystemUI/res/color/lock_foreground.xml
new file mode 100644
index 0000000..3e05653
--- /dev/null
+++ b/packages/SystemUI/res/color/lock_foreground.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_enabled="false"
+ android:color="@color/control_default_foreground" />
+ <item android:color="@color/GM2_blue_700" />
+</selector>
diff --git a/packages/SystemUI/res/color/unknown_foreground.xml b/packages/SystemUI/res/color/unknown_foreground.xml
new file mode 100644
index 0000000..bf028f1
--- /dev/null
+++ b/packages/SystemUI/res/color/unknown_foreground.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_enabled="false"
+ android:color="@color/control_default_foreground" />
+ <item android:color="@color/GM2_blue_700" />
+ </selector>
diff --git a/packages/SystemUI/res/drawable/control_background.xml b/packages/SystemUI/res/drawable/control_background.xml
new file mode 100644
index 0000000..b246ea0
--- /dev/null
+++ b/packages/SystemUI/res/drawable/control_background.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+* Copyright 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.
+*/
+-->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item>
+ <shape>
+ <solid android:color="?android:attr/colorBackgroundFloating"/>
+ <corners android:radius="@dimen/control_corner_radius" />
+ </shape>
+ </item>
+ <item
+ android:id="@+id/clip_layer">
+ <clip
+ android:clipOrientation="horizontal"
+ android:drawable="@drawable/control_layer"/>
+ </item>
+</layer-list>
diff --git a/packages/SystemUI/res/drawable/control_layer.xml b/packages/SystemUI/res/drawable/control_layer.xml
new file mode 100644
index 0000000..fe8c4a4
--- /dev/null
+++ b/packages/SystemUI/res/drawable/control_layer.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+* Copyright 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">
+ <solid android:color="@android:color/transparent"/>
+ <corners android:radius="@dimen/control_corner_radius" />
+</shape>
diff --git a/packages/SystemUI/res/drawable/control_no_favorites_background.xml b/packages/SystemUI/res/drawable/control_no_favorites_background.xml
new file mode 100644
index 0000000..1e282ad
--- /dev/null
+++ b/packages/SystemUI/res/drawable/control_no_favorites_background.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+* Copyright 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">
+ <stroke android:width="1dp" android:color="?android:attr/colorBackgroundFloating"/>
+ <corners android:radius="@dimen/control_corner_radius" />
+</shape>
diff --git a/packages/SystemUI/res/drawable/ic_device_thermostat_gm2_24px.xml b/packages/SystemUI/res/drawable/ic_device_thermostat_gm2_24px.xml
new file mode 100644
index 0000000..45a658f
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_device_thermostat_gm2_24px.xml
@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M18,9h-5v2h5m3,-6h-8v2h8m-9,11.97c0.62,-0.83 1,-1.85 1,-2.97 0,-1.63 -0.79,-3.09 -2,-4V6c0,-1.66 -1.34,-3 -3,-3S5,4.34 5,6v6c-1.21,0.91 -2,2.37 -2,4 0,1.12 0.38,2.14 1,2.97V19h0.02c0.91,1.21 2.35,2 3.98,2s3.06,-0.79 3.98,-2H12v-0.03zM6.2,13.6L7,13V6c0,-0.55 0.45,-1 1,-1s1,0.45 1,1v7l0.8,0.6c0.75,0.57 1.2,1.46 1.2,2.4H5c0,-0.94 0.45,-1.84 1.2,-2.4z"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable/ic_light_off_gm2_24px.xml b/packages/SystemUI/res/drawable/ic_light_off_gm2_24px.xml
new file mode 100644
index 0000000..78c3cc5
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_light_off_gm2_24px.xml
@@ -0,0 +1,19 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M9,21v-1h6v1c0,0.55 -0.45,1 -1,1h-4c-0.55,0 -1,-0.45 -1,-1z"/>
+ <group>
+ <clip-path android:pathData="M0,0h24v24H0z M 0,0"/>
+ </group>
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M12,2c-1.89,0 -3.6,0.75 -4.86,1.97l1.41,1.41C9.45,4.53 10.67,4 12,4c2.76,0 5,2.24 5,5 0,1.28 -0.5,2.5 -1.36,3.42l-0.02,0.02 1.41,1.41C18.25,12.6 19,10.89 19,9c0,-3.86 -3.14,-7 -7,-7z"
+ android:fillType="evenOdd"/>
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M2.92,2.29L1.65,3.57l3.59,3.59C5.09,7.75 5,8.36 5,9c0,2.38 1.19,4.47 3,5.74V17c0,0.55 0.45,1 1,1h6c0.3,0 0.57,-0.13 0.75,-0.34L20.09,22l1.27,-1.27L2.92,2.29zM10,16v-2.3l-0.85,-0.6C7.8,12.16 7,10.63 7,9v-0.08L14.09,16H10z"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable/ic_lock_gm2_24px.xml b/packages/SystemUI/res/drawable/ic_lock_gm2_24px.xml
new file mode 100644
index 0000000..f4299e6
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_lock_gm2_24px.xml
@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M18,8h-1L17,6c0,-2.76 -2.24,-5 -5,-5S7,3.24 7,6v2L6,8c-1.1,0 -2,0.9 -2,2v10c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L20,10c0,-1.1 -0.9,-2 -2,-2zM9,6c0,-1.66 1.34,-3 3,-3s3,1.34 3,3v2L9,8L9,6zM18,20L6,20L6,10h12v10zM12,17c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2z"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable/ic_lock_open_gm2_24px.xml b/packages/SystemUI/res/drawable/ic_lock_open_gm2_24px.xml
new file mode 100644
index 0000000..59fe0a9
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_lock_open_gm2_24px.xml
@@ -0,0 +1,12 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M18,8h-1L17,6c0,-2.76 -2.24,-5 -5,-5S7,3.24 7,6h2c0,-1.66 1.34,-3 3,-3s3,1.34 3,3v2L6,8c-1.1,0 -2,0.9 -2,2v10c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L20,10c0,-1.1 -0.9,-2 -2,-2zM18,20L6,20L6,10h12v10z"/>
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M12,15m-2,0a2,2 0,1 1,4 0a2,2 0,1 1,-4 0"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable/ic_more_vert.xml b/packages/SystemUI/res/drawable/ic_more_vert.xml
new file mode 100644
index 0000000..1309fa8
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_more_vert.xml
@@ -0,0 +1,24 @@
+<!--
+ 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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M12,8c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM12,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM12,16c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2z"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable/ic_power_gm2_24px.xml b/packages/SystemUI/res/drawable/ic_power_gm2_24px.xml
new file mode 100644
index 0000000..cd95719
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_power_gm2_24px.xml
@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M16,9v4.66l-3.5,3.51V19h-1v-1.83L8,13.65V9h8m0,-6h-2v4h-4V3H8v4h-0.01C6.9,6.99 6,7.89 6,8.98v5.52L9.5,18v3h5v-3l3.5,-3.51V9c0,-1.1 -0.9,-2 -2,-2V3z"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable/ic_power_off_gm2_24px.xml b/packages/SystemUI/res/drawable/ic_power_off_gm2_24px.xml
new file mode 100644
index 0000000..3eb7dd6
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_power_off_gm2_24px.xml
@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M21.19,21.19L2.81,2.81 1.39,4.22l4.63,4.63L6,14.5 9.5,18v3h5v-3l0.34,-0.34 4.94,4.94 1.41,-1.41zM12.5,17.17L12.5,19h-1v-1.83L8,13.65v-2.83l5.42,5.42 -0.92,0.93zM11.83,9L8,5.17L8,3h2v4h4L14,3h2v4c1.1,0 2,0.9 2,2v5.49l-0.34,0.34L16,13.17L16,9h-4.17z"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable/ic_power_settings_new_gm2_24px.xml b/packages/SystemUI/res/drawable/ic_power_settings_new_gm2_24px.xml
new file mode 100644
index 0000000..f4edd87
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_power_settings_new_gm2_24px.xml
@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M11,2h2v10h-2zM18.37,5.64l-1.41,1.41c2.73,2.73 2.72,7.16 -0.01,9.89 -2.73,2.73 -7.17,2.73 -9.89,0.01 -2.73,-2.73 -2.74,-7.18 -0.01,-9.91l-1.41,-1.4c-3.51,3.51 -3.51,9.21 0.01,12.73 3.51,3.51 9.21,3.51 12.72,-0.01 3.51,-3.51 3.51,-9.2 0,-12.72z"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable/ic_switches_gm2_24px.xml b/packages/SystemUI/res/drawable/ic_switches_gm2_24px.xml
new file mode 100644
index 0000000..bb535ce
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_switches_gm2_24px.xml
@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M19,9h-8.02C10.06,7.79 8.63,7 7,7c-2.76,0 -5,2.24 -5,5s2.24,5 5,5c1.63,0 3.06,-0.79 3.98,-2H19c1.66,0 3,-1.34 3,-3S20.66,9 19,9zM19,13h-7.1c0.07,-0.32 0.1,-0.66 0.1,-1s-0.04,-0.68 -0.1,-1H19c0.55,0 1,0.45 1,1S19.55,13 19,13z"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable/ic_vacuum_gm2_24px.xml b/packages/SystemUI/res/drawable/ic_vacuum_gm2_24px.xml
new file mode 100644
index 0000000..86b9591
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_vacuum_gm2_24px.xml
@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M4,16c-1.66,0 -3,1.34 -3,3s1.34,3 3,3 3,-1.34 3,-3 -1.34,-3 -3,-3zM4,20c-0.55,0 -1,-0.45 -1,-1s0.45,-1 1,-1 1,0.45 1,1 -0.45,1 -1,1zM23,20v2h-7v-2h2.49L12.01,4.59C11.6,3.63 10.66,3 9.61,3 8.17,3 7,4.17 7,5.61L7,9h2c2.21,0 4,1.79 4,4v9L7.99,22c0.44,-0.58 0.76,-1.26 0.91,-2L11,20v-7c0,-1.1 -0.9,-2 -2,-2L4,11v3c-0.71,0 -1.39,0.15 -2,0.42L2,9h3L5,5.61C5,3.07 7.07,1 9.61,1c1.86,0 3.53,1.11 4.25,2.82L20.66,20L23,20z"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable/ic_videocam_gm2_24px.xml b/packages/SystemUI/res/drawable/ic_videocam_gm2_24px.xml
new file mode 100644
index 0000000..687c9c4
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_videocam_gm2_24px.xml
@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M18,10.48L18,6c0,-1.1 -0.9,-2 -2,-2L4,4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2v-4.48l4,3.98v-11l-4,3.98zM16,9.69L16,18L4,18L4,6h12v3.69z"/>
+</vector>
diff --git a/packages/SystemUI/res/layout/controls_base_item.xml b/packages/SystemUI/res/layout/controls_base_item.xml
new file mode 100644
index 0000000..3c4c61e
--- /dev/null
+++ b/packages/SystemUI/res/layout/controls_base_item.xml
@@ -0,0 +1,79 @@
+<?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.
+-->
+<androidx.constraintlayout.widget.ConstraintLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:layout_width="0dp"
+ android:layout_weight="1"
+ android:layout_height="@dimen/control_height"
+ android:padding="@dimen/control_padding"
+ android:clickable="true"
+ android:focusable="true"
+ android:layout_marginLeft="3dp"
+ android:layout_marginRight="3dp"
+ android:background="@drawable/control_background">
+
+ <ImageView
+ android:id="@+id/icon"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent" />
+
+ <TextView
+ android:id="@+id/status"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textSize="@dimen/control_status_normal"
+ android:textColor="?android:attr/textColorPrimary"
+ android:fontFamily="@*android:string/config_bodyFontFamily"
+ android:paddingLeft="3dp"
+ app:layout_constraintBottom_toBottomOf="@+id/icon"
+ app:layout_constraintStart_toEndOf="@+id/icon" />
+
+ <TextView
+ android:id="@+id/status_extra"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textSize="@dimen/control_status_normal"
+ android:textColor="?android:attr/textColorPrimary"
+ android:fontFamily="@*android:string/config_bodyFontFamily"
+ android:paddingLeft="3dp"
+ app:layout_constraintBottom_toBottomOf="@+id/icon"
+ app:layout_constraintStart_toEndOf="@+id/status" />
+
+ <TextView
+ android:id="@+id/title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textSize="18sp"
+ android:textColor="?android:attr/textColorPrimary"
+ android:fontFamily="@*android:string/config_headlineFontFamily"
+ app:layout_constraintBottom_toTopOf="@+id/subtitle"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/icon" />
+
+ <TextView
+ android:id="@+id/subtitle"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textSize="16sp"
+ android:textColor="?android:attr/textColorSecondary"
+ android:fontFamily="@*android:string/config_headlineFontFamily"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintStart_toStartOf="parent" />
+</androidx.constraintlayout.widget.ConstraintLayout>
diff --git a/packages/SystemUI/res/layout/controls_no_favorites.xml b/packages/SystemUI/res/layout/controls_no_favorites.xml
new file mode 100644
index 0000000..79672ca
--- /dev/null
+++ b/packages/SystemUI/res/layout/controls_no_favorites.xml
@@ -0,0 +1,18 @@
+<merge
+ xmlns:android="http://schemas.android.com/apk/res/android">
+ <TextView
+ android:id="@+id/controls_title"
+ android:text="@string/quick_controls_title"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:singleLine="true"
+ android:gravity="center"
+ android:textSize="25dp"
+ android:paddingTop="40dp"
+ android:paddingBottom="40dp"
+ android:layout_marginLeft="10dp"
+ android:layout_marginRight="10dp"
+ android:textColor="?android:attr/textColorPrimary"
+ android:fontFamily="@*android:string/config_headlineFontFamily"
+ android:background="@drawable/control_no_favorites_background"/>
+</merge>
diff --git a/packages/SystemUI/res/layout/controls_row.xml b/packages/SystemUI/res/layout/controls_row.xml
new file mode 100644
index 0000000..13a6b36
--- /dev/null
+++ b/packages/SystemUI/res/layout/controls_row.xml
@@ -0,0 +1,22 @@
+<?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.
+-->
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ orientation="horizontal"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="@dimen/control_spacing" />
diff --git a/packages/SystemUI/res/layout/controls_with_favorites.xml b/packages/SystemUI/res/layout/controls_with_favorites.xml
new file mode 100644
index 0000000..7804fe6
--- /dev/null
+++ b/packages/SystemUI/res/layout/controls_with_favorites.xml
@@ -0,0 +1,35 @@
+<merge
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto">
+
+ <androidx.constraintlayout.widget.ConstraintLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+
+ <TextView
+ android:text="@string/quick_controls_title"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:singleLine="true"
+ android:gravity="center"
+ android:textSize="25dp"
+ android:textColor="?android:attr/textColorPrimary"
+ android:fontFamily="@*android:string/config_headlineFontFamily"
+ app:layout_constraintLeft_toLeftOf="parent"
+ app:layout_constraintRight_toRightOf="parent"/>
+ <ImageView
+ android:id="@+id/controls_more"
+ android:src="@drawable/ic_more_vert"
+ android:layout_width="34dp"
+ android:layout_height="24dp"
+ android:layout_marginEnd="10dp"
+ app:layout_constraintEnd_toEndOf="parent"/>
+
+ </androidx.constraintlayout.widget.ConstraintLayout>
+
+ <LinearLayout
+ android:id="@+id/global_actions_controls_list"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical" />
+</merge>
diff --git a/packages/SystemUI/res/layout/global_actions_grid_v2.xml b/packages/SystemUI/res/layout/global_actions_grid_v2.xml
index 4cfb47e..6741484 100644
--- a/packages/SystemUI/res/layout/global_actions_grid_v2.xml
+++ b/packages/SystemUI/res/layout/global_actions_grid_v2.xml
@@ -111,20 +111,7 @@
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/global_actions_panel">
- <TextView
- android:text="Home"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:singleLine="true"
- android:gravity="center"
- android:textSize="25dp"
- android:textColor="?android:attr/textColorPrimary"
- android:fontFamily="@*android:string/config_headlineFontFamily" />
- <LinearLayout
- android:id="@+id/global_actions_controls_list"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical" />
+
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml
index 8dd2a8b..09058f2 100644
--- a/packages/SystemUI/res/values/colors.xml
+++ b/packages/SystemUI/res/values/colors.xml
@@ -200,18 +200,28 @@
<color name="GM2_grey_800">#3C4043</color>
<color name="GM2_grey_900">#202124</color>
+ <color name="GM2_red_50">#FCE8E6</color>
<color name="GM2_red_300">#F28B82</color>
<color name="GM2_red_500">#B71C1C</color>
<color name="GM2_red_700">#C5221F</color>
+ <color name="GM2_blue_50">#E8F0FE</color>
<color name="GM2_blue_200">#AECBFA</color>
<color name="GM2_blue_300">#8AB4F8</color>
+ <color name="GM2_blue_500">#FF4285F4</color>
<color name="GM2_blue_600">#1A73E8</color>
<color name="GM2_blue_700">#1967D2</color>
+ <color name="GM2_yellow_50">#FEF7E0</color>
<color name="GM2_yellow_500">#FFFBBC04</color>
+
<color name="GM2_green_500">#FF34A853</color>
- <color name="GM2_blue_500">#FF4285F4</color>
+
+ <color name="GM2_orange_900">#B06000</color>
<color name="magnification_border_color">#FF9900</color>
+
+ <!-- controls -->
+ <color name="control_default_foreground">?android:attr/textColorPrimary</color>
+ <color name="control_default_background">?android:attr/colorBackgroundFloating</color>
</resources>
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index b40c5c0..cc58b20 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -1181,5 +1181,12 @@
<dimen name="magnifier_up_down_controls_width">45dp</dimen>
<dimen name="magnifier_up_down_controls_height">40dp</dimen>
+ <!-- Home Controls -->
+ <dimen name="control_spacing">5dp</dimen>
+ <dimen name="control_corner_radius">15dp</dimen>
+ <dimen name="control_height">100dp</dimen>
+ <dimen name="control_padding">15dp</dimen>
+ <dimen name="control_status_normal">12dp</dimen>
+ <dimen name="control_status_expanded">18dp</dimen>
<dimen name="app_icon_size">32dp</dimen>
</resources>
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index 44a7fda..1f13f8d 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -2546,4 +2546,7 @@
<string name="magnification_window_title">Magnification Window</string>
<!-- Title for Magnification Controls Window [CHAR LIMIT=NONE] -->
<string name="magnification_controls_title">Magnification Window Controls</string>
+
+ <!-- Quick Controls strings [CHAR LIMIT=30] -->
+ <string name="quick_controls_title">Quick Controls</string>
</resources>
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleViewInfoTask.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleViewInfoTask.java
index 6e23777..55a7a11 100644
--- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleViewInfoTask.java
+++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleViewInfoTask.java
@@ -246,7 +246,7 @@
bubbleMessage.senderName = sender != null
? sender.getName()
: null;
- bubbleMessage.senderAvatar = sender != null
+ bubbleMessage.senderAvatar = sender != null && sender.getIcon() != null
? sender.getIcon().loadDrawable(context)
: null;
return bubbleMessage;
diff --git a/packages/SystemUI/src/com/android/systemui/controls/ui/ControlViewHolder.kt b/packages/SystemUI/src/com/android/systemui/controls/ui/ControlViewHolder.kt
new file mode 100644
index 0000000..81b5f36
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/controls/ui/ControlViewHolder.kt
@@ -0,0 +1,400 @@
+/*
+ * 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.
+ */
+
+package com.android.systemui.controls.ui
+
+import android.content.Context
+import android.graphics.drawable.ClipDrawable
+import android.graphics.drawable.Drawable
+import android.graphics.drawable.GradientDrawable
+import android.graphics.drawable.Icon
+import android.graphics.drawable.LayerDrawable
+import android.service.controls.Control
+import android.service.controls.DeviceTypes
+import android.service.controls.actions.BooleanAction
+import android.service.controls.actions.ControlAction
+import android.service.controls.actions.FloatAction
+import android.service.controls.templates.ControlTemplate
+import android.service.controls.templates.RangeTemplate
+import android.service.controls.templates.ToggleRangeTemplate
+import android.service.controls.templates.ToggleTemplate
+import android.util.TypedValue
+import android.view.MotionEvent
+import android.view.View
+import android.view.ViewGroup
+import android.widget.ImageView
+import android.widget.TextView
+
+import com.android.systemui.controls.controller.ControlsController
+import com.android.systemui.R
+
+private const val MIN_LEVEL = 0
+private const val MAX_LEVEL = 10000
+
+class ControlViewHolder(
+ val layout: ViewGroup,
+ val controlsController: ControlsController
+) {
+ val icon: ImageView = layout.requireViewById(R.id.icon)
+ val status: TextView = layout.requireViewById(R.id.status)
+ val statusExtra: TextView = layout.requireViewById(R.id.status_extra)
+ val title: TextView = layout.requireViewById(R.id.title)
+ val subtitle: TextView = layout.requireViewById(R.id.subtitle)
+ val context: Context = layout.getContext()
+ val clipLayer: ClipDrawable
+ val gd: GradientDrawable
+ lateinit var cws: ControlWithState
+
+ init {
+ val ld = layout.getBackground() as LayerDrawable
+ ld.mutate()
+ clipLayer = ld.findDrawableByLayerId(R.id.clip_layer) as ClipDrawable
+ gd = clipLayer.getDrawable() as GradientDrawable
+ }
+
+ fun bindData(cws: ControlWithState) {
+ this.cws = cws
+
+ val (status, template) = cws.control?.let {
+ title.setText(it.getTitle())
+ subtitle.setText(it.getSubtitle())
+ Pair(it.getStatus(), it.getControlTemplate())
+ } ?: run {
+ title.setText(cws.ci.controlTitle)
+ subtitle.setText("")
+ Pair(Control.STATUS_UNKNOWN, ControlTemplate.NO_TEMPLATE)
+ }
+
+ findBehavior(status, template).apply(this, cws)
+ }
+
+ fun action(action: ControlAction) {
+ controlsController.action(cws.ci, action)
+ }
+
+ private fun findBehavior(status: Int, template: ControlTemplate): Behavior {
+ return when {
+ status == Control.STATUS_UNKNOWN -> UnknownBehavior()
+ template is ToggleTemplate -> ToggleTemplateBehavior()
+ template is ToggleRangeTemplate -> ToggleRangeTemplateBehavior()
+ else -> {
+ object : Behavior {
+ override fun apply(cvh: ControlViewHolder, cws: ControlWithState) {
+ cvh.status.setText(cws.control?.getStatusText())
+ cvh.applyRenderInfo(findRenderInfo(cws.ci.deviceType, false))
+ }
+ }
+ }
+ }
+ }
+
+ internal fun applyRenderInfo(ri: RenderInfo) {
+ val fg = context.getResources().getColorStateList(ri.foreground, context.getTheme())
+ val bg = context.getResources().getColorStateList(ri.background, context.getTheme())
+ status.setTextColor(fg)
+ statusExtra.setTextColor(fg)
+
+ icon.setImageIcon(Icon.createWithResource(context, ri.iconResourceId))
+ icon.setImageTintList(fg)
+
+ gd.setColor(bg)
+ }
+
+ fun setEnabled(enabled: Boolean) {
+ status.setEnabled(enabled)
+ icon.setEnabled(enabled)
+ }
+}
+
+private interface Behavior {
+ fun apply(cvh: ControlViewHolder, cws: ControlWithState)
+
+ fun findRenderInfo(deviceType: Int, isActive: Boolean): RenderInfo =
+ deviceRenderMap.getOrDefault(deviceType, unknownDeviceMap).getValue(isActive)
+}
+
+private class UnknownBehavior : Behavior {
+ override fun apply(cvh: ControlViewHolder, cws: ControlWithState) {
+ cvh.status.setText("Loading...")
+ cvh.applyRenderInfo(findRenderInfo(cws.ci.deviceType, false))
+ }
+}
+
+private class ToggleRangeTemplateBehavior : Behavior {
+ lateinit var clipLayer: Drawable
+ lateinit var template: ToggleRangeTemplate
+ lateinit var control: Control
+ lateinit var cvh: ControlViewHolder
+ lateinit var rangeTemplate: RangeTemplate
+ lateinit var statusExtra: TextView
+ lateinit var status: TextView
+ lateinit var context: Context
+
+ override fun apply(cvh: ControlViewHolder, cws: ControlWithState) {
+ this.control = cws.control!!
+ this.cvh = cvh
+
+ statusExtra = cvh.statusExtra
+ status = cvh.status
+
+ status.setText(control.getStatusText())
+
+ context = status.getContext()
+
+ cvh.layout.setOnTouchListener(ToggleRangeTouchListener())
+
+ val ld = cvh.layout.getBackground() as LayerDrawable
+ clipLayer = ld.findDrawableByLayerId(R.id.clip_layer)
+
+ template = control.getControlTemplate() as ToggleRangeTemplate
+ rangeTemplate = template.getRange()
+
+ val checked = template.isChecked()
+ val deviceType = control.getDeviceType()
+
+ updateRange((rangeTemplate.getCurrentValue() / 100.0f), checked)
+
+ cvh.setEnabled(checked)
+ cvh.applyRenderInfo(findRenderInfo(deviceType, checked))
+ }
+
+ fun toggle() {
+ cvh.action(BooleanAction(template.getTemplateId(), !template.isChecked()))
+
+ val nextLevel = if (template.isChecked()) MIN_LEVEL else MAX_LEVEL
+ clipLayer.setLevel(nextLevel)
+ }
+
+ fun beginUpdateRange() {
+ status.setVisibility(View.GONE)
+ statusExtra.setTextSize(TypedValue.COMPLEX_UNIT_PX, context.getResources()
+ .getDimensionPixelSize(R.dimen.control_status_expanded).toFloat())
+ }
+
+ fun updateRange(f: Float, checked: Boolean) {
+ clipLayer.setLevel(if (checked) (MAX_LEVEL * f).toInt() else MIN_LEVEL)
+
+ if (checked && f < 100.0f && f > 0.0f) {
+ statusExtra.setText("" + (f * 100.0).toInt() + "%")
+ statusExtra.setVisibility(View.VISIBLE)
+ } else {
+ statusExtra.setText("")
+ statusExtra.setVisibility(View.GONE)
+ }
+ }
+
+ fun endUpdateRange(f: Float) {
+ statusExtra.setText(" - " + (f * 100.0).toInt() + "%")
+
+ val newValue = rangeTemplate.getMinValue() +
+ (f * (rangeTemplate.getMaxValue() - rangeTemplate.getMinValue()))
+
+ statusExtra.setTextSize(TypedValue.COMPLEX_UNIT_PX, context.getResources()
+ .getDimensionPixelSize(R.dimen.control_status_normal).toFloat())
+ status.setVisibility(View.VISIBLE)
+
+ cvh.action(FloatAction(rangeTemplate.getTemplateId(), findNearestStep(newValue)))
+ }
+
+ fun findNearestStep(value: Float): Float {
+ var minDiff = 1000f
+
+ var f = rangeTemplate.getMinValue()
+ while (f <= rangeTemplate.getMaxValue()) {
+ val currentDiff = Math.abs(value - f)
+ if (currentDiff < minDiff) {
+ minDiff = currentDiff
+ } else {
+ return f - rangeTemplate.getStepValue()
+ }
+
+ f += rangeTemplate.getStepValue()
+ }
+
+ return rangeTemplate.getMaxValue()
+ }
+
+ inner class ToggleRangeTouchListener() : View.OnTouchListener {
+ private var initialTouchX: Float = 0.0f
+ private var initialTouchY: Float = 0.0f
+ private var isDragging: Boolean = false
+ private val minDragDiff = 20
+
+ override fun onTouch(v: View, e: MotionEvent): Boolean {
+ when (e.getActionMasked()) {
+ MotionEvent.ACTION_DOWN -> setupTouch(e)
+ MotionEvent.ACTION_MOVE -> detectDrag(v, e)
+ MotionEvent.ACTION_UP -> endTouch(v, e)
+ }
+
+ return true
+ }
+
+ private fun setupTouch(e: MotionEvent) {
+ initialTouchX = e.getX()
+ initialTouchY = e.getY()
+ }
+
+ private fun detectDrag(v: View, e: MotionEvent) {
+ val xDiff = Math.abs(e.getX() - initialTouchX)
+ val yDiff = Math.abs(e.getY() - initialTouchY)
+
+ if (xDiff < minDragDiff) {
+ isDragging = false
+ } else {
+ if (!isDragging) {
+ this@ToggleRangeTemplateBehavior.beginUpdateRange()
+ }
+ v.getParent().requestDisallowInterceptTouchEvent(true)
+ isDragging = true
+ if (yDiff > xDiff) {
+ endTouch(v, e)
+ } else {
+ val percent = Math.max(0.0f, Math.min(1.0f, e.getX() / v.getWidth()))
+ this@ToggleRangeTemplateBehavior.updateRange(percent, true)
+ }
+ }
+ }
+
+ private fun endTouch(v: View, e: MotionEvent) {
+ if (!isDragging) {
+ this@ToggleRangeTemplateBehavior.toggle()
+ } else {
+ val percent = Math.max(0.0f, Math.min(1.0f, e.getX() / v.getWidth()))
+ this@ToggleRangeTemplateBehavior.endUpdateRange(percent)
+ }
+
+ initialTouchX = 0.0f
+ initialTouchY = 0.0f
+ isDragging = false
+ }
+ }
+}
+
+private class ToggleTemplateBehavior : Behavior {
+ lateinit var clipLayer: Drawable
+ lateinit var template: ToggleTemplate
+ lateinit var control: Control
+ lateinit var cvh: ControlViewHolder
+ lateinit var context: Context
+ lateinit var status: TextView
+
+ override fun apply(cvh: ControlViewHolder, cws: ControlWithState) {
+ this.control = cws.control!!
+ this.cvh = cvh
+ status = cvh.status
+
+ status.setText(control.getStatusText())
+
+ cvh.layout.setOnClickListener(View.OnClickListener() { toggle() })
+
+ val ld = cvh.layout.getBackground() as LayerDrawable
+ clipLayer = ld.findDrawableByLayerId(R.id.clip_layer)
+
+ template = control.getControlTemplate() as ToggleTemplate
+
+ val checked = template.isChecked()
+ val deviceType = control.getDeviceType()
+
+ clipLayer.setLevel(if (checked) MAX_LEVEL else MIN_LEVEL)
+ cvh.setEnabled(checked)
+ cvh.applyRenderInfo(findRenderInfo(deviceType, checked))
+ }
+
+ fun toggle() {
+ cvh.action(BooleanAction(template.getTemplateId(), !template.isChecked()))
+
+ val nextLevel = if (template.isChecked()) MIN_LEVEL else MAX_LEVEL
+ clipLayer.setLevel(nextLevel)
+ }
+}
+
+internal data class RenderInfo(val iconResourceId: Int, val foreground: Int, val background: Int)
+
+private val unknownDeviceMap = mapOf(
+ false to RenderInfo(
+ R.drawable.ic_light_off_gm2_24px,
+ R.color.unknown_foreground,
+ R.color.unknown_foreground),
+ true to RenderInfo(
+ R.drawable.ic_lightbulb_outline_gm2_24px,
+ R.color.unknown_foreground,
+ R.color.unknown_foreground)
+)
+
+private val deviceRenderMap = mapOf<Int, Map<Boolean, RenderInfo>>(
+ DeviceTypes.TYPE_UNKNOWN to unknownDeviceMap,
+ DeviceTypes.TYPE_LIGHT to mapOf(
+ false to RenderInfo(
+ R.drawable.ic_light_off_gm2_24px,
+ R.color.light_foreground,
+ R.color.light_background),
+ true to RenderInfo(
+ R.drawable.ic_lightbulb_outline_gm2_24px,
+ R.color.light_foreground,
+ R.color.light_background)
+ ),
+ DeviceTypes.TYPE_THERMOSTAT to mapOf(
+ false to RenderInfo(
+ R.drawable.ic_device_thermostat_gm2_24px,
+ R.color.light_foreground,
+ R.color.light_background),
+ true to RenderInfo(
+ R.drawable.ic_device_thermostat_gm2_24px,
+ R.color.light_foreground,
+ R.color.light_background)
+ ),
+ DeviceTypes.TYPE_CAMERA to mapOf(
+ false to RenderInfo(
+ R.drawable.ic_videocam_gm2_24px,
+ R.color.light_foreground,
+ R.color.light_background),
+ true to RenderInfo(
+ R.drawable.ic_videocam_gm2_24px,
+ R.color.light_foreground,
+ R.color.light_background)
+ ),
+ DeviceTypes.TYPE_LOCK to mapOf(
+ false to RenderInfo(
+ R.drawable.ic_lock_open_gm2_24px,
+ R.color.lock_foreground,
+ R.color.lock_background),
+ true to RenderInfo(
+ R.drawable.ic_lock_gm2_24px,
+ R.color.lock_foreground,
+ R.color.lock_background)
+ ),
+ DeviceTypes.TYPE_SWITCH to mapOf(
+ false to RenderInfo(
+ R.drawable.ic_switches_gm2_24px,
+ R.color.lock_foreground,
+ R.color.lock_background),
+ true to RenderInfo(
+ R.drawable.ic_switches_gm2_24px,
+ R.color.lock_foreground,
+ R.color.lock_background)
+ ),
+ DeviceTypes.TYPE_OUTLET to mapOf(
+ false to RenderInfo(
+ R.drawable.ic_power_off_gm2_24px,
+ R.color.lock_foreground,
+ R.color.lock_background),
+ true to RenderInfo(
+ R.drawable.ic_power_gm2_24px,
+ R.color.lock_foreground,
+ R.color.lock_background)
+ )
+)
diff --git a/packages/SystemUI/src/com/android/systemui/controls/ui/ControlWithState.kt b/packages/SystemUI/src/com/android/systemui/controls/ui/ControlWithState.kt
new file mode 100644
index 0000000..816f0b2
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/controls/ui/ControlWithState.kt
@@ -0,0 +1,31 @@
+/*
+ * 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.
+ */
+
+package com.android.systemui.controls.ui
+
+import android.service.controls.Control
+
+import com.android.systemui.controls.controller.ControlInfo
+
+/**
+ * A container for:
+ * <ul>
+ * <li>ControlInfo - Basic cached info about a Control
+ * <li>Control - Actual Control parcelable received directly from
+ * the participating application
+ * </ul>
+ */
+data class ControlWithState(val ci: ControlInfo, val control: Control?)
diff --git a/packages/SystemUI/src/com/android/systemui/controls/ui/ControlsUiController.kt b/packages/SystemUI/src/com/android/systemui/controls/ui/ControlsUiController.kt
index 0270c2b..b07a75d 100644
--- a/packages/SystemUI/src/com/android/systemui/controls/ui/ControlsUiController.kt
+++ b/packages/SystemUI/src/com/android/systemui/controls/ui/ControlsUiController.kt
@@ -19,12 +19,15 @@
import android.content.ComponentName
import android.service.controls.Control
import android.service.controls.actions.ControlAction
+import android.view.ViewGroup
interface ControlsUiController {
+ fun show(parent: ViewGroup)
+ fun hide()
fun onRefreshState(componentName: ComponentName, controls: List<Control>)
fun onActionResponse(
componentName: ComponentName,
controlId: String,
@ControlAction.ResponseResult response: Int
)
-}
\ No newline at end of file
+}
diff --git a/packages/SystemUI/src/com/android/systemui/controls/ui/ControlsUiControllerImpl.kt b/packages/SystemUI/src/com/android/systemui/controls/ui/ControlsUiControllerImpl.kt
index 0ace126..926fb6e 100644
--- a/packages/SystemUI/src/com/android/systemui/controls/ui/ControlsUiControllerImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/controls/ui/ControlsUiControllerImpl.kt
@@ -16,19 +16,204 @@
package com.android.systemui.controls.ui
+import android.accounts.Account
+import android.accounts.AccountManager
import android.content.ComponentName
+import android.content.Context
+import android.content.Intent
+import android.content.ServiceConnection
+import android.os.IBinder
import android.service.controls.Control
+import android.service.controls.TokenProvider
+import android.util.Log
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import android.widget.TextView
+
+import com.android.systemui.controls.controller.ControlsController
+import com.android.systemui.controls.controller.ControlInfo
+import com.android.systemui.controls.management.ControlsProviderSelectorActivity
+import com.android.systemui.dagger.qualifiers.Main
+import com.android.systemui.R
+
+import dagger.Lazy
+
+import java.util.concurrent.Executor
import javax.inject.Inject
import javax.inject.Singleton
+private const val TAG = "ControlsUi"
+
+// TEMP CODE for MOCK
+private const val TOKEN = "https://www.googleapis.com/auth/assistant"
+private const val SCOPE = "oauth2:" + TOKEN
+private var tokenProviderConnection: TokenProviderConnection? = null
+class TokenProviderConnection(val cc: ControlsController, val context: Context)
+ : ServiceConnection {
+ private var mTokenProvider: TokenProvider? = null
+
+ override fun onServiceConnected(cName: ComponentName, binder: IBinder) {
+ Thread({
+ Log.i(TAG, "TokenProviderConnection connected")
+ mTokenProvider = TokenProvider.Stub.asInterface(binder)
+
+ val mLastAccountName = mTokenProvider?.getAccountName()
+
+ if (mLastAccountName == null || mLastAccountName.isEmpty()) {
+ Log.e(TAG, "NO ACCOUNT IS SET. Open HomeMock app")
+ } else {
+ mTokenProvider?.setAuthToken(getAuthToken(mLastAccountName))
+ cc.subscribeToFavorites()
+ }
+ }, "TokenProviderThread").start()
+ }
+
+ override fun onServiceDisconnected(cName: ComponentName) {
+ mTokenProvider = null
+ }
+
+ fun getAuthToken(accountName: String): String? {
+ val am = AccountManager.get(context)
+ val accounts = am.getAccountsByType("com.google")
+ if (accounts == null || accounts.size == 0) {
+ Log.w(TAG, "No com.google accounts found")
+ return null
+ }
+
+ var account: Account? = null
+ for (a in accounts) {
+ if (a.name.equals(accountName)) {
+ account = a
+ break
+ }
+ }
+
+ if (account == null) {
+ account = accounts[0]
+ }
+
+ try {
+ return am.blockingGetAuthToken(account!!, SCOPE, true)
+ } catch (e: Throwable) {
+ Log.e(TAG, "Error getting auth token", e)
+ return null
+ }
+ }
+}
+
@Singleton
-class ControlsUiControllerImpl @Inject constructor() : ControlsUiController {
+class ControlsUiControllerImpl @Inject constructor (
+ val controlsController: Lazy<ControlsController>,
+ val context: Context,
+ @Main val uiExecutor: Executor
+) : ControlsUiController {
+
+ private lateinit var controlInfos: List<ControlInfo>
+ private val controlsById = mutableMapOf<Pair<ComponentName, String>, ControlWithState>()
+ private val controlViewsById = mutableMapOf<String, ControlViewHolder>()
+ private lateinit var parent: ViewGroup
+
+ override fun show(parent: ViewGroup) {
+ Log.d(TAG, "show()")
+
+ this.parent = parent
+
+ controlInfos = controlsController.get().getFavoriteControls()
+
+ controlInfos.map {
+ ControlWithState(it, null)
+ }.associateByTo(controlsById) { Pair(it.ci.component, it.ci.controlId) }
+
+ if (controlInfos.isEmpty()) {
+ showInitialSetupView()
+ } else {
+ showControlsView()
+ }
+
+ // Temp code to pass auth
+ tokenProviderConnection = TokenProviderConnection(controlsController.get(), context)
+ val serviceIntent = Intent()
+ serviceIntent.setComponent(ComponentName("com.android.systemui.home.mock",
+ "com.android.systemui.home.mock.AuthService"))
+ context.bindService(serviceIntent, tokenProviderConnection!!, Context.BIND_AUTO_CREATE)
+ }
+
+ private fun showInitialSetupView() {
+ val inflater = LayoutInflater.from(context)
+ inflater.inflate(R.layout.controls_no_favorites, parent, true)
+
+ val textView = parent.requireViewById(R.id.controls_title) as TextView
+ textView.setOnClickListener {
+ val i = Intent()
+ i.setComponent(ComponentName(context, ControlsProviderSelectorActivity::class.java))
+ i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
+ context.startActivity(i)
+ }
+ }
+
+ private fun showControlsView() {
+ val inflater = LayoutInflater.from(context)
+ inflater.inflate(R.layout.controls_with_favorites, parent, true)
+
+ val listView = parent.requireViewById(R.id.global_actions_controls_list) as ViewGroup
+ var lastRow: ViewGroup = createRow(inflater, listView)
+ controlInfos.forEach {
+ Log.d(TAG, "favorited control id: " + it.controlId)
+ if (lastRow.getChildCount() == 2) {
+ lastRow = createRow(inflater, listView)
+ }
+ val item = inflater.inflate(
+ R.layout.controls_base_item, lastRow, false) as ViewGroup
+ lastRow.addView(item)
+ val cvh = ControlViewHolder(item, controlsController.get())
+ cvh.bindData(controlsById.get(Pair(it.component, it.controlId))!!)
+ controlViewsById.put(it.controlId, cvh)
+ }
+
+ val moreImageView = parent.requireViewById(R.id.controls_more) as View
+ moreImageView.setOnClickListener {
+ val i = Intent()
+ i.setComponent(ComponentName(context, ControlsProviderSelectorActivity::class.java))
+ i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
+ context.startActivity(i)
+ }
+ }
+
+ override fun hide() {
+ Log.d(TAG, "hide()")
+ controlsController.get().unsubscribe()
+ context.unbindService(tokenProviderConnection)
+ tokenProviderConnection = null
+
+ parent.removeAllViews()
+ controlsById.clear()
+ controlViewsById.clear()
+ }
override fun onRefreshState(componentName: ComponentName, controls: List<Control>) {
- TODO("not implemented")
+ Log.d(TAG, "onRefreshState()")
+ controls.forEach { c ->
+ controlsById.get(Pair(componentName, c.getControlId()))?.let {
+ Log.d(TAG, "onRefreshState() for id: " + c.getControlId())
+ val cws = ControlWithState(it.ci, c)
+ controlsById.put(Pair(componentName, c.getControlId()), cws)
+
+ uiExecutor.execute {
+ controlViewsById.get(c.getControlId())?.bindData(cws)
+ }
+ }
+ }
}
override fun onActionResponse(componentName: ComponentName, controlId: String, response: Int) {
+ Log.d(TAG, "onActionResponse()")
TODO("not implemented")
}
-}
\ No newline at end of file
+
+ private fun createRow(inflater: LayoutInflater, parent: ViewGroup): ViewGroup {
+ val row = inflater.inflate(R.layout.controls_row, parent, false) as ViewGroup
+ parent.addView(row)
+ return row
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java
index 83f6d45..80d776a 100644
--- a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java
+++ b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java
@@ -93,12 +93,13 @@
import com.android.systemui.MultiListLayout.MultiListAdapter;
import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.colorextraction.SysuiColorExtractor;
+import com.android.systemui.controls.ui.ControlsUiController;
import com.android.systemui.dagger.qualifiers.Main;
import com.android.systemui.plugins.ActivityStarter;
import com.android.systemui.plugins.GlobalActions.GlobalActionsManager;
import com.android.systemui.plugins.GlobalActionsPanelPlugin;
-import com.android.systemui.statusbar.phone.NotificationShadeWindowController;
import com.android.systemui.statusbar.BlurUtils;
+import com.android.systemui.statusbar.phone.NotificationShadeWindowController;
import com.android.systemui.statusbar.phone.ScrimController;
import com.android.systemui.statusbar.policy.ConfigurationController;
import com.android.systemui.statusbar.policy.KeyguardStateController;
@@ -183,6 +184,7 @@
private final IStatusBarService mStatusBarService;
private final NotificationShadeWindowController mNotificationShadeWindowController;
private GlobalActionsPanelPlugin mPanelPlugin;
+ private ControlsUiController mControlsUiController;
/**
* @param context everything needs a context :(
@@ -200,7 +202,8 @@
TelecomManager telecomManager, MetricsLogger metricsLogger,
BlurUtils blurUtils, SysuiColorExtractor colorExtractor,
IStatusBarService statusBarService,
- NotificationShadeWindowController notificationShadeWindowController) {
+ NotificationShadeWindowController notificationShadeWindowController,
+ ControlsUiController controlsUiController) {
mContext = new ContextThemeWrapper(context, com.android.systemui.R.style.qs_theme);
mWindowManagerFuncs = windowManagerFuncs;
mAudioManager = audioManager;
@@ -220,6 +223,7 @@
mSysuiColorExtractor = colorExtractor;
mStatusBarService = statusBarService;
mNotificationShadeWindowController = notificationShadeWindowController;
+ mControlsUiController = controlsUiController;
// receive broadcasts
IntentFilter filter = new IntentFilter();
@@ -455,9 +459,12 @@
mKeyguardManager.isDeviceLocked())
: null;
+ boolean showControls = !mKeyguardManager.isDeviceLocked() && isControlsEnabled(mContext);
+
ActionsDialog dialog = new ActionsDialog(mContext, mAdapter, panelViewController,
mBlurUtils, mSysuiColorExtractor, mStatusBarService,
- mNotificationShadeWindowController, isControlsEnabled(mContext));
+ mNotificationShadeWindowController,
+ showControls ? mControlsUiController : null);
dialog.setCanceledOnTouchOutside(false); // Handled by the custom class.
dialog.setKeyguardShowing(mKeyguardShowing);
@@ -1543,13 +1550,15 @@
private boolean mHadTopUi;
private final NotificationShadeWindowController mNotificationShadeWindowController;
private final BlurUtils mBlurUtils;
- private final boolean mControlsEnabled;
+
+ private ControlsUiController mControlsUiController;
+ private ViewGroup mControlsView;
ActionsDialog(Context context, MyAdapter adapter,
GlobalActionsPanelPlugin.PanelViewController plugin, BlurUtils blurUtils,
SysuiColorExtractor sysuiColorExtractor, IStatusBarService statusBarService,
NotificationShadeWindowController notificationShadeWindowController,
- boolean controlsEnabled) {
+ ControlsUiController controlsUiController) {
super(context, com.android.systemui.R.style.Theme_SystemUI_Dialog_GlobalActions);
mContext = context;
mAdapter = adapter;
@@ -1557,7 +1566,7 @@
mColorExtractor = sysuiColorExtractor;
mStatusBarService = statusBarService;
mNotificationShadeWindowController = notificationShadeWindowController;
- mControlsEnabled = controlsEnabled;
+ mControlsUiController = controlsUiController;
// Window initialization
Window window = getWindow();
@@ -1639,6 +1648,7 @@
private void initializeLayout() {
setContentView(getGlobalActionsLayoutId(mContext));
fixNavBarClipping();
+ mControlsView = findViewById(com.android.systemui.R.id.global_actions_controls);
mGlobalActionsLayout = findViewById(com.android.systemui.R.id.global_actions_view);
mGlobalActionsLayout.setOutsideTouchListener(view -> dismiss());
((View) mGlobalActionsLayout.getParent()).setOnClickListener(view -> dismiss());
@@ -1674,7 +1684,7 @@
}
private int getGlobalActionsLayoutId(Context context) {
- if (mControlsEnabled) {
+ if (mControlsUiController != null) {
return com.android.systemui.R.layout.global_actions_grid_v2;
}
@@ -1758,6 +1768,9 @@
mBlurUtils.radiusForRatio(animatedValue));
})
.start();
+ if (mControlsUiController != null) {
+ mControlsUiController.show(mControlsView);
+ }
}
@Override
@@ -1766,6 +1779,7 @@
return;
}
mShowing = false;
+ if (mControlsUiController != null) mControlsUiController.hide();
mGlobalActionsLayout.setTranslationX(0);
mGlobalActionsLayout.setTranslationY(0);
mGlobalActionsLayout.setAlpha(1);
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
index 96b8a2a..14eec59 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
@@ -709,14 +709,14 @@
mShowHomeOverLockscreen = DeviceConfig.getBoolean(
DeviceConfig.NAMESPACE_SYSTEMUI,
NAV_BAR_HANDLE_SHOW_OVER_LOCKSCREEN,
- /* defaultValue = */ false);
+ /* defaultValue = */ true);
DeviceConfig.addOnPropertiesChangedListener(DeviceConfig.NAMESPACE_SYSTEMUI, mHandler::post,
new DeviceConfig.OnPropertiesChangedListener() {
@Override
public void onPropertiesChanged(DeviceConfig.Properties properties) {
if (properties.getKeyset().contains(NAV_BAR_HANDLE_SHOW_OVER_LOCKSCREEN)) {
mShowHomeOverLockscreen = properties.getBoolean(
- NAV_BAR_HANDLE_SHOW_OVER_LOCKSCREEN, false /* defaultValue */);
+ NAV_BAR_HANDLE_SHOW_OVER_LOCKSCREEN, true /* defaultValue */);
}
}
});
diff --git a/packages/SystemUI/src/com/android/systemui/pip/PipBoundsHandler.java b/packages/SystemUI/src/com/android/systemui/pip/PipBoundsHandler.java
index 8e34a90..6f03f18 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/PipBoundsHandler.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/PipBoundsHandler.java
@@ -261,8 +261,6 @@
mPinnedStackController.startAnimation(destinationBounds, sourceRectHint,
-1 /* animationDuration */);
mLastDestinationBounds.set(destinationBounds);
- mPinnedStackController.reportBounds(defaultBounds,
- getMovementBounds(defaultBounds));
} catch (RemoteException e) {
Log.e(TAG, "Failed to start PiP animation from SysUI", e);
}
@@ -317,7 +315,6 @@
outBounds.set(postChangeStackBounds);
mLastDestinationBounds.set(outBounds);
mPinnedStackController.resetBoundsAnimation(outBounds);
- mPinnedStackController.reportBounds(outBounds, getMovementBounds(outBounds));
t.setBounds(pinnedStackInfo.stackToken, outBounds);
} catch (RemoteException e) {
Log.e(TAG, "Failed to resize PiP on display rotation", e);
diff --git a/packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java b/packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java
index f39d1ec..e48a23f 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java
@@ -297,6 +297,13 @@
}
/**
+ * Sets a customized touch gesture that replaces the default one.
+ */
+ public void setTouchGesture(PipTouchGesture gesture) {
+ mTouchHandler.setTouchGesture(gesture);
+ }
+
+ /**
* Sets both shelf visibility and its height.
*/
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchGesture.java b/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchGesture.java
index e8e8a4d..72335db 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchGesture.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchGesture.java
@@ -24,19 +24,19 @@
/**
* Handle the touch down.
*/
- void onDown(PipTouchState touchState) {}
+ public void onDown(PipTouchState touchState) {}
/**
* Handle the touch move, and return whether the event was consumed.
*/
- boolean onMove(PipTouchState touchState) {
+ public boolean onMove(PipTouchState touchState) {
return false;
}
/**
* Handle the touch up, and return whether the gesture was consumed.
*/
- boolean onUp(PipTouchState touchState) {
+ public boolean onUp(PipTouchState touchState) {
return false;
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java b/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java
index 09f1638..65cc666 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java
@@ -126,8 +126,8 @@
// Touch state
private final PipTouchState mTouchState;
private final FlingAnimationUtils mFlingAnimationUtils;
- private final PipTouchGesture[] mGestures;
private final PipMotionHelper mMotionHelper;
+ private PipTouchGesture mGesture;
// Temp vars
private final Rect mTmpBounds = new Rect();
@@ -185,9 +185,7 @@
mSnapAlgorithm = new PipSnapAlgorithm(mContext);
mFlingAnimationUtils = new FlingAnimationUtils(context.getResources().getDisplayMetrics(),
2.5f);
- mGestures = new PipTouchGesture[] {
- mDefaultMovementGesture
- };
+ mGesture = new DefaultPipTouchGesture();
mMotionHelper = new PipMotionHelper(mContext, mActivityManager, mActivityTaskManager,
mMenuController, mSnapAlgorithm, mFlingAnimationUtils);
mTouchState = new PipTouchState(mViewConfig, mHandler,
@@ -210,6 +208,10 @@
this::onAccessibilityShowMenu, mHandler);
}
+ public void setTouchGesture(PipTouchGesture gesture) {
+ mGesture = gesture;
+ }
+
public void setTouchEnabled(boolean enabled) {
mTouchState.setAllowTouches(enabled);
}
@@ -363,17 +365,12 @@
switch (ev.getAction()) {
case MotionEvent.ACTION_DOWN: {
mMotionHelper.synchronizePinnedStackBounds();
-
- for (PipTouchGesture gesture : mGestures) {
- gesture.onDown(mTouchState);
- }
+ mGesture.onDown(mTouchState);
break;
}
case MotionEvent.ACTION_MOVE: {
- for (PipTouchGesture gesture : mGestures) {
- if (gesture.onMove(mTouchState)) {
- break;
- }
+ if (mGesture.onMove(mTouchState)) {
+ break;
}
shouldDeliverToMenu = !mTouchState.isDragging();
@@ -384,10 +381,8 @@
// dragging (ie. when the IME shows)
updateMovementBounds(mMenuState);
- for (PipTouchGesture gesture : mGestures) {
- if (gesture.onUp(mTouchState)) {
- break;
- }
+ if (mGesture.onUp(mTouchState)) {
+ break;
}
// Fall through to clean up
@@ -591,7 +586,7 @@
/**
* Gesture controlling normal movement of the PIP.
*/
- private PipTouchGesture mDefaultMovementGesture = new PipTouchGesture() {
+ private class DefaultPipTouchGesture extends PipTouchGesture {
// Whether the PiP was on the left side of the screen at the start of the gesture
private boolean mStartedOnLeft;
private final Point mStartPosition = new Point();
@@ -623,7 +618,7 @@
}
@Override
- boolean onMove(PipTouchState touchState) {
+ public boolean onMove(PipTouchState touchState) {
if (!touchState.isUserInteracting()) {
return false;
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotifCollection.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotifCollection.java
index c488c6b..86c0d85 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotifCollection.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotifCollection.java
@@ -49,6 +49,7 @@
import com.android.internal.statusbar.IStatusBarService;
import com.android.systemui.DumpController;
import com.android.systemui.Dumpable;
+import com.android.systemui.statusbar.FeatureFlags;
import com.android.systemui.statusbar.notification.collection.coalescer.CoalescedEvent;
import com.android.systemui.statusbar.notification.collection.coalescer.GroupCoalescer;
import com.android.systemui.statusbar.notification.collection.coalescer.GroupCoalescer.BatchableNotificationHandler;
@@ -98,6 +99,7 @@
@Singleton
public class NotifCollection implements Dumpable {
private final IStatusBarService mStatusBarService;
+ private final FeatureFlags mFeatureFlags;
private final Map<String, NotificationEntry> mNotificationSet = new ArrayMap<>();
private final Collection<NotificationEntry> mReadOnlyNotificationSet =
@@ -111,10 +113,14 @@
private boolean mAmDispatchingToOtherCode;
@Inject
- public NotifCollection(IStatusBarService statusBarService, DumpController dumpController) {
+ public NotifCollection(
+ IStatusBarService statusBarService,
+ DumpController dumpController,
+ FeatureFlags featureFlags) {
Assert.isMainThread();
mStatusBarService = statusBarService;
dumpController.registerDumpable(TAG, this);
+ mFeatureFlags = featureFlags;
}
/** Initializes the NotifCollection and registers it to receive notification events. */
@@ -301,9 +307,12 @@
// TODO: (b/145659174) update the sbn's overrideGroupKey in
// NotificationEntry.setRanking instead of here once we fully migrate to the
// NewNotifPipeline
- final String newOverrideGroupKey = ranking.getOverrideGroupKey();
- if (!Objects.equals(entry.getSbn().getOverrideGroupKey(), newOverrideGroupKey)) {
- entry.getSbn().setOverrideGroupKey(newOverrideGroupKey);
+ if (mFeatureFlags.isNewNotifPipelineRenderingEnabled()) {
+ final String newOverrideGroupKey = ranking.getOverrideGroupKey();
+ if (!Objects.equals(entry.getSbn().getOverrideGroupKey(),
+ newOverrideGroupKey)) {
+ entry.getSbn().setOverrideGroupKey(newOverrideGroupKey);
+ }
}
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java
index 3e3ef0c..9e64748 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java
@@ -302,14 +302,14 @@
mForceNavBarHandleOpaque = DeviceConfig.getBoolean(
DeviceConfig.NAMESPACE_SYSTEMUI,
NAV_BAR_HANDLE_FORCE_OPAQUE,
- /* defaultValue = */ false);
+ /* defaultValue = */ true);
DeviceConfig.addOnPropertiesChangedListener(DeviceConfig.NAMESPACE_SYSTEMUI, mHandler::post,
new DeviceConfig.OnPropertiesChangedListener() {
@Override
public void onPropertiesChanged(DeviceConfig.Properties properties) {
if (properties.getKeyset().contains(NAV_BAR_HANDLE_FORCE_OPAQUE)) {
mForceNavBarHandleOpaque = properties.getBoolean(
- NAV_BAR_HANDLE_FORCE_OPAQUE, /* defaultValue = */ false);
+ NAV_BAR_HANDLE_FORCE_OPAQUE, /* defaultValue = */ true);
}
}
});
diff --git a/packages/SystemUI/tests/src/com/android/systemui/pip/PipBoundsHandlerTest.java b/packages/SystemUI/tests/src/com/android/systemui/pip/PipBoundsHandlerTest.java
new file mode 100644
index 0000000..bc3ce8b
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/pip/PipBoundsHandlerTest.java
@@ -0,0 +1,240 @@
+/*
+ * 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.
+ */
+
+package com.android.systemui.pip;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.ArgumentMatchers.isNull;
+import static org.mockito.Mockito.reset;
+import static org.mockito.Mockito.verify;
+
+import android.content.ComponentName;
+import android.graphics.Rect;
+import android.testing.AndroidTestingRunner;
+import android.testing.TestableLooper;
+import android.testing.TestableResources;
+import android.view.DisplayInfo;
+import android.view.Gravity;
+import android.view.IPinnedStackController;
+
+import androidx.test.filters.SmallTest;
+
+import com.android.systemui.SysuiTestCase;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.ArgumentCaptor;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+/**
+ * Unit tests against {@link PipBoundsHandler}, including but not limited to:
+ * - default/movement bounds
+ * - save/restore PiP position on application lifecycle
+ * - save/restore PiP position on screen rotation
+ */
+@RunWith(AndroidTestingRunner.class)
+@SmallTest
+@TestableLooper.RunWithLooper(setAsMainLooper = true)
+public class PipBoundsHandlerTest extends SysuiTestCase {
+ private static final int ROUNDING_ERROR_MARGIN = 10;
+
+ private PipBoundsHandler mPipBoundsHandler;
+ private DisplayInfo mDefaultDisplayInfo;
+ private Rect mDefaultDisplayRect;
+
+ @Mock
+ private IPinnedStackController mPinnedStackController;
+
+ @Before
+ public void setUp() throws Exception {
+ mPipBoundsHandler = new PipBoundsHandler(mContext);
+ MockitoAnnotations.initMocks(this);
+ initializeMockResources();
+
+ mPipBoundsHandler.onDisplayInfoChanged(mDefaultDisplayInfo);
+ mPipBoundsHandler.setPinnedStackController(mPinnedStackController);
+ }
+
+ private void initializeMockResources() {
+ final TestableResources res = mContext.getOrCreateTestableResources();
+ res.addOverride(
+ com.android.internal.R.dimen.config_pictureInPictureDefaultAspectRatio, 1f);
+ res.addOverride(
+ com.android.internal.R.integer.config_defaultPictureInPictureGravity,
+ Gravity.END | Gravity.BOTTOM);
+ res.addOverride(
+ com.android.internal.R.dimen.default_minimal_size_pip_resizable_task, 100);
+ res.addOverride(
+ com.android.internal.R.string.config_defaultPictureInPictureScreenEdgeInsets,
+ "16x16");
+ res.addOverride(
+ com.android.internal.R.dimen.config_pictureInPictureMinAspectRatio, 0.5f);
+ res.addOverride(
+ com.android.internal.R.dimen.config_pictureInPictureMaxAspectRatio, 2f);
+
+ mDefaultDisplayInfo = new DisplayInfo();
+ mDefaultDisplayInfo.displayId = 1;
+ mDefaultDisplayInfo.logicalWidth = 1000;
+ mDefaultDisplayInfo.logicalHeight = 1500;
+ mDefaultDisplayRect = new Rect(0, 0,
+ mDefaultDisplayInfo.logicalWidth, mDefaultDisplayInfo.logicalHeight);
+ }
+
+ @Test
+ public void setShelfHeight_offsetBounds() throws Exception {
+ final ArgumentCaptor<Rect> destinationBounds = ArgumentCaptor.forClass(Rect.class);
+ final int shelfHeight = 100;
+
+ mPipBoundsHandler.onPrepareAnimation(null, 1f, null);
+
+ verify(mPinnedStackController).startAnimation(
+ destinationBounds.capture(), isNull(), anyInt());
+ final Rect lastPosition = destinationBounds.getValue();
+ // Reset the pinned stack controller since we will do another verify later on
+ reset(mPinnedStackController);
+
+ mPipBoundsHandler.setShelfHeight(true, shelfHeight);
+ mPipBoundsHandler.onPrepareAnimation(null, 1f, null);
+
+ verify(mPinnedStackController).startAnimation(
+ destinationBounds.capture(), isNull(), anyInt());
+ lastPosition.offset(0, -shelfHeight);
+ assertBoundsWithMargin("PiP bounds offset by shelf height",
+ lastPosition, destinationBounds.getValue());
+ }
+
+ @Test
+ public void onImeVisibilityChanged_offsetBounds() throws Exception {
+ final ArgumentCaptor<Rect> destinationBounds = ArgumentCaptor.forClass(Rect.class);
+ final int imeHeight = 100;
+
+ mPipBoundsHandler.onPrepareAnimation(null, 1f, null);
+
+ verify(mPinnedStackController).startAnimation(
+ destinationBounds.capture(), isNull(), anyInt());
+ final Rect lastPosition = destinationBounds.getValue();
+ // Reset the pinned stack controller since we will do another verify later on
+ reset(mPinnedStackController);
+
+ mPipBoundsHandler.onImeVisibilityChanged(true, imeHeight);
+ mPipBoundsHandler.onPrepareAnimation(null, 1f, null);
+
+ verify(mPinnedStackController).startAnimation(
+ destinationBounds.capture(), isNull(), anyInt());
+ lastPosition.offset(0, -imeHeight);
+ assertBoundsWithMargin("PiP bounds offset by IME height",
+ lastPosition, destinationBounds.getValue());
+ }
+
+ @Test
+ public void onPrepareAnimation_startAnimation() throws Exception {
+ final Rect sourceRectHint = new Rect(100, 100, 200, 200);
+ final ArgumentCaptor<Rect> destinationBounds = ArgumentCaptor.forClass(Rect.class);
+
+ mPipBoundsHandler.onPrepareAnimation(sourceRectHint, 1f, null);
+
+ verify(mPinnedStackController).startAnimation(
+ destinationBounds.capture(), eq(sourceRectHint), anyInt());
+ final Rect capturedDestinationBounds = destinationBounds.getValue();
+ assertFalse("Destination bounds is not empty",
+ capturedDestinationBounds.isEmpty());
+ assertBoundsWithMargin("Destination bounds within Display",
+ mDefaultDisplayRect, capturedDestinationBounds);
+ }
+
+ @Test
+ public void onSaveReentryBounds_restoreLastPosition() throws Exception {
+ final ComponentName componentName = new ComponentName(mContext, "component1");
+ final ArgumentCaptor<Rect> destinationBounds = ArgumentCaptor.forClass(Rect.class);
+
+ mPipBoundsHandler.onPrepareAnimation(null, 1f, null);
+
+ verify(mPinnedStackController).startAnimation(
+ destinationBounds.capture(), isNull(), anyInt());
+ final Rect lastPosition = destinationBounds.getValue();
+ lastPosition.offset(0, -100);
+ mPipBoundsHandler.onSaveReentryBounds(componentName, lastPosition);
+ // Reset the pinned stack controller since we will do another verify later on
+ reset(mPinnedStackController);
+
+ mPipBoundsHandler.onPrepareAnimation(null, 1f, null);
+
+ verify(mPinnedStackController).startAnimation(
+ destinationBounds.capture(), isNull(), anyInt());
+ assertBoundsWithMargin("Last position is restored",
+ lastPosition, destinationBounds.getValue());
+ }
+
+ @Test
+ public void onResetReentryBounds_componentMatch_useDefaultBounds() throws Exception {
+ final ComponentName componentName = new ComponentName(mContext, "component1");
+ final ArgumentCaptor<Rect> destinationBounds = ArgumentCaptor.forClass(Rect.class);
+
+ mPipBoundsHandler.onPrepareAnimation(null, 1f, null);
+
+ verify(mPinnedStackController).startAnimation(
+ destinationBounds.capture(), isNull(), anyInt());
+ final Rect defaultBounds = new Rect(destinationBounds.getValue());
+ final Rect newBounds = new Rect(defaultBounds);
+ newBounds.offset(0, -100);
+ mPipBoundsHandler.onSaveReentryBounds(componentName, newBounds);
+ // Reset the pinned stack controller since we will do another verify later on
+ reset(mPinnedStackController);
+
+ mPipBoundsHandler.onResetReentryBounds(componentName);
+ mPipBoundsHandler.onPrepareAnimation(null, 1f, null);
+
+ verify(mPinnedStackController).startAnimation(
+ destinationBounds.capture(), isNull(), anyInt());
+ final Rect actualBounds = destinationBounds.getValue();
+ assertBoundsWithMargin("Use default bounds", defaultBounds, actualBounds);
+ }
+
+ @Test
+ public void onResetReentryBounds_componentMismatch_restoreLastPosition() throws Exception {
+ final ComponentName componentName = new ComponentName(mContext, "component1");
+ final ArgumentCaptor<Rect> destinationBounds = ArgumentCaptor.forClass(Rect.class);
+
+ mPipBoundsHandler.onPrepareAnimation(null, 1f, null);
+
+ verify(mPinnedStackController).startAnimation(
+ destinationBounds.capture(), isNull(), anyInt());
+ final Rect defaultBounds = new Rect(destinationBounds.getValue());
+ final Rect newBounds = new Rect(defaultBounds);
+ newBounds.offset(0, -100);
+ mPipBoundsHandler.onSaveReentryBounds(componentName, newBounds);
+ // Reset the pinned stack controller since we will do another verify later on
+ reset(mPinnedStackController);
+
+ mPipBoundsHandler.onResetReentryBounds(new ComponentName(mContext, "component2"));
+ mPipBoundsHandler.onPrepareAnimation(null, 1f, null);
+
+ verify(mPinnedStackController).startAnimation(
+ destinationBounds.capture(), isNull(), anyInt());
+ final Rect actualBounds = destinationBounds.getValue();
+ assertBoundsWithMargin("Last position is restored", newBounds, actualBounds);
+ }
+
+ private void assertBoundsWithMargin(String msg, Rect expected, Rect actual) {
+ expected.inset(-ROUNDING_ERROR_MARGIN, -ROUNDING_ERROR_MARGIN);
+ assertTrue(msg, expected.contains(actual));
+ }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/NotifCollectionTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/NotifCollectionTest.java
index fe8d769..0251f2d 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/NotifCollectionTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/NotifCollectionTest.java
@@ -33,6 +33,7 @@
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
import static java.util.Objects.requireNonNull;
@@ -51,6 +52,7 @@
import com.android.internal.statusbar.NotificationVisibility;
import com.android.systemui.DumpController;
import com.android.systemui.SysuiTestCase;
+import com.android.systemui.statusbar.FeatureFlags;
import com.android.systemui.statusbar.RankingBuilder;
import com.android.systemui.statusbar.notification.collection.NoManSimulator.NotifEvent;
import com.android.systemui.statusbar.notification.collection.NotifCollection.CancellationReason;
@@ -86,6 +88,7 @@
@Mock private GroupCoalescer mGroupCoalescer;
@Spy private RecordingCollectionListener mCollectionListener;
@Mock private CollectionReadyForBuildListener mBuildListener;
+ @Mock private FeatureFlags mFeatureFlags;
@Spy private RecordingLifetimeExtender mExtender1 = new RecordingLifetimeExtender("Extender1");
@Spy private RecordingLifetimeExtender mExtender2 = new RecordingLifetimeExtender("Extender2");
@@ -105,7 +108,12 @@
MockitoAnnotations.initMocks(this);
Assert.sMainLooper = TestableLooper.get(this).getLooper();
- mCollection = new NotifCollection(mStatusBarService, mock(DumpController.class));
+ when(mFeatureFlags.isNewNotifPipelineRenderingEnabled()).thenReturn(true);
+ when(mFeatureFlags.isNewNotifPipelineEnabled()).thenReturn(true);
+
+ mCollection = new NotifCollection(mStatusBarService,
+ mock(DumpController.class),
+ mFeatureFlags);
mCollection.attach(mGroupCoalescer);
mCollection.addCollectionListener(mCollectionListener);
mCollection.setBuildListener(mBuildListener);
diff --git a/services/autofill/java/com/android/server/autofill/AutofillManagerServiceImpl.java b/services/autofill/java/com/android/server/autofill/AutofillManagerServiceImpl.java
index bf801fc..e28ef0f 100644
--- a/services/autofill/java/com/android/server/autofill/AutofillManagerServiceImpl.java
+++ b/services/autofill/java/com/android/server/autofill/AutofillManagerServiceImpl.java
@@ -57,6 +57,7 @@
import android.service.autofill.FillEventHistory.Event;
import android.service.autofill.FillResponse;
import android.service.autofill.IAutoFillService;
+import android.service.autofill.InlineSuggestionRenderService;
import android.service.autofill.SaveInfo;
import android.service.autofill.UserData;
import android.util.ArrayMap;
@@ -117,6 +118,7 @@
private final LocalLog mUiLatencyHistory;
private final LocalLog mWtfHistory;
private final FieldClassificationStrategy mFieldClassificationStrategy;
+ private RemoteInlineSuggestionRenderService mRemoteInlineSuggestionRenderService;
/**
* Apps disabled by the service; key is package name, value is when they will be enabled again.
@@ -212,6 +214,17 @@
sendStateToClients(/* resetClient= */ false);
}
updateRemoteAugmentedAutofillService();
+
+ final ComponentName componentName = RemoteInlineSuggestionRenderService
+ .getServiceComponentName(getContext());
+ if (componentName != null) {
+ mRemoteInlineSuggestionRenderService = new RemoteInlineSuggestionRenderService(
+ getContext(), componentName, InlineSuggestionRenderService.SERVICE_INTERFACE,
+ mUserId, new InlineSuggestionRenderCallbacksImpl(),
+ mMaster.isBindInstantServiceAllowed(), mMaster.verbose);
+ } else {
+ mRemoteInlineSuggestionRenderService = null;
+ }
return enabledChanged;
}
@@ -1542,6 +1555,21 @@
return mFieldClassificationStrategy.getDefaultAlgorithm();
}
+ RemoteInlineSuggestionRenderService getRemoteInlineSuggestionRenderService() {
+ return mRemoteInlineSuggestionRenderService;
+ }
+
+ private class InlineSuggestionRenderCallbacksImpl implements
+ RemoteInlineSuggestionRenderService.InlineSuggestionRenderCallbacks {
+
+ @Override // from InlineSuggestionRenderCallbacksImpl
+ public void onServiceDied(@NonNull RemoteInlineSuggestionRenderService service) {
+ // Don't do anything; eventually the system will bind to it again...
+ Slog.w(TAG, "remote service died: " + service);
+ mRemoteInlineSuggestionRenderService = null;
+ }
+ }
+
@Override
public String toString() {
return "AutofillManagerServiceImpl: [userId=" + mUserId
diff --git a/services/autofill/java/com/android/server/autofill/RemoteInlineSuggestionRenderService.java b/services/autofill/java/com/android/server/autofill/RemoteInlineSuggestionRenderService.java
new file mode 100644
index 0000000..f9e08e6
--- /dev/null
+++ b/services/autofill/java/com/android/server/autofill/RemoteInlineSuggestionRenderService.java
@@ -0,0 +1,135 @@
+/*
+ * 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.
+ */
+package com.android.server.autofill;
+
+import static com.android.server.autofill.Helper.sVerbose;
+
+import android.Manifest;
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
+import android.content.pm.ServiceInfo;
+import android.os.IBinder;
+import android.service.autofill.IInlineSuggestionRenderService;
+import android.service.autofill.IInlineSuggestionUiCallback;
+import android.service.autofill.InlinePresentation;
+import android.service.autofill.InlineSuggestionRenderService;
+import android.util.Slog;
+
+import com.android.internal.infra.AbstractMultiplePendingRequestsRemoteService;
+
+final class RemoteInlineSuggestionRenderService extends
+ AbstractMultiplePendingRequestsRemoteService<RemoteInlineSuggestionRenderService,
+ IInlineSuggestionRenderService> {
+
+ private static final String TAG = "RemoteInlineSuggestionRenderService";
+
+ private final int mIdleUnbindTimeoutMs = 5000;
+
+ RemoteInlineSuggestionRenderService(Context context, ComponentName componentName,
+ String serviceInterface, int userId, InlineSuggestionRenderCallbacks callback,
+ boolean bindInstantServiceAllowed, boolean verbose) {
+ super(context, serviceInterface, componentName, userId, callback,
+ context.getMainThreadHandler(),
+ bindInstantServiceAllowed ? Context.BIND_ALLOW_INSTANT : 0, verbose,
+ /* initialCapacity= */ 2);
+
+ ensureBound();
+ }
+
+ @Override // from AbstractRemoteService
+ protected IInlineSuggestionRenderService getServiceInterface(@NonNull IBinder service) {
+ return IInlineSuggestionRenderService.Stub.asInterface(service);
+ }
+
+ @Override // from AbstractRemoteService
+ protected long getTimeoutIdleBindMillis() {
+ return mIdleUnbindTimeoutMs;
+ }
+
+ @Override // from AbstractRemoteService
+ protected void handleOnConnectedStateChanged(boolean connected) {
+ if (connected && getTimeoutIdleBindMillis() != PERMANENT_BOUND_TIMEOUT_MS) {
+ scheduleUnbind();
+ }
+ super.handleOnConnectedStateChanged(connected);
+ }
+
+ public void ensureBound() {
+ scheduleBind();
+ }
+
+ /**
+ * Called by {@link Session} to generate a call to the
+ * {@link RemoteInlineSuggestionRenderService} to request rendering a slice .
+ */
+ void renderSuggestion(@NonNull IInlineSuggestionUiCallback callback,
+ @NonNull InlinePresentation presentation, int width, int height) {
+ scheduleAsyncRequest((s) -> s.renderSuggestion(callback, presentation, width, height));
+ }
+
+ @Nullable
+ private static ServiceInfo getServiceInfo(Context context) {
+ final String packageName =
+ context.getPackageManager().getServicesSystemSharedLibraryPackageName();
+ if (packageName == null) {
+ Slog.w(TAG, "no external services package!");
+ return null;
+ }
+
+ final Intent intent = new Intent(InlineSuggestionRenderService.SERVICE_INTERFACE);
+ intent.setPackage(packageName);
+ final ResolveInfo resolveInfo = context.getPackageManager().resolveService(intent,
+ PackageManager.GET_SERVICES | PackageManager.GET_META_DATA);
+ final ServiceInfo serviceInfo = resolveInfo == null ? null : resolveInfo.serviceInfo;
+ if (resolveInfo == null || serviceInfo == null) {
+ Slog.w(TAG, "No valid components found.");
+ return null;
+ }
+
+ if (!Manifest.permission.BIND_INLINE_SUGGESTION_RENDER_SERVICE
+ .equals(serviceInfo.permission)) {
+ Slog.w(TAG, serviceInfo.name + " does not require permission "
+ + Manifest.permission.BIND_INLINE_SUGGESTION_RENDER_SERVICE);
+ return null;
+ }
+
+ return serviceInfo;
+ }
+
+ @Nullable
+ public static ComponentName getServiceComponentName(Context context) {
+ final ServiceInfo serviceInfo = getServiceInfo(context);
+ if (serviceInfo == null) return null;
+
+ final ComponentName componentName = new ComponentName(serviceInfo.packageName,
+ serviceInfo.name);
+
+ if (sVerbose) Slog.v(TAG, "getServiceComponentName(): " + componentName);
+ return componentName;
+ }
+
+ interface InlineSuggestionRenderCallbacks
+ extends VultureCallback<RemoteInlineSuggestionRenderService> {
+ // NOTE: so far we don't need to notify the callback implementation
+ // (AutofillManagerServiceImpl) of the request results (success, timeouts, etc..), so this
+ // callback interface is empty.
+ }
+}
diff --git a/services/backup/java/com/android/server/backup/UserBackupManagerService.java b/services/backup/java/com/android/server/backup/UserBackupManagerService.java
index f0fa99a..e3d2dcc 100644
--- a/services/backup/java/com/android/server/backup/UserBackupManagerService.java
+++ b/services/backup/java/com/android/server/backup/UserBackupManagerService.java
@@ -186,6 +186,7 @@
return;
}
mPowerManagerWakeLock.acquire();
+ Slog.v(TAG, "Acquired wakelock:" + mPowerManagerWakeLock.getTag());
}
/** Releases the {@link PowerManager.WakeLock} if hasn't been quit. */
@@ -195,6 +196,7 @@
return;
}
mPowerManagerWakeLock.release();
+ Slog.v(TAG, "Released wakelock:" + mPowerManagerWakeLock.getTag());
}
/**
diff --git a/services/core/java/com/android/server/LocationManagerService.java b/services/core/java/com/android/server/LocationManagerService.java
index 3b6ff26..4a093cd 100644
--- a/services/core/java/com/android/server/LocationManagerService.java
+++ b/services/core/java/com/android/server/LocationManagerService.java
@@ -104,6 +104,7 @@
import com.android.server.location.MockableLocationProvider;
import com.android.server.location.PassiveProvider;
import com.android.server.location.UserInfoStore;
+import com.android.server.location.gnss.GnssManagerService;
import com.android.server.pm.permission.PermissionManagerServiceInternal;
import java.io.ByteArrayOutputStream;
diff --git a/services/core/java/com/android/server/am/ActiveServices.java b/services/core/java/com/android/server/am/ActiveServices.java
index 0a91f9a..ffeea3d 100644
--- a/services/core/java/com/android/server/am/ActiveServices.java
+++ b/services/core/java/com/android/server/am/ActiveServices.java
@@ -287,6 +287,7 @@
static final int MSG_BG_START_TIMEOUT = 1;
static final int MSG_UPDATE_FOREGROUND_APPS = 2;
+ static final int MSG_ENSURE_NOT_START_BG = 3;
ServiceMap(Looper looper, int userId) {
super(looper);
@@ -304,6 +305,11 @@
case MSG_UPDATE_FOREGROUND_APPS: {
updateForegroundApps(this);
} break;
+ case MSG_ENSURE_NOT_START_BG: {
+ synchronized (mAm) {
+ rescheduleDelayedStartsLocked();
+ }
+ } break;
}
}
@@ -311,7 +317,9 @@
if (mStartingBackground.remove(r)) {
if (DEBUG_DELAYED_STARTS) Slog.v(TAG_SERVICE,
"No longer background starting: " + r);
- rescheduleDelayedStartsLocked();
+ removeMessages(MSG_ENSURE_NOT_START_BG);
+ Message msg = obtainMessage(MSG_ENSURE_NOT_START_BG);
+ sendMessage(msg);
}
if (mDelayedStartList.remove(r)) {
if (DEBUG_DELAYED_STARTS) Slog.v(TAG_SERVICE, "No longer delaying start: " + r);
diff --git a/services/core/java/com/android/server/am/BatteryExternalStatsWorker.java b/services/core/java/com/android/server/am/BatteryExternalStatsWorker.java
index cf996a5..fa91620 100644
--- a/services/core/java/com/android/server/am/BatteryExternalStatsWorker.java
+++ b/services/core/java/com/android/server/am/BatteryExternalStatsWorker.java
@@ -567,39 +567,41 @@
final long lastRxMs = mLastInfo.getControllerRxDurationMillis();
final long lastEnergy = mLastInfo.getControllerEnergyUsedMicroJoules();
- // We will modify the last info object to be the delta, and store the new
- // WifiActivityEnergyInfo object as our last one.
- final WifiActivityEnergyInfo delta = mLastInfo;
- delta.setTimeSinceBootMillis(latest.getTimeSinceBootMillis());
- delta.setStackState(latest.getStackState());
+ final long deltaTimeSinceBootMillis = latest.getTimeSinceBootMillis();
+ final int deltaStackState = latest.getStackState();
+ final long deltaControllerTxDurationMillis;
+ final long deltaControllerRxDurationMillis;
+ final long deltaControllerScanDurationMillis;
+ final long deltaControllerIdleDurationMillis;
+ final long deltaControllerEnergyUsedMicroJoules;
final long txTimeMs = latest.getControllerTxDurationMillis() - lastTxMs;
final long rxTimeMs = latest.getControllerRxDurationMillis() - lastRxMs;
final long idleTimeMs = latest.getControllerIdleDurationMillis() - lastIdleMs;
final long scanTimeMs = latest.getControllerScanDurationMillis() - lastScanMs;
+ final boolean wasReset;
if (txTimeMs < 0 || rxTimeMs < 0 || scanTimeMs < 0 || idleTimeMs < 0) {
// The stats were reset by the WiFi system (which is why our delta is negative).
// Returns the unaltered stats. The total on time should not exceed the time
- // duartion between reports.
+ // duration between reports.
final long totalOnTimeMs = latest.getControllerTxDurationMillis()
+ latest.getControllerRxDurationMillis()
+ latest.getControllerIdleDurationMillis();
if (totalOnTimeMs <= timePeriodMs + MAX_WIFI_STATS_SAMPLE_ERROR_MILLIS) {
- delta.setControllerEnergyUsedMicroJoules(
- latest.getControllerEnergyUsedMicroJoules());
- delta.setControllerRxDurationMillis(latest.getControllerRxDurationMillis());
- delta.setControllerTxDurationMillis(latest.getControllerTxDurationMillis());
- delta.setControllerIdleDurationMillis(latest.getControllerIdleDurationMillis());
- delta.setControllerScanDurationMillis(latest.getControllerScanDurationMillis());
+ deltaControllerEnergyUsedMicroJoules = latest.getControllerEnergyUsedMicroJoules();
+ deltaControllerRxDurationMillis = latest.getControllerRxDurationMillis();
+ deltaControllerTxDurationMillis = latest.getControllerTxDurationMillis();
+ deltaControllerIdleDurationMillis = latest.getControllerIdleDurationMillis();
+ deltaControllerScanDurationMillis = latest.getControllerScanDurationMillis();
} else {
- delta.setControllerEnergyUsedMicroJoules(0);
- delta.setControllerRxDurationMillis(0);
- delta.setControllerTxDurationMillis(0);
- delta.setControllerIdleDurationMillis(0);
- delta.setControllerScanDurationMillis(0);
+ deltaControllerEnergyUsedMicroJoules = 0;
+ deltaControllerRxDurationMillis = 0;
+ deltaControllerTxDurationMillis = 0;
+ deltaControllerIdleDurationMillis = 0;
+ deltaControllerScanDurationMillis = 0;
}
- Slog.v(TAG, "WiFi energy data was reset, new WiFi energy data is " + delta);
+ wasReset = true;
} else {
final long totalActiveTimeMs = txTimeMs + rxTimeMs;
long maxExpectedIdleTimeMs;
@@ -634,21 +636,33 @@
maxExpectedIdleTimeMs = timePeriodMs - totalActiveTimeMs;
}
// These times seem to be the most reliable.
- delta.setControllerTxDurationMillis(txTimeMs);
- delta.setControllerRxDurationMillis(rxTimeMs);
- delta.setControllerScanDurationMillis(scanTimeMs);
+ deltaControllerTxDurationMillis = txTimeMs;
+ deltaControllerRxDurationMillis = rxTimeMs;
+ deltaControllerScanDurationMillis = scanTimeMs;
// WiFi calculates the idle time as a difference from the on time and the various
// Rx + Tx times. There seems to be some missing time there because this sometimes
// becomes negative. Just cap it at 0 and ensure that it is less than the expected idle
// time from the difference in timestamps.
// b/21613534
- delta.setControllerIdleDurationMillis(
- Math.min(maxExpectedIdleTimeMs, Math.max(0, idleTimeMs)));
- delta.setControllerEnergyUsedMicroJoules(
- Math.max(0, latest.getControllerEnergyUsedMicroJoules() - lastEnergy));
+ deltaControllerIdleDurationMillis =
+ Math.min(maxExpectedIdleTimeMs, Math.max(0, idleTimeMs));
+ deltaControllerEnergyUsedMicroJoules =
+ Math.max(0, latest.getControllerEnergyUsedMicroJoules() - lastEnergy);
+ wasReset = false;
}
mLastInfo = latest;
+ WifiActivityEnergyInfo delta = new WifiActivityEnergyInfo(
+ deltaTimeSinceBootMillis,
+ deltaStackState,
+ deltaControllerTxDurationMillis,
+ deltaControllerRxDurationMillis,
+ deltaControllerScanDurationMillis,
+ deltaControllerIdleDurationMillis,
+ deltaControllerEnergyUsedMicroJoules);
+ if (wasReset) {
+ Slog.v(TAG, "WiFi energy data was reset, new WiFi energy data is " + delta);
+ }
return delta;
}
}
diff --git a/services/core/java/com/android/server/am/ProcessList.java b/services/core/java/com/android/server/am/ProcessList.java
index b269c38..954be20 100644
--- a/services/core/java/com/android/server/am/ProcessList.java
+++ b/services/core/java/com/android/server/am/ProcessList.java
@@ -1551,6 +1551,45 @@
}
}
+ private int[] computeGidsForProcess(int mountExternal, int uid, int[] permGids) {
+ ArrayList<Integer> gidList = new ArrayList<>(permGids.length + 5);
+
+ final int sharedAppGid = UserHandle.getSharedAppGid(UserHandle.getAppId(uid));
+ final int cacheAppGid = UserHandle.getCacheAppGid(UserHandle.getAppId(uid));
+ final int userGid = UserHandle.getUserGid(UserHandle.getUserId(uid));
+
+ // Add shared application and profile GIDs so applications can share some
+ // resources like shared libraries and access user-wide resources
+ for (int permGid : permGids) {
+ gidList.add(permGid);
+ }
+ if (sharedAppGid != UserHandle.ERR_GID) {
+ gidList.add(sharedAppGid);
+ }
+ if (cacheAppGid != UserHandle.ERR_GID) {
+ gidList.add(cacheAppGid);
+ }
+ if (userGid != UserHandle.ERR_GID) {
+ gidList.add(userGid);
+ }
+ if (mountExternal == Zygote.MOUNT_EXTERNAL_ANDROID_WRITABLE) {
+ // For DownloadProviders and MTP: To grant access to /sdcard/Android/
+ gidList.add(Process.SDCARD_RW_GID);
+ }
+ if (mountExternal == Zygote.MOUNT_EXTERNAL_PASS_THROUGH) {
+ // For the FUSE daemon: To grant access to the lower filesystem.
+ // EmulatedVolumes: /data/media and /mnt/expand/<volume>/data/media
+ // PublicVolumes: /mnt/media_rw/<volume>
+ gidList.add(Process.MEDIA_RW_GID);
+ }
+
+ int[] gidArray = new int[gidList.size()];
+ for (int i = 0; i < gidArray.length; i++) {
+ gidArray[i] = gidList.get(i);
+ }
+ return gidArray;
+ }
+
/**
* @return {@code true} if process start is successful, false otherwise.
*/
@@ -1625,38 +1664,7 @@
}
}
- int numGids = 3;
- if (mountExternal == Zygote.MOUNT_EXTERNAL_ANDROID_WRITABLE
- || app.info.packageName.equals("com.android.externalstorage")) {
- numGids++;
- }
-
- /*
- * Add shared application and profile GIDs so applications can share some
- * resources like shared libraries and access user-wide resources
- */
- if (ArrayUtils.isEmpty(permGids)) {
- gids = new int[numGids];
- } else {
- gids = new int[permGids.length + numGids];
- System.arraycopy(permGids, 0, gids, numGids, permGids.length);
- }
- gids[0] = UserHandle.getSharedAppGid(UserHandle.getAppId(uid));
- gids[1] = UserHandle.getCacheAppGid(UserHandle.getAppId(uid));
- gids[2] = UserHandle.getUserGid(UserHandle.getUserId(uid));
-
- if (numGids > 3) {
- if (app.info.packageName.equals("com.android.externalstorage")) {
- // Allows access to 'unreliable' (USB OTG) volumes via SAF
- gids[3] = Process.MEDIA_RW_GID;
- } else if (mountExternal == Zygote.MOUNT_EXTERNAL_ANDROID_WRITABLE) {
- gids[3] = Process.SDCARD_RW_GID;
- }
- }
-
- // Replace any invalid GIDs
- if (gids[0] == UserHandle.ERR_GID) gids[0] = gids[2];
- if (gids[1] == UserHandle.ERR_GID) gids[1] = gids[2];
+ gids = computeGidsForProcess(mountExternal, uid, permGids);
}
app.mountMode = mountExternal;
checkSlow(startTime, "startProcess: building args");
diff --git a/services/core/java/com/android/server/display/BrightnessMappingStrategy.java b/services/core/java/com/android/server/display/BrightnessMappingStrategy.java
index aa39926..6ff2767 100644
--- a/services/core/java/com/android/server/display/BrightnessMappingStrategy.java
+++ b/services/core/java/com/android/server/display/BrightnessMappingStrategy.java
@@ -87,7 +87,7 @@
}
BrightnessConfiguration.Builder builder = new BrightnessConfiguration.Builder(
luxLevels, brightnessLevelsNits);
- builder.setShortTermModelTimeout(shortTermModelTimeout);
+ builder.setShortTermModelTimeoutMillis(shortTermModelTimeout);
builder.setShortTermModelLowerLuxMultiplier(SHORT_TERM_MODEL_THRESHOLD_RATIO);
builder.setShortTermModelUpperLuxMultiplier(SHORT_TERM_MODEL_THRESHOLD_RATIO);
return new PhysicalMappingStrategy(builder.build(), nitsRange, backlightRange,
@@ -739,10 +739,10 @@
@Override
public long getShortTermModelTimeout() {
- if (mConfig.getShortTermModelTimeout() >= 0) {
- return mConfig.getShortTermModelTimeout();
+ if (mConfig.getShortTermModelTimeoutMillis() >= 0) {
+ return mConfig.getShortTermModelTimeoutMillis();
} else {
- return mDefaultConfig.getShortTermModelTimeout();
+ return mDefaultConfig.getShortTermModelTimeoutMillis();
}
}
diff --git a/services/core/java/com/android/server/GnssManagerService.java b/services/core/java/com/android/server/location/gnss/GnssManagerService.java
similarity index 97%
rename from services/core/java/com/android/server/GnssManagerService.java
rename to services/core/java/com/android/server/location/gnss/GnssManagerService.java
index 32cdc41..1eb2c52 100644
--- a/services/core/java/com/android/server/GnssManagerService.java
+++ b/services/core/java/com/android/server/location/gnss/GnssManagerService.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2019 The Android Open Source Project
+ * 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.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.server;
+package com.android.server.location.gnss;
import android.Manifest;
import android.annotation.NonNull;
@@ -45,6 +45,9 @@
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.util.DumpUtils;
import com.android.internal.util.IndentingPrintWriter;
+import com.android.server.FgThread;
+import com.android.server.LocationManagerService;
+import com.android.server.LocationManagerServiceUtils;
import com.android.server.LocationManagerServiceUtils.LinkedListener;
import com.android.server.LocationManagerServiceUtils.LinkedListenerBase;
import com.android.server.location.CallerIdentity;
@@ -322,7 +325,7 @@
synchronized (mGnssBatchingLock) {
mGnssBatchingCallback = callback;
mGnssBatchingDeathCallback =
- new LocationManagerServiceUtils.LinkedListener<>(
+ new LinkedListener<>(
callback,
"BatchedLocationCallback",
callerIdentity,
@@ -757,7 +760,10 @@
}
}
- protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
+ /**
+ * Dump for debugging.
+ */
+ public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
if (!DumpUtils.checkDumpPermission(mContext, TAG, pw)) return;
IndentingPrintWriter ipw = new IndentingPrintWriter(pw, " ");
@@ -776,7 +782,7 @@
mGnssMeasurementsListeners
.values()) {
ipw.println(listener + ": " + mLocationManagerService.isThrottlingExemptLocked(
- listener.mCallerIdentity));
+ listener.getCallerIdentity()));
}
}
ipw.decreaseIndent();
@@ -787,7 +793,7 @@
for (LinkedListenerBase listener :
mGnssNavigationMessageListeners.values()) {
ipw.println(listener + ": " + mLocationManagerService.isThrottlingExemptLocked(
- listener.mCallerIdentity));
+ listener.getCallerIdentity()));
}
}
ipw.decreaseIndent();
@@ -798,7 +804,7 @@
for (LinkedListenerBase listener :
mGnssStatusListeners.values()) {
ipw.println(listener + ": " + mLocationManagerService.isThrottlingExemptLocked(
- listener.mCallerIdentity));
+ listener.getCallerIdentity()));
}
}
ipw.decreaseIndent();
diff --git a/services/core/java/com/android/server/pm/PackageInstallerSession.java b/services/core/java/com/android/server/pm/PackageInstallerSession.java
index a223326..43ed25f 100644
--- a/services/core/java/com/android/server/pm/PackageInstallerSession.java
+++ b/services/core/java/com/android/server/pm/PackageInstallerSession.java
@@ -75,11 +75,13 @@
import android.content.pm.PackageInstaller.SessionInfo.StagedSessionErrorCode;
import android.content.pm.PackageInstaller.SessionParams;
import android.content.pm.PackageManager;
+import android.content.pm.PackageManagerInternal;
import android.content.pm.PackageParser;
import android.content.pm.PackageParser.ApkLite;
import android.content.pm.PackageParser.PackageLite;
import android.content.pm.PackageParser.PackageParserException;
import android.content.pm.dex.DexMetadataHelper;
+import android.content.pm.parsing.AndroidPackage;
import android.content.pm.parsing.ApkLiteParseUtils;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
@@ -101,6 +103,7 @@
import android.os.incremental.IncrementalFileStorages;
import android.os.incremental.IncrementalManager;
import android.os.storage.StorageManager;
+import android.provider.Settings.Secure;
import android.stats.devicepolicy.DevicePolicyEnums;
import android.system.ErrnoException;
import android.system.Int64Ref;
@@ -154,6 +157,7 @@
private static final int MSG_COMMIT = 1;
private static final int MSG_ON_PACKAGE_INSTALLED = 2;
private static final int MSG_SEAL = 3;
+ private static final int MSG_STREAM_AND_VALIDATE = 4;
/** XML constants used for persisting a session */
static final String TAG_SESSION = "session";
@@ -369,6 +373,8 @@
@GuardedBy("mLock")
private boolean mVerityFound;
+ private boolean mDataLoaderFinished = false;
+
// TODO(b/146080380): merge file list with Callback installation.
private IncrementalFileStorages mIncrementalFileStorages;
@@ -412,6 +418,9 @@
case MSG_SEAL:
handleSeal((IntentSender) msg.obj);
break;
+ case MSG_STREAM_AND_VALIDATE:
+ handleStreamAndValidate();
+ break;
case MSG_COMMIT:
handleCommit();
break;
@@ -1019,11 +1028,7 @@
}
private void handleSeal(@NonNull IntentSender statusReceiver) {
- // TODO(b/136132412): update with new APIs
- if (mIncrementalFileStorages != null) {
- mIncrementalFileStorages.startLoading();
- }
- if (!markAsCommitted(statusReceiver)) {
+ if (!markAsSealed(statusReceiver)) {
return;
}
if (isMultiPackage()) {
@@ -1031,19 +1036,50 @@
final IntentSender childIntentSender =
new ChildStatusIntentReceiver(remainingSessions, statusReceiver)
.getIntentSender();
- boolean commitFailed = false;
+ boolean sealFailed = false;
+ for (int i = mChildSessionIds.size() - 1; i >= 0; --i) {
+ final int childSessionId = mChildSessionIds.keyAt(i);
+ // seal all children, regardless if any of them fail; we'll throw/return
+ // as appropriate once all children have been processed
+ if (!mSessionProvider.getSession(childSessionId)
+ .markAsSealed(childIntentSender)) {
+ sealFailed = true;
+ }
+ }
+ if (sealFailed) {
+ return;
+ }
+ }
+
+ dispatchStreamAndValidate();
+ }
+
+ private void dispatchStreamAndValidate() {
+ mHandler.obtainMessage(MSG_STREAM_AND_VALIDATE).sendToTarget();
+ }
+
+ private void handleStreamAndValidate() {
+ // TODO(b/136132412): update with new APIs
+ if (mIncrementalFileStorages != null) {
+ mIncrementalFileStorages.startLoading();
+ }
+
+ boolean commitFailed = !markAsCommitted();
+
+ if (isMultiPackage()) {
for (int i = mChildSessionIds.size() - 1; i >= 0; --i) {
final int childSessionId = mChildSessionIds.keyAt(i);
// commit all children, regardless if any of them fail; we'll throw/return
// as appropriate once all children have been processed
if (!mSessionProvider.getSession(childSessionId)
- .markAsCommitted(childIntentSender)) {
+ .markAsCommitted()) {
commitFailed = true;
}
}
- if (commitFailed) {
- return;
- }
+ }
+
+ if (commitFailed) {
+ return;
}
mHandler.obtainMessage(MSG_COMMIT).sendToTarget();
@@ -1141,6 +1177,28 @@
}
}
+ /**
+ * Returns whether or not a package can be installed while Secure FRP is enabled.
+ * <p>
+ * Only callers with the INSTALL_PACKAGES permission are allowed to install. However,
+ * prevent the package installer from installing anything because, while it has the
+ * permission, it will allows packages to be installed from anywhere.
+ */
+ private static boolean isSecureFrpInstallAllowed(Context context, int callingUid) {
+ final PackageManagerInternal pmi = LocalServices.getService(PackageManagerInternal.class);
+ final String[] systemInstaller = pmi.getKnownPackageNames(
+ PackageManagerInternal.PACKAGE_INSTALLER, UserHandle.USER_SYSTEM);
+ final AndroidPackage callingInstaller = pmi.getPackage(callingUid);
+ if (callingInstaller != null
+ && ArrayUtils.contains(systemInstaller, callingInstaller.getPackageName())) {
+ // don't allow the system package installer to install while under secure FRP
+ return false;
+ }
+
+ // require caller to hold the INSTALL_PACKAGES permission
+ return context.checkCallingOrSelfPermission(Manifest.permission.INSTALL_PACKAGES)
+ == PackageManager.PERMISSION_GRANTED;
+ }
/**
* Sanity checks to make sure it's ok to commit the session.
@@ -1151,13 +1209,15 @@
assertPreparedAndNotDestroyedLocked("commit");
assertNoWriteFileTransfersOpenLocked();
- final boolean enforceInstallPackages = forTransfer
- || (android.provider.Settings.Secure.getInt(mContext.getContentResolver(),
- android.provider.Settings.Secure.SECURE_FRP_MODE, 0) == 1);
- if (enforceInstallPackages) {
- mContext.enforceCallingOrSelfPermission(Manifest.permission.INSTALL_PACKAGES, null);
+ final boolean isSecureFrpEnabled =
+ (Secure.getInt(mContext.getContentResolver(), Secure.SECURE_FRP_MODE, 0) == 1);
+ if (isSecureFrpEnabled
+ && !isSecureFrpInstallAllowed(mContext, Binder.getCallingUid())) {
+ throw new SecurityException("Can't install packages while in secure FRP");
}
+
if (forTransfer) {
+ mContext.enforceCallingOrSelfPermission(Manifest.permission.INSTALL_PACKAGES, null);
if (mInstallerUid == mOriginalInstallerUid) {
throw new IllegalArgumentException("Session has not been transferred");
}
@@ -1170,44 +1230,48 @@
}
/**
- * Do everything but actually commit the session. If this was not already called, the session
- * will be sealed and marked as committed. The caller of this method is responsible for
- * subsequently submitting this session for processing.
+ * If this was not already called, the session will be sealed.
*
* This method may be called multiple times to update the status receiver validate caller
* permissions.
*/
- private boolean markAsCommitted(@NonNull IntentSender statusReceiver) {
+ private boolean markAsSealed(@NonNull IntentSender statusReceiver) {
Objects.requireNonNull(statusReceiver);
List<PackageInstallerSession> childSessions = getChildSessions();
- final boolean wasSealed;
synchronized (mLock) {
mRemoteStatusReceiver = statusReceiver;
- // After validations and updating the observer, we can skip re-sealing, etc. because we
- // have already marked ourselves as committed.
+ // After updating the observer, we can skip re-sealing.
+ if (mSealed) {
+ return true;
+ }
+
+ try {
+ sealLocked(childSessions);
+ } catch (PackageManagerException e) {
+ return false;
+ }
+ }
+
+ // Persist the fact that we've sealed ourselves to prevent
+ // mutations of any hard links we create. We do this without holding
+ // the session lock, since otherwise it's a lock inversion.
+ mCallback.onSessionSealedBlocking(this);
+
+ return true;
+ }
+
+ private boolean markAsCommitted() {
+ synchronized (mLock) {
+ Objects.requireNonNull(mRemoteStatusReceiver);
+
if (mCommitted) {
return true;
}
- wasSealed = mSealed;
- try {
- if (!mSealed) {
- sealLocked(childSessions);
- }
-
- try {
- streamAndValidateLocked();
- } catch (StreamingException e) {
- // In case of streaming failure we don't want to fail or commit the session.
- // Just return from this method and allow caller to commit again.
- PackageInstallerService.sendPendingStreaming(mContext, mRemoteStatusReceiver,
- sessionId, e);
- return false;
- }
- } catch (PackageManagerException e) {
+ if (!streamAndValidateLocked()) {
return false;
}
@@ -1222,12 +1286,6 @@
mCommitted = true;
}
- if (!wasSealed) {
- // Persist the fact that we've sealed ourselves to prevent
- // mutations of any hard links we create. We do this without holding
- // the session lock, since otherwise it's a lock inversion.
- mCallback.onSessionSealedBlocking(this);
- }
return true;
}
@@ -1295,17 +1353,6 @@
}
/**
- * Convenience wrapper, see {@link #sealLocked(List<PackageInstallerSession>) seal} and
- * {@link #streamAndValidateLocked()}.
- */
- @GuardedBy("mLock")
- private void sealAndValidateLocked(List<PackageInstallerSession> childSessions)
- throws PackageManagerException, StreamingException {
- sealLocked(childSessions);
- streamAndValidateLocked();
- }
-
- /**
* Seal the session to prevent further modification.
*
* <p>The session will be sealed after calling this method even if it failed.
@@ -1338,23 +1385,23 @@
* Prepare DataLoader and stream content for DataLoader sessions.
* Validate the contents of all session.
*
- * @throws StreamingException if streaming failed.
- * @throws PackageManagerException if validation failed.
+ * @return false if validation failed.
*/
@GuardedBy("mLock")
- private void streamAndValidateLocked()
- throws PackageManagerException, StreamingException {
+ private boolean streamAndValidateLocked() {
try {
// Read transfers from the original owner stay open, but as the session's data cannot
// be modified anymore, there is no leak of information. For staged sessions, further
// validation is performed by the staging manager.
if (!params.isMultiPackage) {
+ if (!prepareDataLoaderLocked()) {
+ return false;
+ }
+
final PackageInfo pkgInfo = mPm.getPackageInfo(
params.appPackageName, PackageManager.GET_SIGNATURES
| PackageManager.MATCH_STATIC_SHARED_LIBRARIES /*flags*/, userId);
- prepareDataLoader();
-
if (isApexInstallation()) {
validateApexInstallLocked();
} else {
@@ -1365,15 +1412,16 @@
if (params.isStaged) {
mStagingManager.checkNonOverlappingWithStagedSessions(this);
}
+
+ return true;
} catch (PackageManagerException e) {
- throw onSessionVerificationFailure(e);
- } catch (StreamingException e) {
- throw e;
+ onSessionVerificationFailure(e);
} catch (Throwable e) {
// Convert all exceptions into package manager exceptions as only those are handled
// in the code above.
- throw onSessionVerificationFailure(new PackageManagerException(e));
+ onSessionVerificationFailure(new PackageManagerException(e));
}
+ return false;
}
private PackageManagerException onSessionVerificationFailure(PackageManagerException e) {
@@ -2145,8 +2193,12 @@
}
String getInstallerPackageName() {
+ return getInstallSource().installerPackageName;
+ }
+
+ InstallSource getInstallSource() {
synchronized (mLock) {
- return mInstallSource.installerPackageName;
+ return mInstallSource;
}
}
@@ -2387,6 +2439,7 @@
synchronized (mLock) {
assertCallerIsOwnerOrRootLocked();
assertPreparedAndNotSealedLocked("addFile");
+
mFiles.add(FileInfo.added(location, name, lengthBytes, metadata, signature));
}
}
@@ -2409,48 +2462,30 @@
}
}
- static class Notificator {
- private int mValue = 0;
-
- void setValue(int value) {
- synchronized (this) {
- mValue = value;
- this.notify();
- }
- }
- int waitForValue() {
- synchronized (this) {
- while (mValue == 0) {
- try {
- this.wait();
- } catch (InterruptedException e) {
- // Happens if someone interrupts your thread.
- }
- }
- return mValue;
- }
- }
- }
-
/**
* Makes sure files are present in staging location.
*/
- private void prepareDataLoader()
- throws PackageManagerException, StreamingException {
+ @GuardedBy("mLock")
+ private boolean prepareDataLoaderLocked()
+ throws PackageManagerException {
if (!isDataLoaderInstallation()) {
- return;
+ return true;
+ }
+ if (mDataLoaderFinished) {
+ return true;
}
- List<InstallationFile> addedFiles = mFiles.stream().filter(
+ final List<InstallationFile> addedFiles = mFiles.stream().filter(
file -> sAddedFilter.accept(new File(file.name))).map(
file -> new InstallationFile(
- file.name, file.lengthBytes, file.metadata)).collect(
+ file.name, file.lengthBytes, file.metadata)).collect(
Collectors.toList());
- List<String> removedFiles = mFiles.stream().filter(
+ final List<String> removedFiles = mFiles.stream().filter(
file -> sRemovedFilter.accept(new File(file.name))).map(
file -> file.name.substring(
- 0, file.name.length() - REMOVE_MARKER_EXTENSION.length())).collect(
+ 0, file.name.length() - REMOVE_MARKER_EXTENSION.length())).collect(
Collectors.toList());
+
if (mIncrementalFileStorages != null) {
for (InstallationFile file : addedFiles) {
try {
@@ -2461,46 +2496,73 @@
"Failed to add and configure Incremental File: " + file.getName(), ex);
}
}
- return;
+ return true;
}
- final FileSystemConnector connector = new FileSystemConnector(addedFiles);
-
- DataLoaderManager dataLoaderManager = mContext.getSystemService(DataLoaderManager.class);
+ final DataLoaderManager dataLoaderManager = mContext.getSystemService(
+ DataLoaderManager.class);
if (dataLoaderManager == null) {
throw new PackageManagerException(INSTALL_FAILED_MEDIA_UNAVAILABLE,
"Failed to find data loader manager service");
}
- // TODO(b/146080380): make this code async.
- final Notificator created = new Notificator();
- final Notificator started = new Notificator();
- final Notificator imageReady = new Notificator();
-
IDataLoaderStatusListener listener = new IDataLoaderStatusListener.Stub() {
@Override
public void onStatusChanged(int dataLoaderId, int status) {
- switch (status) {
- case IDataLoaderStatusListener.DATA_LOADER_CREATED: {
- created.setValue(1);
- break;
+ try {
+ if (status == IDataLoaderStatusListener.DATA_LOADER_DESTROYED) {
+ return;
}
- case IDataLoaderStatusListener.DATA_LOADER_STARTED: {
- started.setValue(1);
- break;
+
+ IDataLoader dataLoader = dataLoaderManager.getDataLoader(dataLoaderId);
+ if (dataLoader == null) {
+ mDataLoaderFinished = true;
+ onSessionVerificationFailure(
+ new PackageManagerException(INSTALL_FAILED_MEDIA_UNAVAILABLE,
+ "Failure to obtain data loader"));
+ return;
}
- case IDataLoaderStatusListener.DATA_LOADER_IMAGE_READY: {
- imageReady.setValue(1);
- break;
+
+ switch (status) {
+ case IDataLoaderStatusListener.DATA_LOADER_CREATED: {
+ dataLoader.start();
+ break;
+ }
+ case IDataLoaderStatusListener.DATA_LOADER_STARTED: {
+ dataLoader.prepareImage(addedFiles, removedFiles);
+ break;
+ }
+ case IDataLoaderStatusListener.DATA_LOADER_IMAGE_READY: {
+ mDataLoaderFinished = true;
+ if (hasParentSessionId()) {
+ mSessionProvider.getSession(
+ mParentSessionId).dispatchStreamAndValidate();
+ } else {
+ dispatchStreamAndValidate();
+ }
+ dataLoader.destroy();
+ break;
+ }
+ case IDataLoaderStatusListener.DATA_LOADER_IMAGE_NOT_READY: {
+ mDataLoaderFinished = true;
+ onSessionVerificationFailure(
+ new PackageManagerException(INSTALL_FAILED_MEDIA_UNAVAILABLE,
+ "Failed to prepare image."));
+ dataLoader.destroy();
+ break;
+ }
}
- case IDataLoaderStatusListener.DATA_LOADER_IMAGE_NOT_READY: {
- imageReady.setValue(2);
- break;
- }
+ } catch (RemoteException e) {
+ // In case of streaming failure we don't want to fail or commit the session.
+ // Just return from this method and allow caller to commit again.
+ PackageInstallerService.sendPendingStreaming(mContext,
+ mRemoteStatusReceiver,
+ sessionId, new StreamingException(e));
}
}
};
+ final FileSystemConnector connector = new FileSystemConnector(addedFiles);
final FileSystemControlParcel control = new FileSystemControlParcel();
control.callback = connector;
@@ -2515,28 +2577,8 @@
throw new PackageManagerException(INSTALL_FAILED_MEDIA_UNAVAILABLE,
"Failed to initialize data loader");
}
- created.waitForValue();
- IDataLoader dataLoader = dataLoaderManager.getDataLoader(sessionId);
- if (dataLoader == null) {
- throw new PackageManagerException(INSTALL_FAILED_MEDIA_UNAVAILABLE,
- "Failure to obtain data loader");
- }
-
- try {
- dataLoader.start();
- started.waitForValue();
-
- dataLoader.prepareImage(addedFiles, removedFiles);
- if (imageReady.waitForValue() == 2) {
- throw new PackageManagerException(INSTALL_FAILED_MEDIA_UNAVAILABLE,
- "Failed to prepare image.");
- }
-
- dataLoader.destroy();
- } catch (RemoteException e) {
- throw new StreamingException(e);
- }
+ return false;
}
@Override
diff --git a/services/core/java/com/android/server/pm/PackageManagerShellCommandDataLoader.java b/services/core/java/com/android/server/pm/PackageManagerShellCommandDataLoader.java
index 281c44a..5dca9e1 100644
--- a/services/core/java/com/android/server/pm/PackageManagerShellCommandDataLoader.java
+++ b/services/core/java/com/android/server/pm/PackageManagerShellCommandDataLoader.java
@@ -152,6 +152,7 @@
}
return true;
} catch (IOException e) {
+ Slog.e(TAG, "Exception while streaming files", e);
return false;
}
}
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java
index da0d820..7c76656 100644
--- a/services/core/java/com/android/server/policy/PhoneWindowManager.java
+++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java
@@ -3075,7 +3075,7 @@
event.getAction(), fallbackAction.keyCode,
event.getRepeatCount(), fallbackAction.metaState,
event.getDeviceId(), event.getScanCode(),
- flags, event.getSource(), event.getDisplayId(), null);
+ flags, event.getSource(), event.getDisplayId(), null /* hmac */, null);
if (!interceptFallback(focusedToken, fallbackEvent, policyFlags)) {
fallbackEvent.recycle();
diff --git a/services/core/java/com/android/server/stats/pull/ProcfsMemoryUtil.java b/services/core/java/com/android/server/stats/pull/ProcfsMemoryUtil.java
index 638dfd2..67677c6 100644
--- a/services/core/java/com/android/server/stats/pull/ProcfsMemoryUtil.java
+++ b/services/core/java/com/android/server/stats/pull/ProcfsMemoryUtil.java
@@ -19,8 +19,7 @@
import android.annotation.Nullable;
import android.os.Process;
-
-import java.util.function.BiConsumer;
+import android.util.SparseArray;
public final class ProcfsMemoryUtil {
private static final int[] CMDLINE_OUT = new int[] { PROC_OUT_STRING };
@@ -71,19 +70,25 @@
return cmdline[0];
}
- public static void forEachPid(BiConsumer<Integer, String> func) {
+ /**
+ * Scans all /proc/pid/cmdline entries and returns a mapping between pid and cmdline.
+ */
+ public static SparseArray<String> getProcessCmdlines() {
int[] pids = new int[1024];
pids = Process.getPids("/proc", pids);
+
+ SparseArray<String> cmdlines = new SparseArray<>(pids.length);
for (int pid : pids) {
if (pid < 0) {
- return;
+ break;
}
String cmdline = readCmdlineFromProcfs(pid);
if (cmdline.isEmpty()) {
continue;
}
- func.accept(pid, cmdline);
+ cmdlines.append(pid, cmdline);
}
+ return cmdlines;
}
public static final class MemorySnapshot {
diff --git a/services/core/java/com/android/server/stats/pull/StatsPullAtomService.java b/services/core/java/com/android/server/stats/pull/StatsPullAtomService.java
index 39d1a51..3aa51fb 100644
--- a/services/core/java/com/android/server/stats/pull/StatsPullAtomService.java
+++ b/services/core/java/com/android/server/stats/pull/StatsPullAtomService.java
@@ -27,7 +27,7 @@
import static com.android.server.am.MemoryStatUtil.readMemoryStatFromFilesystem;
import static com.android.server.stats.pull.IonMemoryUtil.readProcessSystemIonHeapSizesFromDebugfs;
import static com.android.server.stats.pull.IonMemoryUtil.readSystemIonHeapSizeFromDebugfs;
-import static com.android.server.stats.pull.ProcfsMemoryUtil.forEachPid;
+import static com.android.server.stats.pull.ProcfsMemoryUtil.getProcessCmdlines;
import static com.android.server.stats.pull.ProcfsMemoryUtil.readCmdlineFromProcfs;
import static com.android.server.stats.pull.ProcfsMemoryUtil.readMemorySnapshotFromProcfs;
@@ -93,6 +93,7 @@
import android.util.ArraySet;
import android.util.Log;
import android.util.Slog;
+import android.util.SparseArray;
import android.util.StatsEvent;
import android.util.StatsLog;
import android.util.proto.ProtoOutputStream;
@@ -130,8 +131,6 @@
import com.android.server.storage.DiskStatsFileLogger;
import com.android.server.storage.DiskStatsLoggingService;
-import com.google.android.collect.Sets;
-
import libcore.io.IoUtils;
import org.json.JSONArray;
@@ -165,11 +164,24 @@
private static final String TAG = "StatsPullAtomService";
private static final boolean DEBUG = true;
+ /**
+ * Lowest available uid for apps.
+ *
+ * <p>Used to quickly discard memory snapshots of the zygote forks from native process
+ * measurements.
+ */
+ private static final int MIN_APP_UID = 10_000;
+
private static final String RESULT_RECEIVER_CONTROLLER_KEY = "controller_activity";
/**
* How long to wait on an individual subsystem to return its stats.
*/
private static final long EXTERNAL_STATS_SYNC_TIMEOUT_MILLIS = 2000;
+ private static final long NS_PER_SEC = 1000000000;
+ private static final long MILLI_AMP_HR_TO_NANO_AMP_SECS = 1_000_000L * 3600L;
+
+ private static final int MAX_BATTERY_STATS_HELPER_FREQUENCY_MS = 1000;
+ private static final int CPU_TIME_PER_THREAD_FREQ_MAX_NUM_FREQUENCIES = 8;
private final Object mNetworkStatsLock = new Object();
@GuardedBy("mNetworkStatsLock")
@@ -191,40 +203,222 @@
@GuardedBy("mProcessStatsLock")
private IProcessStats mProcessStatsService;
+ private final Object mCpuTrackerLock = new Object();
+ @GuardedBy("mCpuTrackerLock")
+ private ProcessCpuTracker mProcessCpuTracker;
+
+ private final Object mDebugElapsedClockLock = new Object();
+ @GuardedBy("mDebugElapsedClockLock")
+ private long mDebugElapsedClockPreviousValue = 0;
+ @GuardedBy("mDebugElapsedClockLock")
+ private long mDebugElapsedClockPullCount = 0;
+
+ private final Object mDebugFailingElapsedClockLock = new Object();
+ @GuardedBy("mDebugFailingElapsedClockLock")
+ private long mDebugFailingElapsedClockPreviousValue = 0;
+ @GuardedBy("mDebugFailingElapsedClockLock")
+ private long mDebugFailingElapsedClockPullCount = 0;
+
private final Context mContext;
private StatsManager mStatsManager;
private StorageManager mStorageManager;
+ private WifiManager mWifiManager;
+ private TelephonyManager mTelephony;
+
+ private KernelWakelockReader mKernelWakelockReader;
+ private KernelWakelockStats mTmpWakelockStats;
+
+ private StoragedUidIoStatsReader mStoragedUidIoStatsReader;
+
+ private KernelCpuSpeedReader[] mKernelCpuSpeedReaders;
+ // Disables throttler on CPU time readers.
+ private KernelCpuUidUserSysTimeReader mCpuUidUserSysTimeReader;
+ private KernelCpuUidFreqTimeReader mCpuUidFreqTimeReader;
+ private KernelCpuUidActiveTimeReader mCpuUidActiveTimeReader;
+ private KernelCpuUidClusterTimeReader mCpuUidClusterTimeReader;
+
+ private File mBaseDir;
+
+ @Nullable
+ private KernelCpuThreadReaderDiff mKernelCpuThreadReader;
+
+ private BatteryStatsHelper mBatteryStatsHelper = null;
+ private long mBatteryStatsHelperTimestampMs = -MAX_BATTERY_STATS_HELPER_FREQUENCY_MS;
+
+ private StatsPullAtomCallbackImpl mStatsCallbackImpl;
public StatsPullAtomService(Context context) {
super(context);
mContext = context;
}
+ /**
+ * Use of this StatsPullAtomCallbackImpl means we avoid one class per tagId, which we would
+ * get if we used lambdas.
+ *
+ * The pull methods are intentionally left to be package private to avoid the creation
+ * of synthetic methods to save unnecessary bytecode.
+ */
+ private class StatsPullAtomCallbackImpl implements StatsManager.StatsPullAtomCallback {
+ @Override
+ public int onPullAtom(int atomTag, List<StatsEvent> data) {
+ switch(atomTag) {
+ case StatsLog.WIFI_BYTES_TRANSFER:
+ return pullWifiBytesTransfer(atomTag, data);
+ case StatsLog.WIFI_BYTES_TRANSFER_BY_FG_BG:
+ return pullWifiBytesTransferBackground(atomTag, data);
+ case StatsLog.MOBILE_BYTES_TRANSFER:
+ return pullMobileBytesTransfer(atomTag, data);
+ case StatsLog.MOBILE_BYTES_TRANSFER_BY_FG_BG:
+ return pullMobileBytesTransferBackground(atomTag, data);
+ case StatsLog.BLUETOOTH_BYTES_TRANSFER:
+ return pullBluetoothBytesTransfer(atomTag, data);
+ case StatsLog.KERNEL_WAKELOCK:
+ return pullKernelWakelock(atomTag, data);
+ case StatsLog.CPU_TIME_PER_FREQ:
+ return pullCpuTimePerFreq(atomTag, data);
+ case StatsLog.CPU_TIME_PER_UID:
+ return pullCpuTimePerUid(atomTag, data);
+ case StatsLog.CPU_TIME_PER_UID_FREQ:
+ return pullCpuTimeperUidFreq(atomTag, data);
+ case StatsLog.CPU_ACTIVE_TIME:
+ return pullCpuActiveTime(atomTag, data);
+ case StatsLog.CPU_CLUSTER_TIME:
+ return pullCpuClusterTime(atomTag, data);
+ case StatsLog.WIFI_ACTIVITY_INFO:
+ return pullWifiActivityInfo(atomTag, data);
+ case StatsLog.MODEM_ACTIVITY_INFO:
+ return pullModemActivityInfo(atomTag, data);
+ case StatsLog.BLUETOOTH_ACTIVITY_INFO:
+ return pullBluetoothActivityInfo(atomTag, data);
+ case StatsLog.SYSTEM_ELAPSED_REALTIME:
+ return pullSystemElapsedRealtime(atomTag, data);
+ case StatsLog.SYSTEM_UPTIME:
+ return pullSystemUptime(atomTag, data);
+ case StatsLog.PROCESS_MEMORY_STATE:
+ return pullProcessMemoryState(atomTag, data);
+ case StatsLog.PROCESS_MEMORY_HIGH_WATER_MARK:
+ return pullProcessMemoryHighWaterMark(atomTag, data);
+ case StatsLog.PROCESS_MEMORY_SNAPSHOT:
+ return pullProcessMemorySnapshot(atomTag, data);
+ case StatsLog.SYSTEM_ION_HEAP_SIZE:
+ return pullSystemIonHeapSize(atomTag, data);
+ case StatsLog.ION_HEAP_SIZE:
+ return pullIonHeapSize(atomTag, data);
+ case StatsLog.PROCESS_SYSTEM_ION_HEAP_SIZE:
+ return pullProcessSystemIonHeapSize(atomTag, data);
+ case StatsLog.TEMPERATURE:
+ return pullTemperature(atomTag, data);
+ case StatsLog.COOLING_DEVICE:
+ return pullCooldownDevice(atomTag, data);
+ case StatsLog.BINDER_CALLS:
+ return pullBinderCallsStats(atomTag, data);
+ case StatsLog.BINDER_CALLS_EXCEPTIONS:
+ return pullBinderCallsStatsExceptions(atomTag, data);
+ case StatsLog.LOOPER_STATS:
+ return pullLooperStats(atomTag, data);
+ case StatsLog.DISK_STATS:
+ return pullDiskStats(atomTag, data);
+ case StatsLog.DIRECTORY_USAGE:
+ return pullDirectoryUsage(atomTag, data);
+ case StatsLog.APP_SIZE:
+ return pullAppSize(atomTag, data);
+ case StatsLog.CATEGORY_SIZE:
+ return pullCategorySize(atomTag, data);
+ case StatsLog.NUM_FINGERPRINTS_ENROLLED:
+ return pullNumBiometricsEnrolled(
+ BiometricsProtoEnums.MODALITY_FINGERPRINT, atomTag, data);
+ case StatsLog.NUM_FACES_ENROLLED:
+ return pullNumBiometricsEnrolled(
+ BiometricsProtoEnums.MODALITY_FACE, atomTag, data);
+ case StatsLog.PROC_STATS:
+ return pullProcStats(ProcessStats.REPORT_ALL, atomTag, data);
+ case StatsLog.PROC_STATS_PKG_PROC:
+ return pullProcStats(ProcessStats.REPORT_PKG_PROC_STATS, atomTag, data);
+ case StatsLog.DISK_IO:
+ return pullDiskIO(atomTag, data);
+ case StatsLog.POWER_PROFILE:
+ return pullPowerProfile(atomTag, data);
+ case StatsLog.PROCESS_CPU_TIME:
+ return pullProcessCpuTime(atomTag, data);
+ case StatsLog.CPU_TIME_PER_THREAD_FREQ:
+ return pullCpuTimePerThreadFreq(atomTag, data);
+ case StatsLog.DEVICE_CALCULATED_POWER_USE:
+ return pullDeviceCalculatedPowerUse(atomTag, data);
+ case StatsLog.DEVICE_CALCULATED_POWER_BLAME_UID:
+ return pullDeviceCalculatedPowerBlameUid(atomTag, data);
+ case StatsLog.DEVICE_CALCULATED_POWER_BLAME_OTHER:
+ return pullDeviceCalculatedPowerBlameOther(atomTag, data);
+ case StatsLog.DEBUG_ELAPSED_CLOCK:
+ return pullDebugElapsedClock(atomTag, data);
+ case StatsLog.DEBUG_FAILING_ELAPSED_CLOCK:
+ return pullDebugFailingElapsedClock(atomTag, data);
+ case StatsLog.BUILD_INFORMATION:
+ return pullBuildInformation(atomTag, data);
+ case StatsLog.ROLE_HOLDER:
+ return pullRoleHolder(atomTag, data);
+ case StatsLog.DANGEROUS_PERMISSION_STATE:
+ return pullDangerousPermissionState(atomTag, data);
+ case StatsLog.TIME_ZONE_DATA_INFO:
+ return pullTimeZoneDataInfo(atomTag, data);
+ case StatsLog.EXTERNAL_STORAGE_INFO:
+ return pullExternalStorageInfo(atomTag, data);
+ case StatsLog.APPS_ON_EXTERNAL_STORAGE_INFO:
+ return pullAppsOnExternalStorageInfo(atomTag, data);
+ case StatsLog.FACE_SETTINGS:
+ return pullFaceSettings(atomTag, data);
+ case StatsLog.APP_OPS:
+ return pullAppOps(atomTag, data);
+ case StatsLog.NOTIFICATION_REMOTE_VIEWS:
+ return pullNotificationRemoteViews(atomTag, data);
+ case StatsLog.DANGEROUS_PERMISSION_STATE_SAMPLED:
+ return pullDangerousPermissionState(atomTag, data);
+ default:
+ throw new UnsupportedOperationException("Unknown tagId=" + atomTag);
+ }
+ }
+ }
+
@Override
public void onStart() {
+ // no op
+ }
+
+ @Override
+ public void onBootPhase(int phase) {
+ super.onBootPhase(phase);
+ if (phase == PHASE_SYSTEM_SERVICES_READY) {
+ BackgroundThread.getHandler().post(() -> {
+ initializePullersState();
+ registerAllPullers();
+ registerEventListeners();
+ });
+ }
+ }
+
+ void initializePullersState() {
+ // Get Context Managers
mStatsManager = (StatsManager) mContext.getSystemService(Context.STATS_MANAGER);
mWifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE);
mTelephony = (TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE);
mStorageManager = (StorageManager) mContext.getSystemService(StorageManager.class);
- final ConnectivityManager connectivityManager =
- (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE);
- // Default NetworkRequest should cover all transport types.
- final NetworkRequest request = new NetworkRequest.Builder().build();
- connectivityManager.registerNetworkCallback(request, new ConnectivityStatsCallback());
+ // Initialize DiskIO
+ mStoragedUidIoStatsReader = new StoragedUidIoStatsReader();
- // Enable push notifications of throttling from vendor thermal
- // management subsystem via thermalservice.
- IThermalService thermalService = getIThermalService();
- if (thermalService != null) {
- try {
- thermalService.registerThermalEventListener(
- new ThermalEventListener());
- Slog.i(TAG, "register thermal listener successfully");
- } catch (RemoteException e) {
- Slog.i(TAG, "failed to register thermal listener");
- }
- }
+ // Initialize PROC_STATS
+ // TODO (b/148402814): Change this directory to stats_pull.
+ mBaseDir = new File(SystemServiceManager.ensureSystemDir(), "stats_companion");
+
+ // Disables throttler on CPU time readers.
+ mCpuUidUserSysTimeReader = new KernelCpuUidUserSysTimeReader(false);
+ mCpuUidFreqTimeReader = new KernelCpuUidFreqTimeReader(false);
+ mCpuUidActiveTimeReader = new KernelCpuUidActiveTimeReader(false);
+ mCpuUidClusterTimeReader = new KernelCpuUidClusterTimeReader(false);
+
+ // Initialize state for KERNEL_WAKELOCK
+ mKernelWakelockReader = new KernelWakelockReader();
+ mTmpWakelockStats = new KernelWakelockStats();
// Initialize state for CPU_TIME_PER_FREQ atom
PowerProfile powerProfile = new PowerProfile(mContext);
@@ -246,13 +440,23 @@
mBaseDir.mkdirs();
}
- @Override
- public void onBootPhase(int phase) {
- super.onBootPhase(phase);
- if (phase == PHASE_SYSTEM_SERVICES_READY) {
- BackgroundThread.getHandler().post(() -> {
- registerAllPullers();
- });
+ void registerEventListeners() {
+ final ConnectivityManager connectivityManager =
+ (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE);
+ // Default NetworkRequest should cover all transport types.
+ final NetworkRequest request = new NetworkRequest.Builder().build();
+ connectivityManager.registerNetworkCallback(request, new ConnectivityStatsCallback());
+
+ // Enable push notifications of throttling from vendor thermal
+ // management subsystem via thermalservice.
+ IThermalService thermalService = getIThermalService();
+ if (thermalService != null) {
+ try {
+ thermalService.registerThermalEventListener(new ThermalEventListener());
+ Slog.i(TAG, "register thermal listener successfully");
+ } catch (RemoteException e) {
+ Slog.i(TAG, "failed to register thermal listener");
+ }
}
}
@@ -260,6 +464,7 @@
if (DEBUG) {
Slog.d(TAG, "Registering all pullers with statsd");
}
+ mStatsCallbackImpl = new StatsPullAtomCallbackImpl();
registerWifiBytesTransfer();
registerWifiBytesTransferBackground();
registerMobileBytesTransfer();
@@ -276,11 +481,6 @@
registerBluetoothActivityInfo();
registerSystemElapsedRealtime();
registerSystemUptime();
- registerRemainingBatteryCapacity();
- registerFullBatteryCapacity();
- registerBatteryVoltage();
- registerBatteryLevel();
- registerBatteryCycleCount();
registerProcessMemoryState();
registerProcessMemoryHighWaterMark();
registerProcessMemorySnapshot();
@@ -441,11 +641,11 @@
tagId,
metadata,
BackgroundThread.getExecutor(),
- (atomTag, data) -> pullWifiBytesTransfer(atomTag, data)
+ mStatsCallbackImpl
);
}
- private int pullWifiBytesTransfer(int atomTag, List<StatsEvent> pulledData) {
+ int pullWifiBytesTransfer(int atomTag, List<StatsEvent> pulledData) {
INetworkStatsService networkStatsService = getINetworkStatsService();
if (networkStatsService == null) {
Slog.e(TAG, "NetworkStats Service is not available!");
@@ -453,7 +653,7 @@
}
long token = Binder.clearCallingIdentity();
try {
- // TODO: Consider caching the following call to get BatteryStatsInternal.
+ // TODO(b/148402814): Consider caching the following call to get BatteryStatsInternal.
BatteryStatsInternal bs = LocalServices.getService(BatteryStatsInternal.class);
String[] ifaces = bs.getWifiIfaces();
if (ifaces.length == 0) {
@@ -533,11 +733,11 @@
tagId,
metadata,
BackgroundThread.getExecutor(),
- (atomTag, data) -> pullWifiBytesTransferBackground(atomTag, data)
+ mStatsCallbackImpl
);
}
- private int pullWifiBytesTransferBackground(int atomTag, List<StatsEvent> pulledData) {
+ int pullWifiBytesTransferBackground(int atomTag, List<StatsEvent> pulledData) {
INetworkStatsService networkStatsService = getINetworkStatsService();
if (networkStatsService == null) {
Slog.e(TAG, "NetworkStats Service is not available!");
@@ -571,11 +771,11 @@
tagId,
metadata,
BackgroundThread.getExecutor(),
- (atomTag, data) -> pullMobileBytesTransfer(atomTag, data)
+ mStatsCallbackImpl
);
}
- private int pullMobileBytesTransfer(int atomTag, List<StatsEvent> pulledData) {
+ int pullMobileBytesTransfer(int atomTag, List<StatsEvent> pulledData) {
INetworkStatsService networkStatsService = getINetworkStatsService();
if (networkStatsService == null) {
Slog.e(TAG, "NetworkStats Service is not available!");
@@ -609,11 +809,11 @@
tagId,
metadata,
BackgroundThread.getExecutor(),
- (atomTag, data) -> pullMobileBytesTransferBackground(atomTag, data)
+ mStatsCallbackImpl
);
}
- private int pullMobileBytesTransferBackground(int atomTag, List<StatsEvent> pulledData) {
+ int pullMobileBytesTransferBackground(int atomTag, List<StatsEvent> pulledData) {
INetworkStatsService networkStatsService = getINetworkStatsService();
if (networkStatsService == null) {
Slog.e(TAG, "NetworkStats Service is not available!");
@@ -647,7 +847,7 @@
tagId,
metadata,
BackgroundThread.getExecutor(),
- (atomTag, data) -> pullBluetoothBytesTransfer(atomTag, data)
+ mStatsCallbackImpl
);
}
@@ -694,7 +894,7 @@
}
}
- private int pullBluetoothBytesTransfer(int atomTag, List<StatsEvent> pulledData) {
+ int pullBluetoothBytesTransfer(int atomTag, List<StatsEvent> pulledData) {
BluetoothActivityEnergyInfo info = fetchBluetoothData();
if (info == null || info.getUidTraffic() == null) {
return StatsManager.PULL_SKIP;
@@ -711,20 +911,17 @@
return StatsManager.PULL_SUCCESS;
}
- private final KernelWakelockReader mKernelWakelockReader = new KernelWakelockReader();
- private final KernelWakelockStats mTmpWakelockStats = new KernelWakelockStats();
-
private void registerKernelWakelock() {
int tagId = StatsLog.KERNEL_WAKELOCK;
mStatsManager.registerPullAtomCallback(
tagId,
/* PullAtomMetadata */ null,
BackgroundThread.getExecutor(),
- (atomTag, data) -> pullKernelWakelock(atomTag, data)
+ mStatsCallbackImpl
);
}
- private int pullKernelWakelock(int atomTag, List<StatsEvent> pulledData) {
+ int pullKernelWakelock(int atomTag, List<StatsEvent> pulledData) {
final KernelWakelockStats wakelockStats =
mKernelWakelockReader.readKernelWakelockStats(mTmpWakelockStats);
for (Map.Entry<String, KernelWakelockStats.Entry> ent : wakelockStats.entrySet()) {
@@ -742,17 +939,6 @@
return StatsManager.PULL_SUCCESS;
}
- private KernelCpuSpeedReader[] mKernelCpuSpeedReaders;
- // Disables throttler on CPU time readers.
- private KernelCpuUidUserSysTimeReader mCpuUidUserSysTimeReader =
- new KernelCpuUidUserSysTimeReader(false);
- private KernelCpuUidFreqTimeReader mCpuUidFreqTimeReader =
- new KernelCpuUidFreqTimeReader(false);
- private KernelCpuUidActiveTimeReader mCpuUidActiveTimeReader =
- new KernelCpuUidActiveTimeReader(false);
- private KernelCpuUidClusterTimeReader mCpuUidClusterTimeReader =
- new KernelCpuUidClusterTimeReader(false);
-
private void registerCpuTimePerFreq() {
int tagId = StatsLog.CPU_TIME_PER_FREQ;
PullAtomMetadata metadata = new PullAtomMetadata.Builder()
@@ -762,11 +948,11 @@
tagId,
metadata,
BackgroundThread.getExecutor(),
- (atomTag, data) -> pullCpuTimePerFreq(atomTag, data)
+ mStatsCallbackImpl
);
}
- private int pullCpuTimePerFreq(int atomTag, List<StatsEvent> pulledData) {
+ int pullCpuTimePerFreq(int atomTag, List<StatsEvent> pulledData) {
for (int cluster = 0; cluster < mKernelCpuSpeedReaders.length; cluster++) {
long[] clusterTimeMs = mKernelCpuSpeedReaders[cluster].readAbsolute();
if (clusterTimeMs != null) {
@@ -793,11 +979,11 @@
tagId,
metadata,
BackgroundThread.getExecutor(),
- (atomTag, data) -> pullCpuTimePerUid(atomTag, data)
+ mStatsCallbackImpl
);
}
- private int pullCpuTimePerUid(int atomTag, List<StatsEvent> pulledData) {
+ int pullCpuTimePerUid(int atomTag, List<StatsEvent> pulledData) {
mCpuUidUserSysTimeReader.readAbsolute((uid, timesUs) -> {
long userTimeUs = timesUs[0], systemTimeUs = timesUs[1];
StatsEvent e = StatsEvent.newBuilder()
@@ -822,11 +1008,11 @@
tagId,
metadata,
BackgroundThread.getExecutor(),
- (atomTag, data) -> pullCpuTimeperUidFreq(atomTag, data)
+ mStatsCallbackImpl
);
}
- private int pullCpuTimeperUidFreq(int atomTag, List<StatsEvent> pulledData) {
+ int pullCpuTimeperUidFreq(int atomTag, List<StatsEvent> pulledData) {
mCpuUidFreqTimeReader.readAbsolute((uid, cpuFreqTimeMs) -> {
for (int freqIndex = 0; freqIndex < cpuFreqTimeMs.length; ++freqIndex) {
if (cpuFreqTimeMs[freqIndex] != 0) {
@@ -854,11 +1040,11 @@
tagId,
metadata,
BackgroundThread.getExecutor(),
- (atomTag, data) -> pullCpuActiveTime(atomTag, data)
+ mStatsCallbackImpl
);
}
- private int pullCpuActiveTime(int atomTag, List<StatsEvent> pulledData) {
+ int pullCpuActiveTime(int atomTag, List<StatsEvent> pulledData) {
mCpuUidActiveTimeReader.readAbsolute((uid, cpuActiveTimesMs) -> {
StatsEvent e = StatsEvent.newBuilder()
.setAtomId(atomTag)
@@ -881,11 +1067,11 @@
tagId,
metadata,
BackgroundThread.getExecutor(),
- (atomTag, data) -> pullCpuClusterTime(atomTag, data)
+ mStatsCallbackImpl
);
}
- private int pullCpuClusterTime(int atomTag, List<StatsEvent> pulledData) {
+ int pullCpuClusterTime(int atomTag, List<StatsEvent> pulledData) {
mCpuUidClusterTimeReader.readAbsolute((uid, cpuClusterTimesMs) -> {
for (int i = 0; i < cpuClusterTimesMs.length; i++) {
StatsEvent e = StatsEvent.newBuilder()
@@ -905,15 +1091,12 @@
mStatsManager.registerPullAtomCallback(
tagId,
null, // use default PullAtomMetadata values
- (atomTag, data) -> pullWifiActivityInfo(atomTag, data),
- BackgroundThread.getExecutor()
+ BackgroundThread.getExecutor(),
+ mStatsCallbackImpl
);
}
- private WifiManager mWifiManager;
- private TelephonyManager mTelephony;
-
- private int pullWifiActivityInfo(int atomTag, List<StatsEvent> pulledData) {
+ int pullWifiActivityInfo(int atomTag, List<StatsEvent> pulledData) {
long token = Binder.clearCallingIdentity();
try {
SynchronousResultReceiver wifiReceiver = new SynchronousResultReceiver("wifi");
@@ -960,12 +1143,12 @@
mStatsManager.registerPullAtomCallback(
tagId,
null, // use default PullAtomMetadata values
- (atomTag, data) -> pullModemActivityInfo(atomTag, data),
- BackgroundThread.getExecutor()
+ BackgroundThread.getExecutor(),
+ mStatsCallbackImpl
);
}
- private int pullModemActivityInfo(int atomTag, List<StatsEvent> pulledData) {
+ int pullModemActivityInfo(int atomTag, List<StatsEvent> pulledData) {
long token = Binder.clearCallingIdentity();
try {
SynchronousResultReceiver modemReceiver = new SynchronousResultReceiver("telephony");
@@ -999,11 +1182,11 @@
tagId,
/* metadata */ null,
BackgroundThread.getExecutor(),
- (atomTag, data) -> pullBluetoothActivityInfo(atomTag, data)
+ mStatsCallbackImpl
);
}
- private int pullBluetoothActivityInfo(int atomTag, List<StatsEvent> pulledData) {
+ int pullBluetoothActivityInfo(int atomTag, List<StatsEvent> pulledData) {
BluetoothActivityEnergyInfo info = fetchBluetoothData();
if (info == null) {
return StatsManager.PULL_SKIP;
@@ -1021,23 +1204,21 @@
return StatsManager.PULL_SUCCESS;
}
- private static final long NS_PER_SEC = 1000000000;
-
private void registerSystemElapsedRealtime() {
int tagId = StatsLog.SYSTEM_ELAPSED_REALTIME;
- PullAtomMetadata metadata = PullAtomMetadata.newBuilder()
+ PullAtomMetadata metadata = new PullAtomMetadata.Builder()
.setCoolDownNs(NS_PER_SEC)
.setTimeoutNs(NS_PER_SEC / 2)
.build();
mStatsManager.registerPullAtomCallback(
tagId,
metadata,
- (atomTag, data) -> pullSystemElapsedRealtime(atomTag, data),
- BackgroundThread.getExecutor()
+ BackgroundThread.getExecutor(),
+ mStatsCallbackImpl
);
}
- private int pullSystemElapsedRealtime(int atomTag, List<StatsEvent> pulledData) {
+ int pullSystemElapsedRealtime(int atomTag, List<StatsEvent> pulledData) {
StatsEvent e = StatsEvent.newBuilder()
.setAtomId(atomTag)
.writeLong(SystemClock.elapsedRealtime())
@@ -1052,11 +1233,11 @@
tagId,
null, // use default PullAtomMetadata values
BackgroundThread.getExecutor(),
- (atomTag, data) -> pullSystemUptime(atomTag, data)
+ mStatsCallbackImpl
);
}
- private int pullSystemUptime(int atomTag, List<StatsEvent> pulledData) {
+ int pullSystemUptime(int atomTag, List<StatsEvent> pulledData) {
StatsEvent e = StatsEvent.newBuilder()
.setAtomId(atomTag)
.writeLong(SystemClock.elapsedRealtime())
@@ -1065,60 +1246,20 @@
return StatsManager.PULL_SUCCESS;
}
- private void registerRemainingBatteryCapacity() {
- // No op.
- }
-
- private void pullRemainingBatteryCapacity() {
- // No op.
- }
-
- private void registerFullBatteryCapacity() {
- // No op.
- }
-
- private void pullFullBatteryCapacity() {
- // No op.
- }
-
- private void registerBatteryVoltage() {
- // No op.
- }
-
- private void pullBatteryVoltage() {
- // No op.
- }
-
- private void registerBatteryLevel() {
- // No op.
- }
-
- private void pullBatteryLevel() {
- // No op.
- }
-
- private void registerBatteryCycleCount() {
- // No op.
- }
-
- private void pullBatteryCycleCount() {
- // No op.
- }
-
private void registerProcessMemoryState() {
int tagId = StatsLog.PROCESS_MEMORY_STATE;
- PullAtomMetadata metadata = PullAtomMetadata.newBuilder()
+ PullAtomMetadata metadata = new PullAtomMetadata.Builder()
.setAdditiveFields(new int[] {4, 5, 6, 7, 8})
.build();
mStatsManager.registerPullAtomCallback(
tagId,
metadata,
- (atomTag, data) -> pullProcessMemoryState(atomTag, data),
- BackgroundThread.getExecutor()
+ BackgroundThread.getExecutor(),
+ mStatsCallbackImpl
);
}
- private int pullProcessMemoryState(int atomTag, List<StatsEvent> pulledData) {
+ int pullProcessMemoryState(int atomTag, List<StatsEvent> pulledData) {
List<ProcessMemoryState> processMemoryStates =
LocalServices.getService(ActivityManagerInternal.class)
.getMemoryStateForProcesses();
@@ -1147,45 +1288,6 @@
return StatsManager.PULL_SUCCESS;
}
- /**
- * Which native processes to snapshot memory for.
- *
- * <p>Processes are matched by their cmdline in procfs. Example: cat /proc/pid/cmdline returns
- * /system/bin/statsd for the stats daemon.
- */
- private static final Set<String> MEMORY_INTERESTING_NATIVE_PROCESSES = Sets.newHashSet(
- "/system/bin/statsd", // Stats daemon.
- "/system/bin/surfaceflinger",
- "/system/bin/apexd", // APEX daemon.
- "/system/bin/audioserver",
- "/system/bin/cameraserver",
- "/system/bin/drmserver",
- "/system/bin/healthd",
- "/system/bin/incidentd",
- "/system/bin/installd",
- "/system/bin/lmkd", // Low memory killer daemon.
- "/system/bin/logd",
- "media.codec",
- "media.extractor",
- "media.metrics",
- "/system/bin/mediadrmserver",
- "/system/bin/mediaserver",
- "/system/bin/performanced",
- "/system/bin/tombstoned",
- "/system/bin/traced", // Perfetto.
- "/system/bin/traced_probes", // Perfetto.
- "webview_zygote",
- "zygote",
- "zygote64");
-
- /**
- * Lowest available uid for apps.
- *
- * <p>Used to quickly discard memory snapshots of the zygote forks from native process
- * measurements.
- */
- private static final int MIN_APP_UID = 10_000;
-
private static boolean isAppUid(int uid) {
return uid >= MIN_APP_UID;
}
@@ -1195,12 +1297,12 @@
mStatsManager.registerPullAtomCallback(
tagId,
null, // use default PullAtomMetadata values
- (atomTag, data) -> pullProcessMemoryHighWaterMark(atomTag, data),
- BackgroundThread.getExecutor()
+ BackgroundThread.getExecutor(),
+ mStatsCallbackImpl
);
}
- private int pullProcessMemoryHighWaterMark(int atomTag, List<StatsEvent> pulledData) {
+ int pullProcessMemoryHighWaterMark(int atomTag, List<StatsEvent> pulledData) {
List<ProcessMemoryState> managedProcessList =
LocalServices.getService(ActivityManagerInternal.class)
.getMemoryStateForProcesses();
@@ -1219,30 +1321,25 @@
.build();
pulledData.add(e);
}
- forEachPid((pid, cmdLine) -> {
- if (!MEMORY_INTERESTING_NATIVE_PROCESSES.contains(cmdLine)) {
- return;
- }
- final MemorySnapshot snapshot = readMemorySnapshotFromProcfs(pid);
- if (snapshot == null) {
- return;
- }
- // Sometimes we get here a process that is not included in the whitelist. It comes
- // from forking the zygote for an app. We can ignore that sample because this process
- // is collected by ProcessMemoryState.
- if (isAppUid(snapshot.uid)) {
- return;
+ // Complement the data with native system processes
+ SparseArray<String> processCmdlines = getProcessCmdlines();
+ managedProcessList.forEach(managedProcess -> processCmdlines.delete(managedProcess.pid));
+ int size = processCmdlines.size();
+ for (int i = 0; i < size; ++i) {
+ final MemorySnapshot snapshot = readMemorySnapshotFromProcfs(processCmdlines.keyAt(i));
+ if (snapshot == null || isAppUid(snapshot.uid)) {
+ continue;
}
StatsEvent e = StatsEvent.newBuilder()
.setAtomId(atomTag)
.writeInt(snapshot.uid)
- .writeString(cmdLine)
+ .writeString(processCmdlines.valueAt(i))
// RSS high-water mark in bytes.
.writeLong(snapshot.rssHighWaterMarkInKilobytes * 1024L)
.writeInt(snapshot.rssHighWaterMarkInKilobytes)
.build();
pulledData.add(e);
- });
+ }
// Invoke rss_hwm_reset binary to reset RSS HWM counters for all processes.
SystemProperties.set("sys.rss_hwm_reset.on", "1");
return StatsManager.PULL_SUCCESS;
@@ -1253,12 +1350,12 @@
mStatsManager.registerPullAtomCallback(
tagId,
null, // use default PullAtomMetadata values
- (atomTag, data) -> pullProcessMemorySnapshot(atomTag, data),
- BackgroundThread.getExecutor()
+ BackgroundThread.getExecutor(),
+ mStatsCallbackImpl
);
}
- private int pullProcessMemorySnapshot(int atomTag, List<StatsEvent> pulledData) {
+ int pullProcessMemorySnapshot(int atomTag, List<StatsEvent> pulledData) {
List<ProcessMemoryState> managedProcessList =
LocalServices.getService(ActivityManagerInternal.class)
.getMemoryStateForProcesses();
@@ -1268,6 +1365,7 @@
continue;
}
StatsEvent e = StatsEvent.newBuilder()
+ .setAtomId(atomTag)
.writeInt(managedProcess.uid)
.writeString(managedProcess.processName)
.writeInt(managedProcess.pid)
@@ -1279,24 +1377,22 @@
.build();
pulledData.add(e);
}
- forEachPid((pid, cmdLine) -> {
- if (!MEMORY_INTERESTING_NATIVE_PROCESSES.contains(cmdLine)) {
- return;
- }
+ // Complement the data with native system processes. Given these measurements can be taken
+ // in response to LMKs happening, we want to first collect the managed app stats (to
+ // maximize the probability that a heavyweight process will be sampled before it dies).
+ SparseArray<String> processCmdlines = getProcessCmdlines();
+ managedProcessList.forEach(managedProcess -> processCmdlines.delete(managedProcess.pid));
+ int size = processCmdlines.size();
+ for (int i = 0; i < size; ++i) {
+ int pid = processCmdlines.keyAt(i);
final MemorySnapshot snapshot = readMemorySnapshotFromProcfs(pid);
- if (snapshot == null) {
- return;
- }
- // Sometimes we get here a process that is not included in the whitelist. It comes
- // from forking the zygote for an app. We can ignore that sample because this process
- // is collected by ProcessMemoryState.
- if (isAppUid(snapshot.uid)) {
- return;
+ if (snapshot == null || isAppUid(snapshot.uid)) {
+ continue;
}
StatsEvent e = StatsEvent.newBuilder()
.setAtomId(atomTag)
.writeInt(snapshot.uid)
- .writeString(cmdLine)
+ .writeString(processCmdlines.valueAt(i))
.writeInt(pid)
.writeInt(-1001) // Placeholder for native processes, OOM_SCORE_ADJ_MIN - 1.
.writeInt(snapshot.rssInKilobytes)
@@ -1305,7 +1401,7 @@
.writeInt(snapshot.anonRssInKilobytes + snapshot.swapInKilobytes)
.build();
pulledData.add(e);
- });
+ }
return StatsManager.PULL_SUCCESS;
}
@@ -1314,12 +1410,12 @@
mStatsManager.registerPullAtomCallback(
tagId,
null, // use default PullAtomMetadata values
- (atomTag, data) -> pullSystemIonHeapSize(atomTag, data),
- BackgroundThread.getExecutor()
+ BackgroundThread.getExecutor(),
+ mStatsCallbackImpl
);
}
- private int pullSystemIonHeapSize(int atomTag, List<StatsEvent> pulledData) {
+ int pullSystemIonHeapSize(int atomTag, List<StatsEvent> pulledData) {
final long systemIonHeapSizeInBytes = readSystemIonHeapSizeFromDebugfs();
StatsEvent e = StatsEvent.newBuilder()
.setAtomId(atomTag)
@@ -1335,11 +1431,11 @@
tagId,
/* PullAtomMetadata */ null,
BackgroundThread.getExecutor(),
- (atomTag, data) -> pullIonHeapSize(atomTag, data)
+ mStatsCallbackImpl
);
}
- private int pullIonHeapSize(int atomTag, List<StatsEvent> pulledData) {
+ int pullIonHeapSize(int atomTag, List<StatsEvent> pulledData) {
int ionHeapSizeInKilobytes = (int) getIonHeapsSizeKb();
StatsEvent e = StatsEvent.newBuilder()
.setAtomId(atomTag)
@@ -1354,12 +1450,12 @@
mStatsManager.registerPullAtomCallback(
tagId,
null, // use default PullAtomMetadata values
- (atomTag, data) -> pullProcessSystemIonHeapSize(atomTag, data),
- BackgroundThread.getExecutor()
+ BackgroundThread.getExecutor(),
+ mStatsCallbackImpl
);
}
- private int pullProcessSystemIonHeapSize(int atomTag, List<StatsEvent> pulledData) {
+ int pullProcessSystemIonHeapSize(int atomTag, List<StatsEvent> pulledData) {
List<IonAllocations> result = readProcessSystemIonHeapSizesFromDebugfs();
for (IonAllocations allocations : result) {
StatsEvent e = StatsEvent.newBuilder()
@@ -1380,12 +1476,12 @@
mStatsManager.registerPullAtomCallback(
tagId,
null, // use default PullAtomMetadata values
- (atomTag, data) -> pullTemperature(atomTag, data),
- BackgroundThread.getExecutor()
+ BackgroundThread.getExecutor(),
+ mStatsCallbackImpl
);
}
- private int pullTemperature(int atomTag, List<StatsEvent> pulledData) {
+ int pullTemperature(int atomTag, List<StatsEvent> pulledData) {
IThermalService thermalService = getIThermalService();
if (thermalService == null) {
return StatsManager.PULL_SKIP;
@@ -1418,12 +1514,12 @@
mStatsManager.registerPullAtomCallback(
tagId,
null, // use default PullAtomMetadata values
- (atomTag, data) -> pullCooldownDevice(atomTag, data),
- BackgroundThread.getExecutor()
+ BackgroundThread.getExecutor(),
+ mStatsCallbackImpl
);
}
- private int pullCooldownDevice(int atomTag, List<StatsEvent> pulledData) {
+ int pullCooldownDevice(int atomTag, List<StatsEvent> pulledData) {
IThermalService thermalService = getIThermalService();
if (thermalService == null) {
return StatsManager.PULL_SKIP;
@@ -1452,18 +1548,18 @@
private void registerBinderCallsStats() {
int tagId = StatsLog.BINDER_CALLS;
- PullAtomMetadata metadata = PullAtomMetadata.newBuilder()
+ PullAtomMetadata metadata = new PullAtomMetadata.Builder()
.setAdditiveFields(new int[] {4, 5, 6, 8, 12})
.build();
mStatsManager.registerPullAtomCallback(
tagId,
metadata,
- (atomTag, data) -> pullBinderCallsStats(atomTag, data),
- BackgroundThread.getExecutor()
+ BackgroundThread.getExecutor(),
+ mStatsCallbackImpl
);
}
- private int pullBinderCallsStats(int atomTag, List<StatsEvent> pulledData) {
+ int pullBinderCallsStats(int atomTag, List<StatsEvent> pulledData) {
BinderCallsStatsService.Internal binderStats =
LocalServices.getService(BinderCallsStatsService.Internal.class);
if (binderStats == null) {
@@ -1501,12 +1597,12 @@
mStatsManager.registerPullAtomCallback(
tagId,
null, // use default PullAtomMetadata values
- (atomTag, data) -> pullBinderCallsStatsExceptions(atomTag, data),
- BackgroundThread.getExecutor()
+ BackgroundThread.getExecutor(),
+ mStatsCallbackImpl
);
}
- private int pullBinderCallsStatsExceptions(int atomTag, List<StatsEvent> pulledData) {
+ int pullBinderCallsStatsExceptions(int atomTag, List<StatsEvent> pulledData) {
BinderCallsStatsService.Internal binderStats =
LocalServices.getService(BinderCallsStatsService.Internal.class);
if (binderStats == null) {
@@ -1530,18 +1626,18 @@
private void registerLooperStats() {
int tagId = StatsLog.LOOPER_STATS;
- PullAtomMetadata metadata = PullAtomMetadata.newBuilder()
+ PullAtomMetadata metadata = new PullAtomMetadata.Builder()
.setAdditiveFields(new int[] {5, 6, 7, 8, 9})
.build();
mStatsManager.registerPullAtomCallback(
tagId,
metadata,
- (atomTag, data) -> pullLooperStats(atomTag, data),
- BackgroundThread.getExecutor()
+ BackgroundThread.getExecutor(),
+ mStatsCallbackImpl
);
}
- private int pullLooperStats(int atomTag, List<StatsEvent> pulledData) {
+ int pullLooperStats(int atomTag, List<StatsEvent> pulledData) {
LooperStats looperStats = LocalServices.getService(LooperStats.class);
if (looperStats == null) {
return StatsManager.PULL_SKIP;
@@ -1578,12 +1674,12 @@
mStatsManager.registerPullAtomCallback(
tagId,
null, // use default PullAtomMetadata values
- (atomTag, data) -> pullDiskStats(atomTag, data),
- BackgroundThread.getExecutor()
+ BackgroundThread.getExecutor(),
+ mStatsCallbackImpl
);
}
- private int pullDiskStats(int atomTag, List<StatsEvent> pulledData) {
+ int pullDiskStats(int atomTag, List<StatsEvent> pulledData) {
// Run a quick-and-dirty performance test: write 512 bytes
byte[] junk = new byte[512];
for (int i = 0; i < junk.length; i++) junk[i] = (byte) i; // Write nonzero bytes
@@ -1644,12 +1740,12 @@
mStatsManager.registerPullAtomCallback(
tagId,
null, // use default PullAtomMetadata values
- (atomTag, data) -> pullDirectoryUsage(atomTag, data),
- BackgroundThread.getExecutor()
+ BackgroundThread.getExecutor(),
+ mStatsCallbackImpl
);
}
- private int pullDirectoryUsage(int atomTag, List<StatsEvent> pulledData) {
+ int pullDirectoryUsage(int atomTag, List<StatsEvent> pulledData) {
StatFs statFsData = new StatFs(Environment.getDataDirectory().getAbsolutePath());
StatFs statFsSystem = new StatFs(Environment.getRootDirectory().getAbsolutePath());
StatFs statFsCache = new StatFs(Environment.getDownloadCacheDirectory().getAbsolutePath());
@@ -1685,12 +1781,12 @@
mStatsManager.registerPullAtomCallback(
tagId,
null, // use default PullAtomMetadata values
- (atomTag, data) -> pullAppSize(atomTag, data),
- BackgroundThread.getExecutor()
+ BackgroundThread.getExecutor(),
+ mStatsCallbackImpl
);
}
- private int pullAppSize(int atomTag, List<StatsEvent> pulledData) {
+ int pullAppSize(int atomTag, List<StatsEvent> pulledData) {
try {
String jsonStr = IoUtils.readFileAsString(DiskStatsLoggingService.DUMPSYS_CACHE_PATH);
JSONObject json = new JSONObject(jsonStr);
@@ -1729,12 +1825,12 @@
mStatsManager.registerPullAtomCallback(
tagId,
null, // use default PullAtomMetadata values
- (atomTag, data) -> pullCategorySize(atomTag, data),
- BackgroundThread.getExecutor()
+ BackgroundThread.getExecutor(),
+ mStatsCallbackImpl
);
}
- private int pullCategorySize(int atomTag, List<StatsEvent> pulledData) {
+ int pullCategorySize(int atomTag, List<StatsEvent> pulledData) {
try {
String jsonStr = IoUtils.readFileAsString(DiskStatsLoggingService.DUMPSYS_CACHE_PATH);
JSONObject json = new JSONObject(jsonStr);
@@ -1832,9 +1928,8 @@
mStatsManager.registerPullAtomCallback(
tagId,
null, // use default PullAtomMetadata values
- (atomTag, data) -> pullNumBiometricsEnrolled(
- BiometricsProtoEnums.MODALITY_FINGERPRINT, atomTag, data),
- BackgroundThread.getExecutor()
+ BackgroundThread.getExecutor(),
+ mStatsCallbackImpl
);
}
@@ -1843,9 +1938,8 @@
mStatsManager.registerPullAtomCallback(
tagId,
null, // use default PullAtomMetadata values
- (atomTag, data) -> pullNumBiometricsEnrolled(
- BiometricsProtoEnums.MODALITY_FACE, atomTag, data),
- BackgroundThread.getExecutor()
+ BackgroundThread.getExecutor(),
+ mStatsCallbackImpl
);
}
@@ -1897,15 +1991,13 @@
return StatsManager.PULL_SUCCESS;
}
- private File mBaseDir = new File(SystemServiceManager.ensureSystemDir(), "stats_companion");
-
private void registerProcStats() {
int tagId = StatsLog.PROC_STATS;
mStatsManager.registerPullAtomCallback(
tagId,
null, // use default PullAtomMetadata values
- (atomTag, data) -> pullProcStats(ProcessStats.REPORT_ALL, atomTag, data),
- BackgroundThread.getExecutor()
+ BackgroundThread.getExecutor(),
+ mStatsCallbackImpl
);
}
@@ -1914,8 +2006,8 @@
mStatsManager.registerPullAtomCallback(
tagId,
null, // use default PullAtomMetadata values
- (atomTag, data) -> pullProcStats(ProcessStats.REPORT_PKG_PROC_STATS, atomTag, data),
- BackgroundThread.getExecutor()
+ BackgroundThread.getExecutor(),
+ mStatsCallbackImpl
);
}
@@ -1978,25 +2070,21 @@
return 0;
}
-
- private StoragedUidIoStatsReader mStoragedUidIoStatsReader =
- new StoragedUidIoStatsReader();
-
private void registerDiskIO() {
int tagId = StatsLog.DISK_IO;
- PullAtomMetadata metadata = PullAtomMetadata.newBuilder()
+ PullAtomMetadata metadata = new PullAtomMetadata.Builder()
.setAdditiveFields(new int[] {2, 3, 4, 5, 6, 7, 8, 9, 10, 11})
.setCoolDownNs(3 * NS_PER_SEC)
.build();
mStatsManager.registerPullAtomCallback(
tagId,
metadata,
- (atomTag, data) -> pullDiskIO(atomTag, data),
- BackgroundThread.getExecutor()
+ BackgroundThread.getExecutor(),
+ mStatsCallbackImpl
);
}
- private int pullDiskIO(int atomTag, List<StatsEvent> pulledData) {
+ int pullDiskIO(int atomTag, List<StatsEvent> pulledData) {
mStoragedUidIoStatsReader.readAbsolute((uid, fgCharsRead, fgCharsWrite, fgBytesRead,
fgBytesWrite, bgCharsRead, bgCharsWrite, bgBytesRead, bgBytesWrite,
fgFsync, bgFsync) -> {
@@ -2025,11 +2113,11 @@
tagId,
/* PullAtomMetadata */ null,
BackgroundThread.getExecutor(),
- (atomTag, data) -> pullPowerProfile(atomTag, data)
+ mStatsCallbackImpl
);
}
- private int pullPowerProfile(int atomTag, List<StatsEvent> pulledData) {
+ int pullPowerProfile(int atomTag, List<StatsEvent> pulledData) {
PowerProfile powerProfile = new PowerProfile(mContext);
ProtoOutputStream proto = new ProtoOutputStream();
powerProfile.dumpDebug(proto);
@@ -2042,25 +2130,21 @@
return StatsManager.PULL_SUCCESS;
}
- private final Object mCpuTrackerLock = new Object();
- @GuardedBy("mCpuTrackerLock")
- private ProcessCpuTracker mProcessCpuTracker;
-
private void registerProcessCpuTime() {
int tagId = StatsLog.PROCESS_CPU_TIME;
// Min cool-down is 5 sec, in line with what ActivityManagerService uses.
- PullAtomMetadata metadata = PullAtomMetadata.newBuilder()
+ PullAtomMetadata metadata = new PullAtomMetadata.Builder()
.setCoolDownNs(5 * NS_PER_SEC)
.build();
mStatsManager.registerPullAtomCallback(
tagId,
metadata,
- (atomTag, data) -> pullProcessCpuTime(atomTag, data),
- BackgroundThread.getExecutor()
+ BackgroundThread.getExecutor(),
+ mStatsCallbackImpl
);
}
- private int pullProcessCpuTime(int atomTag, List<StatsEvent> pulledData) {
+ int pullProcessCpuTime(int atomTag, List<StatsEvent> pulledData) {
synchronized (mCpuTrackerLock) {
if (mProcessCpuTracker == null) {
mProcessCpuTracker = new ProcessCpuTracker(false);
@@ -2082,24 +2166,20 @@
return StatsManager.PULL_SUCCESS;
}
- @Nullable
- private KernelCpuThreadReaderDiff mKernelCpuThreadReader;
- private static final int CPU_TIME_PER_THREAD_FREQ_MAX_NUM_FREQUENCIES = 8;
-
private void registerCpuTimePerThreadFreq() {
int tagId = StatsLog.CPU_TIME_PER_THREAD_FREQ;
- PullAtomMetadata metadata = PullAtomMetadata.newBuilder()
+ PullAtomMetadata metadata = new PullAtomMetadata.Builder()
.setAdditiveFields(new int[] {7, 9, 11, 13, 15, 17, 19, 21})
.build();
mStatsManager.registerPullAtomCallback(
tagId,
metadata,
- (atomTag, data) -> pullCpuTimePerThreadFreq(atomTag, data),
- BackgroundThread.getExecutor()
+ BackgroundThread.getExecutor(),
+ mStatsCallbackImpl
);
}
- private int pullCpuTimePerThreadFreq(int atomTag, List<StatsEvent> pulledData) {
+ int pullCpuTimePerThreadFreq(int atomTag, List<StatsEvent> pulledData) {
if (this.mKernelCpuThreadReader == null) {
Slog.e(TAG, "mKernelCpuThreadReader is null");
return StatsManager.PULL_SKIP;
@@ -2156,12 +2236,6 @@
return StatsManager.PULL_SUCCESS;
}
- // TODO: move to top of file when all migrations are complete
- private BatteryStatsHelper mBatteryStatsHelper = null;
- private static final int MAX_BATTERY_STATS_HELPER_FREQUENCY_MS = 1000;
- private long mBatteryStatsHelperTimestampMs = -MAX_BATTERY_STATS_HELPER_FREQUENCY_MS;
- private static final long MILLI_AMP_HR_TO_NANO_AMP_SECS = 1_000_000L * 3600L;
-
private BatteryStatsHelper getBatteryStatsHelper() {
if (mBatteryStatsHelper == null) {
final long callingToken = Binder.clearCallingIdentity();
@@ -2193,12 +2267,12 @@
mStatsManager.registerPullAtomCallback(
tagId,
null, // use default PullAtomMetadata values
- (atomTag, data) -> pullDeviceCalculatedPowerUse(atomTag, data),
- BackgroundThread.getExecutor()
+ BackgroundThread.getExecutor(),
+ mStatsCallbackImpl
);
}
- private int pullDeviceCalculatedPowerUse(int atomTag, List<StatsEvent> pulledData) {
+ int pullDeviceCalculatedPowerUse(int atomTag, List<StatsEvent> pulledData) {
BatteryStatsHelper bsHelper = getBatteryStatsHelper();
StatsEvent e = StatsEvent.newBuilder()
.setAtomId(atomTag)
@@ -2213,12 +2287,12 @@
mStatsManager.registerPullAtomCallback(
tagId,
null, // use default PullAtomMetadata values
- (atomTag, data) -> pullDeviceCalculatedPowerBlameUid(atomTag, data),
- BackgroundThread.getExecutor()
+ BackgroundThread.getExecutor(),
+ mStatsCallbackImpl
);
}
- private int pullDeviceCalculatedPowerBlameUid(int atomTag, List<StatsEvent> pulledData) {
+ int pullDeviceCalculatedPowerBlameUid(int atomTag, List<StatsEvent> pulledData) {
final List<BatterySipper> sippers = getBatteryStatsHelper().getUsageList();
if (sippers == null) {
return StatsManager.PULL_SKIP;
@@ -2243,12 +2317,12 @@
mStatsManager.registerPullAtomCallback(
tagId,
null, // use default PullAtomMetadata values
- (atomTag, data) -> pullDeviceCalculatedPowerBlameOther(atomTag, data),
- BackgroundThread.getExecutor()
+ BackgroundThread.getExecutor(),
+ mStatsCallbackImpl
);
}
- private int pullDeviceCalculatedPowerBlameOther(int atomTag, List<StatsEvent> pulledData) {
+ int pullDeviceCalculatedPowerBlameOther(int atomTag, List<StatsEvent> pulledData) {
final List<BatterySipper> sippers = getBatteryStatsHelper().getUsageList();
if (sippers == null) {
return StatsManager.PULL_SKIP;
@@ -2271,24 +2345,20 @@
return StatsManager.PULL_SUCCESS;
}
- private final Object mDebugElapsedClockLock = new Object();
- private long mDebugElapsedClockPreviousValue = 0;
- private long mDebugElapsedClockPullCount = 0;
-
private void registerDebugElapsedClock() {
int tagId = StatsLog.DEBUG_ELAPSED_CLOCK;
- PullAtomMetadata metadata = PullAtomMetadata.newBuilder()
+ PullAtomMetadata metadata = new PullAtomMetadata.Builder()
.setAdditiveFields(new int[] {1, 2, 3, 4})
.build();
mStatsManager.registerPullAtomCallback(
tagId,
metadata,
- (atomTag, data) -> pullDebugElapsedClock(atomTag, data),
- BackgroundThread.getExecutor()
+ BackgroundThread.getExecutor(),
+ mStatsCallbackImpl
);
}
- private int pullDebugElapsedClock(int atomTag, List<StatsEvent> pulledData) {
+ int pullDebugElapsedClock(int atomTag, List<StatsEvent> pulledData) {
final long elapsedMillis = SystemClock.elapsedRealtime();
synchronized (mDebugElapsedClockLock) {
@@ -2326,24 +2396,20 @@
return StatsManager.PULL_SUCCESS;
}
- private final Object mDebugFailingElapsedClockLock = new Object();
- private long mDebugFailingElapsedClockPreviousValue = 0;
- private long mDebugFailingElapsedClockPullCount = 0;
-
private void registerDebugFailingElapsedClock() {
int tagId = StatsLog.DEBUG_FAILING_ELAPSED_CLOCK;
- PullAtomMetadata metadata = PullAtomMetadata.newBuilder()
+ PullAtomMetadata metadata = new PullAtomMetadata.Builder()
.setAdditiveFields(new int[] {1, 2, 3, 4})
.build();
mStatsManager.registerPullAtomCallback(
tagId,
metadata,
- (atomTag, data) -> pullDebugFailingElapsedClock(atomTag, data),
- BackgroundThread.getExecutor()
+ BackgroundThread.getExecutor(),
+ mStatsCallbackImpl
);
}
- private int pullDebugFailingElapsedClock(int atomTag, List<StatsEvent> pulledData) {
+ int pullDebugFailingElapsedClock(int atomTag, List<StatsEvent> pulledData) {
final long elapsedMillis = SystemClock.elapsedRealtime();
synchronized (mDebugFailingElapsedClockLock) {
@@ -2377,11 +2443,11 @@
tagId,
null, // use default PullAtomMetadata values
BackgroundThread.getExecutor(),
- (atomTag, data) -> pullBuildInformation(atomTag, data)
+ mStatsCallbackImpl
);
}
- private int pullBuildInformation(int atomTag, List<StatsEvent> pulledData) {
+ int pullBuildInformation(int atomTag, List<StatsEvent> pulledData) {
StatsEvent e = StatsEvent.newBuilder()
.setAtomId(atomTag)
.writeString(Build.FINGERPRINT)
@@ -2403,13 +2469,13 @@
mStatsManager.registerPullAtomCallback(
tagId,
null, // use default PullAtomMetadata values
- (atomTag, data) -> pullRoleHolder(atomTag, data),
- BackgroundThread.getExecutor()
+ BackgroundThread.getExecutor(),
+ mStatsCallbackImpl
);
}
// Add a RoleHolder atom for each package that holds a role.
- private int pullRoleHolder(int atomTag, List<StatsEvent> pulledData) {
+ int pullRoleHolder(int atomTag, List<StatsEvent> pulledData) {
long callingToken = Binder.clearCallingIdentity();
try {
PackageManager pm = mContext.getPackageManager();
@@ -2461,12 +2527,12 @@
mStatsManager.registerPullAtomCallback(
tagId,
null, // use default PullAtomMetadata values
- (atomTag, data) -> pullDangerousPermissionState(atomTag, data),
- BackgroundThread.getExecutor()
+ BackgroundThread.getExecutor(),
+ mStatsCallbackImpl
);
}
- private int pullDangerousPermissionState(int atomTag, List<StatsEvent> pulledData) {
+ int pullDangerousPermissionState(int atomTag, List<StatsEvent> pulledData) {
final long token = Binder.clearCallingIdentity();
Set<Integer> reportedUids = new HashSet<>();
try {
@@ -2547,12 +2613,12 @@
mStatsManager.registerPullAtomCallback(
tagId,
null, // use default PullAtomMetadata values
- (atomTag, data) -> pullTimeZoneDataInfo(atomTag, data),
- BackgroundThread.getExecutor()
+ BackgroundThread.getExecutor(),
+ mStatsCallbackImpl
);
}
- private int pullTimeZoneDataInfo(int atomTag, List<StatsEvent> pulledData) {
+ int pullTimeZoneDataInfo(int atomTag, List<StatsEvent> pulledData) {
String tzDbVersion = "Unknown";
try {
tzDbVersion = android.icu.util.TimeZone.getTZDataVersion();
@@ -2574,12 +2640,12 @@
mStatsManager.registerPullAtomCallback(
tagId,
null, // use default PullAtomMetadata values
- (atomTag, data) -> pullExternalStorageInfo(atomTag, data),
- BackgroundThread.getExecutor()
+ BackgroundThread.getExecutor(),
+ mStatsCallbackImpl
);
}
- private int pullExternalStorageInfo(int atomTag, List<StatsEvent> pulledData) {
+ int pullExternalStorageInfo(int atomTag, List<StatsEvent> pulledData) {
if (mStorageManager == null) {
return StatsManager.PULL_SKIP;
}
@@ -2624,12 +2690,12 @@
mStatsManager.registerPullAtomCallback(
tagId,
null, // use default PullAtomMetadata values
- (atomTag, data) -> pullAppsOnExternalStorageInfo(atomTag, data),
- BackgroundThread.getExecutor()
+ BackgroundThread.getExecutor(),
+ mStatsCallbackImpl
);
}
- private int pullAppsOnExternalStorageInfo(int atomTag, List<StatsEvent> pulledData) {
+ int pullAppsOnExternalStorageInfo(int atomTag, List<StatsEvent> pulledData) {
if (mStorageManager == null) {
return StatsManager.PULL_SKIP;
}
@@ -2680,12 +2746,12 @@
mStatsManager.registerPullAtomCallback(
tagId,
null, // use default PullAtomMetadata values
- (atomTag, data) -> pullFaceSettings(atomTag, data),
- BackgroundThread.getExecutor()
+ BackgroundThread.getExecutor(),
+ mStatsCallbackImpl
);
}
- private int pullFaceSettings(int atomTag, List<StatsEvent> pulledData) {
+ int pullFaceSettings(int atomTag, List<StatsEvent> pulledData) {
final long callingToken = Binder.clearCallingIdentity();
try {
List<UserInfo> users = mContext.getSystemService(UserManager.class).getUsers();
@@ -2734,13 +2800,13 @@
mStatsManager.registerPullAtomCallback(
tagId,
null, // use default PullAtomMetadata values
- (atomTag, data) -> pullAppOps(atomTag, data),
- BackgroundThread.getExecutor()
+ BackgroundThread.getExecutor(),
+ mStatsCallbackImpl
);
}
- private int pullAppOps(int atomTag, List<StatsEvent> pulledData) {
+ int pullAppOps(int atomTag, List<StatsEvent> pulledData) {
final long token = Binder.clearCallingIdentity();
try {
AppOpsManager appOps = mContext.getSystemService(AppOpsManager.class);
@@ -2845,12 +2911,12 @@
mStatsManager.registerPullAtomCallback(
tagId,
null, // use default PullAtomMetadata values
- (atomTag, data) -> pullNotificationRemoteViews(atomTag, data),
- BackgroundThread.getExecutor()
+ BackgroundThread.getExecutor(),
+ mStatsCallbackImpl
);
}
- private int pullNotificationRemoteViews(int atomTag, List<StatsEvent> pulledData) {
+ int pullNotificationRemoteViews(int atomTag, List<StatsEvent> pulledData) {
INotificationManager notificationManagerService = getINotificationManagerService();
if (notificationManagerService == null) {
return StatsManager.PULL_SKIP;
@@ -2889,8 +2955,8 @@
mStatsManager.registerPullAtomCallback(
tagId,
null, // use default PullAtomMetadata values
- (atomTag, data) -> pullDangerousPermissionState(atomTag, data),
- BackgroundThread.getExecutor()
+ BackgroundThread.getExecutor(),
+ mStatsCallbackImpl
);
}
diff --git a/services/core/java/com/android/server/wm/ActivityStack.java b/services/core/java/com/android/server/wm/ActivityStack.java
index 663423f..ddf0117 100644
--- a/services/core/java/com/android/server/wm/ActivityStack.java
+++ b/services/core/java/com/android/server/wm/ActivityStack.java
@@ -660,6 +660,8 @@
super.onConfigurationChanged(newParentConfig);
+ updateTaskOrganizerState();
+
// Only need to update surface size here since the super method will handle updating
// surface position.
updateSurfaceSize(getPendingTransaction());
@@ -762,6 +764,22 @@
}
}
+ void updateTaskOrganizerState() {
+ if (!isRootTask()) {
+ return;
+ }
+
+ final int windowingMode = getWindowingMode();
+ /*
+ * Different windowing modes may be managed by different task organizers. If
+ * getTaskOrganizer returns null, we still call setTaskOrganizer to
+ * make sure we clear it.
+ */
+ final ITaskOrganizer org =
+ mWmService.mAtmService.mTaskOrganizerController.getTaskOrganizer(windowingMode);
+ setTaskOrganizer(org);
+ }
+
@Override
public void setWindowingMode(int windowingMode) {
// Calling Task#setWindowingMode() for leaf task since this is the a specialization of
@@ -774,15 +792,6 @@
setWindowingMode(windowingMode, false /* animate */, false /* showRecents */,
false /* enteringSplitScreenMode */, false /* deferEnsuringVisibility */,
false /* creating */);
- windowingMode = getWindowingMode();
- /*
- * Different windowing modes may be managed by different task organizers. If
- * getTaskOrganizer returns null, we still call transferToTaskOrganizer to
- * make sure we clear it.
- */
- final ITaskOrganizer org =
- mWmService.mAtmService.mTaskOrganizerController.getTaskOrganizer(windowingMode);
- transferToTaskOrganizer(org);
}
/**
@@ -1583,24 +1592,6 @@
return topActivity != null && topActivity.mVisibleRequested;
}
- private static void transferSingleTaskToOrganizer(Task tr, ITaskOrganizer organizer) {
- tr.setTaskOrganizer(organizer);
- }
-
- /**
- * Transfer control of the leashes and IWindowContainers to the given ITaskOrganizer.
- * This will (or shortly there-after) invoke the taskAppeared callbacks.
- * If the tasks had a previous TaskOrganizer, setTaskOrganizer will take care of
- * emitting the taskVanished callbacks.
- */
- void transferToTaskOrganizer(ITaskOrganizer organizer) {
- final PooledConsumer c = PooledLambda.obtainConsumer(
- ActivityStack::transferSingleTaskToOrganizer,
- PooledLambda.__(Task.class), organizer);
- forAllTasks(c, true /* traverseTopToBottom */, this);
- c.recycle();
- }
-
/**
* Returns true if the stack should be visible.
*
diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java
index bf89bab..e4bf2ed 100644
--- a/services/core/java/com/android/server/wm/DisplayContent.java
+++ b/services/core/java/com/android/server/wm/DisplayContent.java
@@ -112,7 +112,6 @@
import static com.android.server.wm.DisplayContentProto.IME_WINDOWS;
import static com.android.server.wm.DisplayContentProto.OPENING_APPS;
import static com.android.server.wm.DisplayContentProto.OVERLAY_WINDOWS;
-import static com.android.server.wm.DisplayContentProto.PINNED_STACK_CONTROLLER;
import static com.android.server.wm.DisplayContentProto.ROTATION;
import static com.android.server.wm.DisplayContentProto.SCREEN_ROTATION_ANIMATION;
import static com.android.server.wm.DisplayContentProto.STACKS;
@@ -2779,7 +2778,6 @@
stack.dumpDebugInnerStackOnly(proto, STACKS, logLevel);
}
mDividerControllerLocked.dumpDebug(proto, DOCKED_STACK_DIVIDER_CONTROLLER);
- mPinnedStackControllerLocked.dumpDebug(proto, PINNED_STACK_CONTROLLER);
for (int i = mAboveAppWindowsContainers.getChildCount() - 1; i >= 0; --i) {
final WindowToken windowToken = mAboveAppWindowsContainers.getChildAt(i);
windowToken.dumpDebug(proto, ABOVE_APP_WINDOWS, logLevel);
diff --git a/services/core/java/com/android/server/wm/InputMonitor.java b/services/core/java/com/android/server/wm/InputMonitor.java
index 4c5914b..faa6e52 100644
--- a/services/core/java/com/android/server/wm/InputMonitor.java
+++ b/services/core/java/com/android/server/wm/InputMonitor.java
@@ -161,7 +161,13 @@
void onDisplayRemoved() {
mHandler.removeCallbacks(mUpdateInputWindows);
- mService.mInputManager.onDisplayRemoved(mDisplayId);
+ mHandler.post(() -> {
+ // Make sure any pending setInputWindowInfo transactions are completed. That prevents
+ // the timing of updating input info of removed display after cleanup.
+ mService.mTransactionFactory.get().syncInputWindows().apply();
+ // It calls InputDispatcher::setInputWindows directly.
+ mService.mInputManager.onDisplayRemoved(mDisplayId);
+ });
mDisplayRemoved = true;
}
diff --git a/services/core/java/com/android/server/wm/PinnedStackController.java b/services/core/java/com/android/server/wm/PinnedStackController.java
index 1d5b5d1..668b609 100644
--- a/services/core/java/com/android/server/wm/PinnedStackController.java
+++ b/services/core/java/com/android/server/wm/PinnedStackController.java
@@ -18,8 +18,6 @@
import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED;
-import static com.android.server.wm.PinnedStackControllerProto.DEFAULT_BOUNDS;
-import static com.android.server.wm.PinnedStackControllerProto.MOVEMENT_BOUNDS;
import static com.android.server.wm.WindowManagerDebugConfig.TAG_WITH_CLASS_NAME;
import static com.android.server.wm.WindowManagerDebugConfig.TAG_WM;
@@ -34,7 +32,6 @@
import android.util.DisplayMetrics;
import android.util.Log;
import android.util.Slog;
-import android.util.proto.ProtoOutputStream;
import android.view.DisplayInfo;
import android.view.IPinnedStackController;
import android.view.IPinnedStackListener;
@@ -97,11 +94,6 @@
// Temp vars for calculation
private final DisplayMetrics mTmpMetrics = new DisplayMetrics();
- // TODO(b/141200935): remove this when we have default/movement bounds tests in SysUI.
- // Keep record of the default and movement bounds
- private final Rect mLastReportedDefaultBounds = new Rect();
- private final Rect mLastReportedMovementBounds = new Rect();
-
/**
* The callback object passed to listeners for them to notify the controller of state changes.
*/
@@ -143,14 +135,6 @@
}
}
}
-
- @Override
- public void reportBounds(Rect defaultBounds, Rect movementBounds) {
- synchronized (mService.mGlobalLock) {
- mLastReportedDefaultBounds.set(defaultBounds);
- mLastReportedMovementBounds.set(movementBounds);
- }
- }
}
/**
@@ -421,8 +405,6 @@
void dump(String prefix, PrintWriter pw) {
pw.println(prefix + "PinnedStackController");
- pw.println(prefix + " mLastReportedDefaultBounds=" + mLastReportedDefaultBounds);
- pw.println(prefix + " mLastReportedMovementBounds=" + mLastReportedMovementBounds);
pw.println(prefix + " mDefaultAspectRatio=" + mDefaultAspectRatio);
pw.println(prefix + " mIsImeShowing=" + mIsImeShowing);
pw.println(prefix + " mImeHeight=" + mImeHeight);
@@ -443,11 +425,4 @@
}
pw.println(prefix + " mDisplayInfo=" + mDisplayInfo);
}
-
- void dumpDebug(ProtoOutputStream proto, long fieldId) {
- final long token = proto.start(fieldId);
- mLastReportedDefaultBounds.dumpDebug(proto, DEFAULT_BOUNDS);
- mLastReportedMovementBounds.dumpDebug(proto, MOVEMENT_BOUNDS);
- proto.end(token);
- }
}
diff --git a/services/core/java/com/android/server/wm/RecentTasks.java b/services/core/java/com/android/server/wm/RecentTasks.java
index 292e8aa..a9dc36d 100644
--- a/services/core/java/com/android/server/wm/RecentTasks.java
+++ b/services/core/java/com/android/server/wm/RecentTasks.java
@@ -173,6 +173,9 @@
private final ArrayList<Task> mTasks = new ArrayList<>();
private final ArrayList<Callbacks> mCallbacks = new ArrayList<>();
+ /** The non-empty tasks that are removed from recent tasks (see {@link #removeForAddTask}). */
+ private final ArrayList<Task> mHiddenTasks = new ArrayList<>();
+
// These values are generally loaded from resources, but can be set dynamically in the tests
private boolean mHasVisibleRecentTasks;
private int mGlobalMaxNumTasks;
@@ -1024,6 +1027,12 @@
void add(Task task) {
if (DEBUG_RECENTS_TRIM_TASKS) Slog.d(TAG, "add: task=" + task);
+ // Clean up the hidden tasks when going to home because the user may not be unable to return
+ // to the task from recents.
+ if (!mHiddenTasks.isEmpty() && task.isActivityTypeHome()) {
+ removeUnreachableHiddenTasks(task.getWindowingMode());
+ }
+
final boolean isAffiliated = task.mAffiliatedTaskId != task.mTaskId
|| task.mNextAffiliateTaskId != INVALID_TASK_ID
|| task.mPrevAffiliateTaskId != INVALID_TASK_ID;
@@ -1390,6 +1399,28 @@
return display.getIndexOf(stack) < display.getIndexOf(display.getRootHomeTask());
}
+ /** Remove the tasks that user may not be able to return. */
+ private void removeUnreachableHiddenTasks(int windowingMode) {
+ for (int i = mHiddenTasks.size() - 1; i >= 0; i--) {
+ final Task hiddenTask = mHiddenTasks.get(i);
+ if (!hiddenTask.hasChild()) {
+ // The task was removed by other path.
+ mHiddenTasks.remove(i);
+ continue;
+ }
+ if (hiddenTask.getWindowingMode() != windowingMode
+ || hiddenTask.getTopVisibleActivity() != null) {
+ // The task may be reachable from the back stack of other windowing mode or it is
+ // currently in use. Keep the task in the hidden list to avoid losing track, e.g.
+ // after dismissing primary split screen.
+ continue;
+ }
+ mHiddenTasks.remove(i);
+ mSupervisor.removeTask(hiddenTask, false /* killProcess */,
+ !REMOVE_FROM_RECENTS, "remove-hidden-task");
+ }
+ }
+
/**
* If needed, remove oldest existing entries in recents that are for the same kind
* of task as the given one.
@@ -1406,6 +1437,14 @@
// callbacks here.
final Task removedTask = mTasks.remove(removeIndex);
if (removedTask != task) {
+ // The added task is in recents so it is not hidden.
+ mHiddenTasks.remove(task);
+ if (removedTask.hasChild()) {
+ // A non-empty task is replaced by a new task. Because the removed task is no longer
+ // managed by the recent tasks list, add it to the hidden list to prevent the task
+ // from becoming dangling.
+ mHiddenTasks.add(removedTask);
+ }
notifyTaskRemoved(removedTask, false /* wasTrimmed */, false /* killProcess */);
if (DEBUG_RECENTS_TRIM_TASKS) Slog.d(TAG, "Trimming task=" + removedTask
+ " for addition of task=" + task);
@@ -1662,6 +1701,9 @@
pw.println("mFreezeTaskListReordering=" + mFreezeTaskListReordering);
pw.println("mFreezeTaskListReorderingPendingTimeout="
+ mService.mH.hasCallbacks(mResetFreezeTaskListOnTimeoutRunnable));
+ if (!mHiddenTasks.isEmpty()) {
+ pw.println("mHiddenTasks=" + mHiddenTasks);
+ }
if (mTasks.isEmpty()) {
return;
}
diff --git a/services/core/java/com/android/server/wm/Task.java b/services/core/java/com/android/server/wm/Task.java
index 9dba0d3..a02ba64 100644
--- a/services/core/java/com/android/server/wm/Task.java
+++ b/services/core/java/com/android/server/wm/Task.java
@@ -3864,9 +3864,8 @@
}
boolean isControlledByTaskOrganizer() {
- // TODO(b/147849315): Clean-up relationship between task-org and task-hierarchy. Ideally
- // we only give control of the root task.
- return getTopMostTask().mTaskOrganizer != null;
+ final Task rootTask = getRootTask();
+ return rootTask == this && rootTask.mTaskOrganizer != null;
}
@Override
@@ -3938,23 +3937,6 @@
super.getRelativeDisplayedPosition(outPos);
}
- @Override
- public void setWindowingMode(int windowingMode) {
- super.setWindowingMode(windowingMode);
- windowingMode = getWindowingMode();
-
- // TODO(b/147849315): Clean-up relationship between task-org and task-hierarchy. Ideally
- // we only give control of the root task.
- // Different windowing modes may be managed by different task organizers. If
- // getTaskOrganizer returns null, we still call transferToTaskOrganizer to make sure we
- // clear it.
- if (!isRootTask()) {
- final ITaskOrganizer org =
- mAtmService.mTaskOrganizerController.getTaskOrganizer(windowingMode);
- setTaskOrganizer(org);
- }
- }
-
/**
* @return true if the task is currently focused.
*/
diff --git a/services/core/jni/Android.bp b/services/core/jni/Android.bp
index 77d814e..4a2636e 100644
--- a/services/core/jni/Android.bp
+++ b/services/core/jni/Android.bp
@@ -14,6 +14,7 @@
srcs: [
":graphicsstats_proto",
+ ":lib_alarmManagerService_native",
"BroadcastRadio/JavaRef.cpp",
"BroadcastRadio/NativeCallbackThread.cpp",
"BroadcastRadio/BroadcastRadioService.cpp",
@@ -21,7 +22,6 @@
"BroadcastRadio/TunerCallback.cpp",
"BroadcastRadio/convert.cpp",
"BroadcastRadio/regions.cpp",
- "com_android_server_AlarmManagerService.cpp",
"com_android_server_am_BatteryStatsService.cpp",
"com_android_server_connectivity_Vpn.cpp",
"com_android_server_ConsumerIrService.cpp",
@@ -182,3 +182,10 @@
"com_android_server_net_NetworkStatsFactory.cpp",
],
}
+
+filegroup {
+ name: "lib_alarmManagerService_native",
+ srcs: [
+ "com_android_server_AlarmManagerService.cpp",
+ ],
+}
diff --git a/services/tests/mockingservicestests/src/com/android/server/job/controllers/ConnectivityControllerTest.java b/services/tests/mockingservicestests/src/com/android/server/job/controllers/ConnectivityControllerTest.java
index 1c88c40..e724e60 100644
--- a/services/tests/mockingservicestests/src/com/android/server/job/controllers/ConnectivityControllerTest.java
+++ b/services/tests/mockingservicestests/src/com/android/server/job/controllers/ConnectivityControllerTest.java
@@ -20,6 +20,7 @@
import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_CONGESTED;
import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_METERED;
import static android.net.NetworkCapabilities.NET_CAPABILITY_VALIDATED;
+import static android.net.NetworkCapabilities.TRANSPORT_CELLULAR;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.doNothing;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.doReturn;
@@ -27,6 +28,9 @@
import static com.android.dx.mockito.inline.extended.ExtendedMockito.mock;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.spy;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.when;
+import static com.android.server.job.JobSchedulerService.FREQUENT_INDEX;
+import static com.android.server.job.JobSchedulerService.RARE_INDEX;
+import static com.android.server.job.JobSchedulerService.RESTRICTED_INDEX;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
@@ -568,6 +572,48 @@
assertFalse(controller.isStandbyExceptionRequestedLocked(UID_RED));
}
+ @Test
+ public void testRestrictedJobTracking() {
+ final JobStatus networked = createJobStatus(createJob()
+ .setEstimatedNetworkBytes(DataUnit.MEBIBYTES.toBytes(1), 0)
+ .setRequiredNetworkType(JobInfo.NETWORK_TYPE_CELLULAR), UID_RED);
+ final JobStatus unnetworked = createJobStatus(createJob(), UID_BLUE);
+ networked.setStandbyBucket(FREQUENT_INDEX);
+ unnetworked.setStandbyBucket(FREQUENT_INDEX);
+
+ final Network cellularNet = new Network(101);
+ final NetworkCapabilities cellularCaps =
+ createCapabilities().addTransportType(TRANSPORT_CELLULAR);
+ reset(mConnManager);
+ answerNetwork(UID_RED, cellularNet, cellularCaps);
+ answerNetwork(UID_BLUE, cellularNet, cellularCaps);
+
+ final ConnectivityController controller = new ConnectivityController(mService);
+ controller.maybeStartTrackingJobLocked(networked, null);
+ controller.maybeStartTrackingJobLocked(unnetworked, null);
+
+ assertTrue(networked.isConstraintSatisfied(JobStatus.CONSTRAINT_CONNECTIVITY));
+ assertFalse(unnetworked.isConstraintSatisfied(JobStatus.CONSTRAINT_CONNECTIVITY));
+
+ networked.setStandbyBucket(RESTRICTED_INDEX);
+ unnetworked.setStandbyBucket(RESTRICTED_INDEX);
+ controller.startTrackingRestrictedJobLocked(networked);
+ controller.startTrackingRestrictedJobLocked(unnetworked);
+ assertFalse(networked.isConstraintSatisfied(JobStatus.CONSTRAINT_CONNECTIVITY));
+ // Unnetworked shouldn't be affected by ConnectivityController since it doesn't have a
+ // connectivity constraint.
+ assertFalse(unnetworked.isConstraintSatisfied(JobStatus.CONSTRAINT_CONNECTIVITY));
+
+ networked.setStandbyBucket(RARE_INDEX);
+ unnetworked.setStandbyBucket(RARE_INDEX);
+ controller.stopTrackingRestrictedJobLocked(networked);
+ controller.stopTrackingRestrictedJobLocked(unnetworked);
+ assertTrue(networked.isConstraintSatisfied(JobStatus.CONSTRAINT_CONNECTIVITY));
+ // Unnetworked shouldn't be affected by ConnectivityController since it doesn't have a
+ // connectivity constraint.
+ assertFalse(unnetworked.isConstraintSatisfied(JobStatus.CONSTRAINT_CONNECTIVITY));
+ }
+
private void answerNetwork(int uid, Network net, NetworkCapabilities caps) {
when(mConnManager.getActiveNetworkForUid(eq(uid))).thenReturn(net);
when(mConnManager.getNetworkCapabilities(eq(net))).thenReturn(caps);
diff --git a/services/tests/servicestests/src/com/android/server/GnssManagerServiceTest.java b/services/tests/servicestests/src/com/android/server/location/gnss/GnssManagerServiceTest.java
similarity index 97%
rename from services/tests/servicestests/src/com/android/server/GnssManagerServiceTest.java
rename to services/tests/servicestests/src/com/android/server/location/gnss/GnssManagerServiceTest.java
index 8b5444c..f262733 100644
--- a/services/tests/servicestests/src/com/android/server/GnssManagerServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/location/gnss/GnssManagerServiceTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2019 The Android Open Source Project
+ * 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.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.server;
+package com.android.server.location.gnss;
import static com.google.common.truth.Truth.assertThat;
@@ -52,6 +52,7 @@
import android.os.Message;
import android.os.RemoteException;
+import com.android.server.LocationManagerService;
import com.android.server.location.GnssBatchingProvider;
import com.android.server.location.GnssCapabilitiesProvider;
import com.android.server.location.GnssLocationProvider;
@@ -71,11 +72,12 @@
import org.mockito.MockitoAnnotations;
import org.mockito.invocation.InvocationOnMock;
+import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
- * Unit tests for {@link com.android.server.GnssManagerService}.
+ * Unit tests for {@link com.android.server.location.gnss.GnssManagerService}.
*/
public class GnssManagerServiceTest {
@@ -111,7 +113,7 @@
private Context mMockContext;
// Class under test
- private GnssManagerService mGnssManagerService;
+ private com.android.server.location.gnss.GnssManagerService mGnssManagerService;
@Before
public void setUp() {
@@ -371,7 +373,7 @@
@Test
public void addGnssBatchCallbackWithoutPermissionsTest() throws RemoteException {
IBatchedLocationCallback mockBatchedLocationCallback = createMockBatchedLocationCallback();
- List<Location> mockLocationList = (List<Location>) mock(List.class);
+ List<Location> mockLocationList = new ArrayList<>();
disableLocationPermissions();
@@ -387,7 +389,7 @@
@Test
public void addGnssBatchCallbackWithPermissionsTest() throws RemoteException {
IBatchedLocationCallback mockBatchedLocationCallback = createMockBatchedLocationCallback();
- List<Location> mockLocationList = (List<Location>) mock(List.class);
+ List<Location> mockLocationList = new ArrayList<>();
enableLocationPermissions();
@@ -404,7 +406,7 @@
public void replaceGnssBatchCallbackTest() throws RemoteException {
IBatchedLocationCallback mockBatchedLocationCallback1 = createMockBatchedLocationCallback();
IBatchedLocationCallback mockBatchedLocationCallback2 = createMockBatchedLocationCallback();
- List<Location> mockLocationList = (List<Location>) mock(List.class);
+ List<Location> mockLocationList = new ArrayList<>();
enableLocationPermissions();
@@ -441,7 +443,7 @@
@Test
public void removeGnssBatchingCallbackWithoutPermissionsTest() throws RemoteException {
IBatchedLocationCallback mockBatchedLocationCallback = createMockBatchedLocationCallback();
- List<Location> mockLocationList = (List<Location>) mock(List.class);
+ List<Location> mockLocationList = new ArrayList<>();
enableLocationPermissions();
@@ -461,7 +463,7 @@
@Test
public void removeGnssBatchingCallbackWithPermissionsTest() throws RemoteException {
IBatchedLocationCallback mockBatchedLocationCallback = createMockBatchedLocationCallback();
- List<Location> mockLocationList = (List<Location>) mock(List.class);
+ List<Location> mockLocationList = new ArrayList<>();
enableLocationPermissions();
diff --git a/services/tests/servicestests/src/com/android/server/pm/PackageInstallerSessionTest.java b/services/tests/servicestests/src/com/android/server/pm/PackageInstallerSessionTest.java
index a8674a8..bfe0c15 100644
--- a/services/tests/servicestests/src/com/android/server/pm/PackageInstallerSessionTest.java
+++ b/services/tests/servicestests/src/com/android/server/pm/PackageInstallerSessionTest.java
@@ -156,7 +156,8 @@
if (isMultiPackage) {
params.isMultiPackage = true;
}
- InstallSource installSource = InstallSource.create("testInstaller", null, "testInstaller");
+ InstallSource installSource = InstallSource.create("testInstallInitiator",
+ "testInstallOriginator", "testInstaller");
return new PackageInstallerSession(
/* callback */ null,
/* context */null,
@@ -297,6 +298,8 @@
assertEquals(expected.userId, actual.userId);
assertSessionParamsEquivalent(expected.params, actual.params);
assertEquals(expected.getInstallerUid(), actual.getInstallerUid());
+ assertEquals(expected.getInstallerPackageName(), actual.getInstallerPackageName());
+ assertInstallSourcesEquivalent(expected.getInstallSource(), actual.getInstallSource());
assertEquals(expected.stageDir.getAbsolutePath(), actual.stageDir.getAbsolutePath());
assertEquals(expected.stageCid, actual.stageCid);
assertEquals(expected.isPrepared(), actual.isPrepared());
@@ -316,4 +319,10 @@
assertEquals(expected.getParentSessionId(), actual.getParentSessionId());
assertArrayEquals(expected.getChildSessionIds(), actual.getChildSessionIds());
}
+
+ private void assertInstallSourcesEquivalent(InstallSource expected, InstallSource actual) {
+ assertEquals(expected.installerPackageName, actual.installerPackageName);
+ assertEquals(expected.initiatingPackageName, actual.initiatingPackageName);
+ assertEquals(expected.originatingPackageName, actual.originatingPackageName);
+ }
}
diff --git a/services/tests/servicestests/src/com/android/server/pm/UserManagerServiceUserInfoTest.java b/services/tests/servicestests/src/com/android/server/pm/UserManagerServiceUserInfoTest.java
index ac27a08..5df8568 100644
--- a/services/tests/servicestests/src/com/android/server/pm/UserManagerServiceUserInfoTest.java
+++ b/services/tests/servicestests/src/com/android/server/pm/UserManagerServiceUserInfoTest.java
@@ -153,6 +153,25 @@
assertTrue(mUserManagerService.isUserOfType(testId, typeName));
}
+ /** Test UserInfo.supportsSwitchTo() for precreated users. */
+ @Test
+ public void testSupportSwitchTo_preCreated() throws Exception {
+ UserInfo userInfo = createUser(100, FLAG_FULL, null);
+ userInfo.preCreated = true;
+ assertFalse("Switching to a precreated user should be disabled",
+ userInfo.supportsSwitchTo());
+
+ userInfo.preCreated = false;
+ assertTrue("Switching to a full, real user should be allowed", userInfo.supportsSwitchTo());
+ }
+
+ /** Test UserInfo.supportsSwitchTo() for profiles. */
+ @Test
+ public void testSupportSwitchTo_profile() throws Exception {
+ UserInfo userInfo = createUser(100, FLAG_PROFILE, null);
+ assertFalse("Switching to a profiles should be disabled", userInfo.supportsSwitchTo());
+ }
+
/** Tests upgradeIfNecessaryLP (but without locking) for upgrading from version 8 to 9+. */
@Test
public void testUpgradeIfNecessaryLP_9() {
diff --git a/services/tests/wmtests/src/com/android/server/wm/RecentTasksTest.java b/services/tests/wmtests/src/com/android/server/wm/RecentTasksTest.java
index b5e7dd5..a672a95 100644
--- a/services/tests/wmtests/src/com/android/server/wm/RecentTasksTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/RecentTasksTest.java
@@ -39,6 +39,8 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.mockito.ArgumentMatchers.anyBoolean;
@@ -83,6 +85,7 @@
import java.util.List;
import java.util.Random;
import java.util.Set;
+import java.util.function.Function;
/**
* Build/Install/Run:
@@ -419,6 +422,36 @@
}
@Test
+ public void testAddTasksHomeClearUntrackedTasks_expectFinish() {
+ // There may be multiple tasks with the same base intent by flags (FLAG_ACTIVITY_NEW_TASK |
+ // FLAG_ACTIVITY_MULTIPLE_TASK). If the previous task is still active, it should be removed
+ // because user may not be able to return to the task.
+ final String className = ".PermissionsReview";
+ final Function<Boolean, Task> taskBuilder = visible -> {
+ final Task task = createTaskBuilder(className).build();
+ // Make the task non-empty.
+ final ActivityRecord r = new ActivityBuilder(mService).setTask(task).build();
+ r.setVisibility(visible);
+ return task;
+ };
+
+ final Task task1 = taskBuilder.apply(false /* visible */);
+ mRecentTasks.add(task1);
+ final Task task2 = taskBuilder.apply(true /* visible */);
+ mRecentTasks.add(task2);
+ // Only the last task is kept in recents and the previous 2 tasks will becomes untracked
+ // tasks because their intents are identical.
+ mRecentTasks.add(createTaskBuilder(className).build());
+ // Go home to trigger the removal of untracked tasks.
+ mRecentTasks.add(createTaskBuilder(".Home").setStack(mDisplay.getRootHomeTask()).build());
+
+ // All activities in the invisible task should be finishing or removed.
+ assertNull(task1.getTopNonFinishingActivity());
+ // The visible task should not be affected.
+ assertNotNull(task2.getTopNonFinishingActivity());
+ }
+
+ @Test
public void testUsersTasks() {
mRecentTasks.setOnlyTestVisibleRange();
mRecentTasks.unloadUserDataFromMemoryLocked(TEST_USER_0_ID);
diff --git a/services/tests/wmtests/src/com/android/server/wm/TaskOrganizerTests.java b/services/tests/wmtests/src/com/android/server/wm/TaskOrganizerTests.java
index 8d2da1e..c9fd79f 100644
--- a/services/tests/wmtests/src/com/android/server/wm/TaskOrganizerTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/TaskOrganizerTests.java
@@ -80,7 +80,6 @@
task.setTaskOrganizer(organizer);
verify(organizer).taskAppeared(any(), any());
- assertTrue(task.isControlledByTaskOrganizer());
task.removeImmediately();
verify(organizer).taskVanished(any());
@@ -106,48 +105,13 @@
final Task task = createTaskInStack(stack, 0 /* userId */);
final ITaskOrganizer organizer = makeAndRegisterMockOrganizer();
- task.setTaskOrganizer(organizer);
+ stack.setTaskOrganizer(organizer);
verify(organizer).taskAppeared(any(), any());
- assertTrue(task.isControlledByTaskOrganizer());
+ assertTrue(stack.isControlledByTaskOrganizer());
- task.setTaskOrganizer(null);
+ stack.setTaskOrganizer(null);
verify(organizer).taskVanished(any());
- assertFalse(task.isControlledByTaskOrganizer());
- }
-
- @Test
- public void testTransferStackToOrganizer() throws RemoteException {
- final ActivityStack stack = createTaskStackOnDisplay(mDisplayContent);
- final Task task = createTaskInStack(stack, 0 /* userId */);
- final Task task2 = createTaskInStack(stack, 0 /* userId */);
- final ITaskOrganizer organizer = makeAndRegisterMockOrganizer();
-
- stack.transferToTaskOrganizer(organizer);
-
- verify(organizer, times(2)).taskAppeared(any(), any());
- assertTrue(task.isControlledByTaskOrganizer());
- assertTrue(task2.isControlledByTaskOrganizer());
-
- stack.transferToTaskOrganizer(null);
-
- verify(organizer, times(2)).taskVanished(any());
- assertFalse(task.isControlledByTaskOrganizer());
- assertFalse(task2.isControlledByTaskOrganizer());
- }
-
- @Test
- public void testRegisterTaskOrganizerTaskWindowingModeChanges() throws RemoteException {
- final ITaskOrganizer organizer = makeAndRegisterMockOrganizer();
-
- final ActivityStack stack = createTaskStackOnDisplay(mDisplayContent);
- final Task task = createTaskInStack(stack, 0 /* userId */);
- task.setWindowingMode(WINDOWING_MODE_PINNED);
- verify(organizer).taskAppeared(any(), any());
- assertTrue(task.isControlledByTaskOrganizer());
-
- task.setWindowingMode(WINDOWING_MODE_FULLSCREEN);
- verify(organizer).taskVanished(any());
- assertFalse(task.isControlledByTaskOrganizer());
+ assertFalse(stack.isControlledByTaskOrganizer());
}
@Test
@@ -158,13 +122,9 @@
final Task task = createTaskInStack(stack, 0 /* userId */);
final Task task2 = createTaskInStack(stack, 0 /* userId */);
stack.setWindowingMode(WINDOWING_MODE_PINNED);
- verify(organizer, times(2)).taskAppeared(any(), any());
- assertTrue(task.isControlledByTaskOrganizer());
- assertTrue(task2.isControlledByTaskOrganizer());
+ verify(organizer, times(1)).taskAppeared(any(), any());
stack.setWindowingMode(WINDOWING_MODE_FULLSCREEN);
- verify(organizer, times(2)).taskVanished(any());
- assertFalse(task.isControlledByTaskOrganizer());
- assertFalse(task2.isControlledByTaskOrganizer());
+ verify(organizer, times(1)).taskVanished(any());
}
}
diff --git a/startop/scripts/app_startup/metrics/com.google.android.GoogleCamera b/startop/scripts/app_startup/metrics/com.google.android.GoogleCamera
deleted file mode 100755
index d95fa32..0000000
--- a/startop/scripts/app_startup/metrics/com.google.android.GoogleCamera
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/bash
-#
-# Copyright 2019, 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.
-
-# 05-06 14:51:17.688 29691 29897 I CAM_Timing: CameraActivity: START -> ACTIVITY_FIRST_PREVIEW_FRAME_RECEIVED: 385ms
-pattern="CAM_Timing: CameraActivity: START -> ACTIVITY_FIRST_PREVIEW_FRAME_RECEIVED:"
-re_pattern='.*ACTIVITY_FIRST_PREVIEW_FRAME_RECEIVED: \([[:digit:]]\+\)ms'
-parse_metric_from_logcat "ACTIVITY_FIRST_PREVIEW_FRAME_RECEIVED_ms" "$pattern" "$re_pattern"
-
-# 05-06 14:51:17.724 29691 29691 I CAM_Timing: CameraActivity: START -> ACTIVITY_FIRST_PREVIEW_FRAME_RENDERED: 421ms
-pattern="CAM_Timing: CameraActivity: START -> ACTIVITY_FIRST_PREVIEW_FRAME_RENDERED:"
-re_pattern='.*ACTIVITY_FIRST_PREVIEW_FRAME_RENDERED: \([[:digit:]]\+\)ms'
-parse_metric_from_logcat "ACTIVITY_FIRST_PREVIEW_FRAME_RENDERED_ms" "$pattern" "$re_pattern"
diff --git a/startop/scripts/app_startup/parse_metrics b/startop/scripts/app_startup/parse_metrics
index c6bf08e..036609f 100755
--- a/startop/scripts/app_startup/parse_metrics
+++ b/startop/scripts/app_startup/parse_metrics
@@ -50,7 +50,7 @@
package=""
activity=""
-timeout=10
+timeout=5
simulate="n"
parse_arguments() {
while [[ $# -gt 0 ]]; do
@@ -123,6 +123,9 @@
local pattern="$2"
local re_pattern="$3"
local retcode
+ local result
+ local sec
+ local ms
# parse logcat for 'Displayed...' and that other one...
@@ -137,14 +140,28 @@
return 0
fi
- logcat_extract_pattern "$timeout" "$timestamp" "$pattern" "$re_pattern"
+ result="$(logcat_extract_pattern "$timeout" "$timestamp" "$pattern" "$re_pattern")"
retcode=$?
if [[ $retcode -ne 0 ]]; then
# Timed out before finding the pattern. Could also mean the pattern is wrong.
+ echo "Parse $re_pattern from logcat TIMED OUT after $timeout seconds." >&2
echo "-$?"
+ return $retcode
fi
+ # "10s123ms" -> "10s123"
+ result=${result/ms/}
+ if [[ $result =~ s ]]; then
+ ms=${result/*s/}
+ sec=${result/s*/}
+ else
+ sec=0
+ ms=$result
+ fi
+ ((result=sec*1000+ms))
+
+ echo "$result"
return $retcode
}
@@ -169,10 +186,17 @@
# 05-06 14:34:08.854 29460 29481 I ActivityTaskManager: Displayed com.google.android.dialer/.extensions.GoogleDialtactsActivity: +361ms
pattern="ActivityTaskManager: Displayed ${package}"
-re_pattern='.*Displayed[[:blank:]]\+'"${package}"'[/][^[:blank:]]\+[[:blank:]]+\([[:digit:]]\+\).*'
+re_pattern='.*Displayed[[:blank:]]\+'"${package}"'[/][^[:blank:]]\+[[:blank:]]+\([[:digit:]]\+ms\|[[:digit:]]\+s[[:digit:]]\+ms\).*'
parse_metric_from_logcat "Displayed_ms" "$pattern" "$re_pattern"
+# 01-16 17:31:44.550 11172 11204 I ActivityTaskManager: Fully drawn com.google.android.GoogleCamera/com.android.camera.CameraLauncher: +10s897ms
+pattern="ActivityTaskManager: Fully drawn ${package}"
+#re_pattern='.*Fully drawn[[:blank:]]\+'"${package}"'[/][^[:blank:]]\+[[:blank:]]+\([[:digit:]]\+\).*'
+re_pattern='.*Fully drawn[[:blank:]]\+'"${package}"'[/][^[:blank:]]\+[[:blank:]]+\([[:digit:]]\+ms\|[[:digit:]]\+s[[:digit:]]\+ms\).*'
+
+parse_metric_from_logcat "Fully_drawn_ms" "$pattern" "$re_pattern"
+
# also call into package-specific scripts if there are additional metrics
if [[ -x "$DIR/metrics/$package" ]]; then
source "$DIR/metrics/$package" "$timestamp"
diff --git a/telecomm/java/android/telecom/Call.java b/telecomm/java/android/telecom/Call.java
index acf51f3..f54f8d1 100644
--- a/telecomm/java/android/telecom/Call.java
+++ b/telecomm/java/android/telecom/Call.java
@@ -265,6 +265,29 @@
public static final String EVENT_HANDOVER_FAILED =
"android.telecom.event.HANDOVER_FAILED";
+
+ /**
+ * Reject reason used with {@link #reject(int)} to indicate that the user is rejecting this
+ * call because they have declined to answer it. This typically means that they are unable
+ * to answer the call at this time and would prefer it be sent to voicemail.
+ */
+ public static final int REJECT_REASON_DECLINED = 1;
+
+ /**
+ * Reject reason used with {@link #reject(int)} to indicate that the user is rejecting this
+ * call because it is an unwanted call. This allows the user to indicate that they are
+ * rejecting a call because it is likely a nuisance call.
+ */
+ public static final int REJECT_REASON_UNWANTED = 2;
+
+ /**
+ * @hide
+ */
+ @IntDef(prefix = { "REJECT_REASON_" },
+ value = {REJECT_REASON_DECLINED, REJECT_REASON_UNWANTED})
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface RejectReason {};
+
public static class Details {
/** @hide */
@Retention(RetentionPolicy.SOURCE)
@@ -1520,6 +1543,16 @@
}
/**
+ * Instructs the {@link ConnectionService} providing this {@link #STATE_RINGING} call that the
+ * user has chosen to reject the call and has indicated a reason why the call is being rejected.
+ *
+ * @param rejectReason the reason the call is being rejected.
+ */
+ public void reject(@RejectReason int rejectReason) {
+ mInCallAdapter.rejectCall(mTelecomCallId, rejectReason);
+ }
+
+ /**
* Instructs this {@code Call} to disconnect.
*/
public void disconnect() {
diff --git a/telecomm/java/android/telecom/Connection.java b/telecomm/java/android/telecom/Connection.java
index c934625..72c66d2 100644
--- a/telecomm/java/android/telecom/Connection.java
+++ b/telecomm/java/android/telecom/Connection.java
@@ -3037,6 +3037,17 @@
public void onReject() {}
/**
+ * Notifies this Connection, which is in {@link #STATE_RINGING}, of a request to reject.
+ * <p>
+ * For managed {@link ConnectionService}s, this will be called when the user rejects a call via
+ * the default dialer's {@link InCallService} using {@link Call#reject(int)}.
+ * @param rejectReason the reason the user provided for rejecting the call.
+ */
+ public void onReject(@android.telecom.Call.RejectReason int rejectReason) {
+ // to be implemented by ConnectionService.
+ }
+
+ /**
* Notifies this Connection, which is in {@link #STATE_RINGING}, of
* a request to reject with a message.
*/
diff --git a/telecomm/java/android/telecom/ConnectionService.java b/telecomm/java/android/telecom/ConnectionService.java
index 440f044..00c2918 100644
--- a/telecomm/java/android/telecom/ConnectionService.java
+++ b/telecomm/java/android/telecom/ConnectionService.java
@@ -194,6 +194,7 @@
private static final int MSG_CREATE_CONFERENCE = 35;
private static final int MSG_CREATE_CONFERENCE_COMPLETE = 36;
private static final int MSG_CREATE_CONFERENCE_FAILED = 37;
+ private static final int MSG_REJECT_WITH_REASON = 38;
private static Connection sNullConnection;
@@ -450,6 +451,21 @@
}
@Override
+ public void rejectWithReason(String callId,
+ @android.telecom.Call.RejectReason int rejectReason, Session.Info sessionInfo) {
+ Log.startSession(sessionInfo, SESSION_REJECT);
+ try {
+ SomeArgs args = SomeArgs.obtain();
+ args.arg1 = callId;
+ args.argi1 = rejectReason;
+ args.arg2 = Log.createSubsession();
+ mHandler.obtainMessage(MSG_REJECT_WITH_REASON, args).sendToTarget();
+ } finally {
+ Log.endSession();
+ }
+ }
+
+ @Override
public void rejectWithMessage(String callId, String message, Session.Info sessionInfo) {
Log.startSession(sessionInfo, SESSION_REJECT_MESSAGE);
try {
@@ -1053,6 +1069,17 @@
}
break;
}
+ case MSG_REJECT_WITH_REASON: {
+ SomeArgs args = (SomeArgs) msg.obj;
+ Log.continueSession((Session) args.arg2, SESSION_HANDLER + SESSION_REJECT);
+ try {
+ reject((String) args.arg1, args.argi1);
+ } finally {
+ args.recycle();
+ Log.endSession();
+ }
+ break;
+ }
case MSG_REJECT_WITH_MESSAGE: {
SomeArgs args = (SomeArgs) msg.obj;
Log.continueSession((Session) args.arg3,
@@ -1981,6 +2008,11 @@
findConnectionForAction(callId, "reject").onReject(rejectWithMessage);
}
+ private void reject(String callId, @android.telecom.Call.RejectReason int rejectReason) {
+ Log.d(this, "reject %s with reason %d", callId, rejectReason);
+ findConnectionForAction(callId, "reject").onReject(rejectReason);
+ }
+
private void silence(String callId) {
Log.d(this, "silence %s", callId);
findConnectionForAction(callId, "silence").onSilence();
diff --git a/telecomm/java/android/telecom/InCallAdapter.java b/telecomm/java/android/telecom/InCallAdapter.java
index 2612468..594c1eb 100644
--- a/telecomm/java/android/telecom/InCallAdapter.java
+++ b/telecomm/java/android/telecom/InCallAdapter.java
@@ -89,6 +89,19 @@
}
/**
+ * Instructs Telecom to reject the specified call.
+ *
+ * @param callId The identifier of the call to reject.
+ * @param rejectReason The reason the call was rejected.
+ */
+ public void rejectCall(String callId, @Call.RejectReason int rejectReason) {
+ try {
+ mAdapter.rejectCallWithReason(callId, rejectReason);
+ } catch (RemoteException e) {
+ }
+ }
+
+ /**
* Instructs Telecom to disconnect the specified call.
*
* @param callId The identifier of the call to disconnect.
diff --git a/telecomm/java/com/android/internal/telecom/IConnectionService.aidl b/telecomm/java/com/android/internal/telecom/IConnectionService.aidl
index 96f2483..4249dff 100644
--- a/telecomm/java/com/android/internal/telecom/IConnectionService.aidl
+++ b/telecomm/java/com/android/internal/telecom/IConnectionService.aidl
@@ -77,6 +77,8 @@
void reject(String callId, in Session.Info sessionInfo);
+ void rejectWithReason(String callId, int rejectReason, in Session.Info sessionInfo);
+
void rejectWithMessage(String callId, String message, in Session.Info sessionInfo);
void disconnect(String callId, in Session.Info sessionInfo);
diff --git a/telecomm/java/com/android/internal/telecom/IInCallAdapter.aidl b/telecomm/java/com/android/internal/telecom/IInCallAdapter.aidl
index 60745e4..eb2d714 100644
--- a/telecomm/java/com/android/internal/telecom/IInCallAdapter.aidl
+++ b/telecomm/java/com/android/internal/telecom/IInCallAdapter.aidl
@@ -34,6 +34,8 @@
void rejectCall(String callId, boolean rejectWithMessage, String textMessage);
+ void rejectCallWithReason(String callId, int rejectReason);
+
void disconnectCall(String callId);
void holdCall(String callId);
diff --git a/telephony/common/com/android/internal/telephony/SmsApplication.java b/telephony/common/com/android/internal/telephony/SmsApplication.java
index 32f9d53..a679a71 100644
--- a/telephony/common/com/android/internal/telephony/SmsApplication.java
+++ b/telephony/common/com/android/internal/telephony/SmsApplication.java
@@ -35,7 +35,6 @@
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Binder;
-import android.os.Debug;
import android.os.Process;
import android.os.UserHandle;
import android.provider.Telephony;
@@ -45,8 +44,6 @@
import android.util.Log;
import com.android.internal.annotations.VisibleForTesting;
-import com.android.internal.logging.MetricsLogger;
-import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import java.util.Collection;
import java.util.HashMap;
@@ -197,7 +194,7 @@
final int callingUid = Binder.getCallingUid();
if (DEBUG_MULTIUSER) {
Log.i(LOG_TAG, "getIncomingUserHandle caller=" + callingUid + ", myuid="
- + android.os.Process.myUid() + "\n\t" + Debug.getCallers(4));
+ + android.os.Process.myUid());
}
if (UserHandle.getAppId(callingUid)
< android.os.Process.FIRST_APPLICATION_UID) {
@@ -726,11 +723,6 @@
new Intent(Intents.ACTION_DEFAULT_SMS_PACKAGE_CHANGED_INTERNAL);
context.sendBroadcastAsUser(intent, userHandle,
permission.MONITOR_DEFAULT_SMS_PACKAGE);
-
- if (applicationData != null) {
- MetricsLogger.action(context, MetricsEvent.ACTION_DEFAULT_SMS_APP_CHANGED,
- applicationData.mPackageName);
- }
}
/**
diff --git a/telephony/common/com/android/internal/telephony/TelephonyPermissions.java b/telephony/common/com/android/internal/telephony/TelephonyPermissions.java
index 89cd461..7b3aace7 100644
--- a/telephony/common/com/android/internal/telephony/TelephonyPermissions.java
+++ b/telephony/common/com/android/internal/telephony/TelephonyPermissions.java
@@ -31,7 +31,6 @@
import android.telephony.SubscriptionManager;
import android.telephony.TelephonyManager;
import android.util.Log;
-import android.util.StatsLog;
import com.android.internal.annotations.VisibleForTesting;
@@ -393,8 +392,8 @@
invokedMethods = sReportedDeviceIDPackages.get(callingPackage);
}
invokedMethods.add(message);
- StatsLog.write(StatsLog.DEVICE_IDENTIFIER_ACCESS_DENIED, callingPackage, message,
- isPreinstalled, false);
+ TelephonyCommonStatsLog.write(TelephonyCommonStatsLog.DEVICE_IDENTIFIER_ACCESS_DENIED,
+ callingPackage, message, isPreinstalled, false);
}
Log.w(LOG_TAG, "reportAccessDeniedToReadIdentifiers:" + callingPackage + ":" + message
+ ":isPreinstalled=" + isPreinstalled);
diff --git a/telephony/common/com/google/android/mms/util/DrmConvertSession.java b/telephony/common/com/google/android/mms/util/DrmConvertSession.java
index 156c7ad..17ab1547 100644
--- a/telephony/common/com/google/android/mms/util/DrmConvertSession.java
+++ b/telephony/common/com/google/android/mms/util/DrmConvertSession.java
@@ -20,7 +20,6 @@
import android.content.Context;
import android.drm.DrmConvertedStatus;
import android.drm.DrmManagerClient;
-import android.provider.Downloads;
import android.util.Log;
import java.io.FileNotFoundException;
@@ -33,6 +32,13 @@
private int mConvertSessionId;
private static final String TAG = "DrmConvertSession";
+ // These values are copied from Downloads.Impl.* for backward compatibility since
+ // {@link #close()} that uses it is marked @UnsupportedAppUsage.
+ public static final int STATUS_SUCCESS = 200;
+ public static final int STATUS_NOT_ACCEPTABLE = 406;
+ public static final int STATUS_UNKNOWN_ERROR = 491;
+ public static final int STATUS_FILE_ERROR = 492;
+
private DrmConvertSession(DrmManagerClient drmClient, int convertSessionId) {
mDrmClient = drmClient;
mConvertSessionId = convertSessionId;
@@ -118,38 +124,38 @@
* Ends a conversion session of a file.
*
* @param fileName The filename of the converted file.
- * @return Downloads.Impl.STATUS_SUCCESS if execution is ok.
- * Downloads.Impl.STATUS_FILE_ERROR in case converted file can not
- * be accessed. Downloads.Impl.STATUS_NOT_ACCEPTABLE if a problem
+ * @return STATUS_SUCCESS if execution is ok.
+ * STATUS_FILE_ERROR in case converted file can not
+ * be accessed. STATUS_NOT_ACCEPTABLE if a problem
* occurs when accessing drm framework.
- * Downloads.Impl.STATUS_UNKNOWN_ERROR if a general error occurred.
+ * STATUS_UNKNOWN_ERROR if a general error occurred.
*/
@UnsupportedAppUsage
public int close(String filename) {
DrmConvertedStatus convertedStatus = null;
- int result = Downloads.Impl.STATUS_UNKNOWN_ERROR;
+ int result = STATUS_UNKNOWN_ERROR;
if (mDrmClient != null && mConvertSessionId >= 0) {
try {
convertedStatus = mDrmClient.closeConvertSession(mConvertSessionId);
if (convertedStatus == null ||
convertedStatus.statusCode != DrmConvertedStatus.STATUS_OK ||
convertedStatus.convertedData == null) {
- result = Downloads.Impl.STATUS_NOT_ACCEPTABLE;
+ result = STATUS_NOT_ACCEPTABLE;
} else {
RandomAccessFile rndAccessFile = null;
try {
rndAccessFile = new RandomAccessFile(filename, "rw");
rndAccessFile.seek(convertedStatus.offset);
rndAccessFile.write(convertedStatus.convertedData);
- result = Downloads.Impl.STATUS_SUCCESS;
+ result = STATUS_SUCCESS;
} catch (FileNotFoundException e) {
- result = Downloads.Impl.STATUS_FILE_ERROR;
+ result = STATUS_FILE_ERROR;
Log.w(TAG, "File: " + filename + " could not be found.", e);
} catch (IOException e) {
- result = Downloads.Impl.STATUS_FILE_ERROR;
+ result = STATUS_FILE_ERROR;
Log.w(TAG, "Could not access File: " + filename + " .", e);
} catch (IllegalArgumentException e) {
- result = Downloads.Impl.STATUS_FILE_ERROR;
+ result = STATUS_FILE_ERROR;
Log.w(TAG, "Could not open file in mode: rw", e);
} catch (SecurityException e) {
Log.w(TAG, "Access to File: " + filename +
@@ -159,7 +165,7 @@
try {
rndAccessFile.close();
} catch (IOException e) {
- result = Downloads.Impl.STATUS_FILE_ERROR;
+ result = STATUS_FILE_ERROR;
Log.w(TAG, "Failed to close File:" + filename
+ ".", e);
}
diff --git a/telephony/java/android/telephony/Annotation.java b/telephony/java/android/telephony/Annotation.java
index 9e6dfef..d2a5905 100644
--- a/telephony/java/android/telephony/Annotation.java
+++ b/telephony/java/android/telephony/Annotation.java
@@ -1,6 +1,7 @@
package android.telephony;
import android.annotation.IntDef;
+import android.provider.Telephony;
import android.telecom.Connection;
import android.telephony.data.ApnSetting;
@@ -598,6 +599,48 @@
}
/**
+ * Call forwarding function status
+ */
+ @IntDef(prefix = { "STATUS_" }, value = {
+ CallForwardingInfo.STATUS_ACTIVE,
+ CallForwardingInfo.STATUS_INACTIVE,
+ CallForwardingInfo.STATUS_UNKNOWN_ERROR,
+ CallForwardingInfo.STATUS_NOT_SUPPORTED,
+ CallForwardingInfo.STATUS_FDN_CHECK_FAILURE
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface CallForwardingStatus {
+ }
+
+ /**
+ * Call forwarding reason types
+ */
+ @IntDef(flag = true, prefix = { "REASON_" }, value = {
+ CallForwardingInfo.REASON_UNCONDITIONAL,
+ CallForwardingInfo.REASON_BUSY,
+ CallForwardingInfo.REASON_NO_REPLY,
+ CallForwardingInfo.REASON_NOT_REACHABLE,
+ CallForwardingInfo.REASON_ALL,
+ CallForwardingInfo.REASON_ALL_CONDITIONAL
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface CallForwardingReason {
+ }
+
+ /**
+ * Call waiting function status
+ */
+ @IntDef(prefix = { "CALL_WAITING_STATUS_" }, value = {
+ TelephonyManager.CALL_WAITING_STATUS_ACTIVE,
+ TelephonyManager.CALL_WAITING_STATUS_INACTIVE,
+ TelephonyManager.CALL_WAITING_STATUS_NOT_SUPPORTED,
+ TelephonyManager.CALL_WAITING_STATUS_UNKNOWN_ERROR
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface CallWaitingStatus {
+ }
+
+ /**
* UICC SIM Application Types
*/
@IntDef(prefix = { "APPTYPE_" }, value = {
@@ -609,4 +652,13 @@
})
@Retention(RetentionPolicy.SOURCE)
public @interface UiccAppType{}
+
+ /** @hide */
+ @IntDef({
+ Telephony.Carriers.SKIP_464XLAT_DEFAULT,
+ Telephony.Carriers.SKIP_464XLAT_DISABLE,
+ Telephony.Carriers.SKIP_464XLAT_ENABLE,
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface Skip464XlatStatus {}
}
diff --git a/telephony/java/android/telephony/CallAttributes.java b/telephony/java/android/telephony/CallAttributes.java
index cd830ad..0c258f4 100644
--- a/telephony/java/android/telephony/CallAttributes.java
+++ b/telephony/java/android/telephony/CallAttributes.java
@@ -21,8 +21,8 @@
import android.annotation.SystemApi;
import android.os.Parcel;
import android.os.Parcelable;
-
import android.telephony.Annotation.NetworkType;
+
import java.util.Objects;
/**
@@ -130,14 +130,14 @@
/**
* {@link Parcelable#describeContents}
*/
- public @Parcelable.ContentsFlags int describeContents() {
+ public int describeContents() {
return 0;
}
/**
* {@link Parcelable#writeToParcel}
*/
- public void writeToParcel(Parcel dest, @Parcelable.WriteFlags int flags) {
+ public void writeToParcel(Parcel dest, int flags) {
dest.writeParcelable(mPreciseCallState, flags);
dest.writeInt(mNetworkType);
dest.writeParcelable(mCallQuality, flags);
diff --git a/telephony/java/android/telephony/CallForwardingInfo.aidl b/telephony/java/android/telephony/CallForwardingInfo.aidl
new file mode 100644
index 0000000..2019e07
--- /dev/null
+++ b/telephony/java/android/telephony/CallForwardingInfo.aidl
@@ -0,0 +1,19 @@
+/*
+ * 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.
+ */
+
+package android.telephony;
+
+parcelable CallForwardingInfo;
\ No newline at end of file
diff --git a/telephony/java/android/telephony/CallForwardingInfo.java b/telephony/java/android/telephony/CallForwardingInfo.java
new file mode 100644
index 0000000..33ad5e8
--- /dev/null
+++ b/telephony/java/android/telephony/CallForwardingInfo.java
@@ -0,0 +1,307 @@
+/*
+ * 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.
+ */
+
+package android.telephony;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.annotation.SuppressLint;
+import android.annotation.SystemApi;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.telephony.Annotation.CallForwardingReason;
+import android.telephony.Annotation.CallForwardingStatus;
+
+import java.util.Objects;
+
+/**
+ * Defines the call forwarding information.
+ * @hide
+ */
+@SystemApi
+public final class CallForwardingInfo implements Parcelable {
+ private static final String TAG = "CallForwardingInfo";
+
+ /**
+ * Indicates the call forwarding status is inactive.
+ *
+ * @hide
+ */
+ @SystemApi
+ public static final int STATUS_INACTIVE = 0;
+
+ /**
+ * Indicates the call forwarding status is active.
+ *
+ * @hide
+ */
+ @SystemApi
+ public static final int STATUS_ACTIVE = 1;
+
+ /**
+ * Indicates the call forwarding could not be enabled because the recipient is not on
+ * Fixed Dialing Number (FDN) list.
+ *
+ * @hide
+ */
+ @SystemApi
+ public static final int STATUS_FDN_CHECK_FAILURE = 2;
+
+ /**
+ * Indicates the call forwarding status is with an unknown error.
+ *
+ * @hide
+ */
+ @SystemApi
+ public static final int STATUS_UNKNOWN_ERROR = 3;
+
+ /**
+ * Indicates the call forwarding is not supported (e.g. called via CDMA).
+ *
+ * @hide
+ */
+ @SystemApi
+ public static final int STATUS_NOT_SUPPORTED = 4;
+
+ /**
+ * Indicates the call forwarding reason is "unconditional".
+ * Reference: 3GPP TS 27.007 version 10.3.0 Release 10 - 7.11 Call forwarding number
+ * and conditions +CCFC
+ * @hide
+ */
+ @SystemApi
+ public static final int REASON_UNCONDITIONAL = 0;
+
+ /**
+ * Indicates the call forwarding status is "busy".
+ * Reference: 3GPP TS 27.007 version 10.3.0 Release 10 - 7.11 Call forwarding number
+ * and conditions +CCFC
+ * @hide
+ */
+ @SystemApi
+ public static final int REASON_BUSY = 1;
+
+ /**
+ * Indicates the call forwarding reason is "no reply".
+ * Reference: 3GPP TS 27.007 version 10.3.0 Release 10 - 7.11 Call forwarding number
+ * and conditions +CCFC
+ * @hide
+ */
+ @SystemApi
+ public static final int REASON_NO_REPLY = 2;
+
+ /**
+ * Indicates the call forwarding reason is "not reachable".
+ * Reference: 3GPP TS 27.007 version 10.3.0 Release 10 - 7.11 Call forwarding number
+ * and conditions +CCFC
+ * @hide
+ */
+ @SystemApi
+ public static final int REASON_NOT_REACHABLE = 3;
+
+ /**
+ * Indicates the call forwarding reason is "all", for setting all call forwarding reasons
+ * simultaneously (unconditional, busy, no reply, and not reachable).
+ * Reference: 3GPP TS 27.007 version 10.3.0 Release 10 - 7.11 Call forwarding number
+ * and conditions +CCFC
+ * @hide
+ */
+ @SystemApi
+ public static final int REASON_ALL = 4;
+
+ /**
+ * Indicates the call forwarding reason is "all_conditional", for setting all conditional call
+ * forwarding reasons simultaneously (busy, no reply, and not reachable).
+ * Reference: 3GPP TS 27.007 version 10.3.0 Release 10 - 7.11 Call forwarding number
+ * and conditions +CCFC
+ * @hide
+ */
+ @SystemApi
+ public static final int REASON_ALL_CONDITIONAL = 5;
+
+ /**
+ * The call forwarding status.
+ */
+ private @CallForwardingStatus int mStatus;
+
+ /**
+ * The call forwarding reason indicates the condition under which calls will be forwarded.
+ * Reference: 3GPP TS 27.007 version 10.3.0 Release 10 - 7.11 Call forwarding number
+ * and conditions +CCFC
+ */
+ private @CallForwardingReason int mReason;
+
+ /**
+ * The phone number to which calls will be forwarded.
+ * Reference: 3GPP TS 27.007 version 10.3.0 Release 10 - 7.11 Call forwarding number
+ * and conditions +CCFC
+ */
+ private String mNumber;
+
+ /**
+ * Gets the timeout (in seconds) before the forwarding is attempted.
+ */
+ private int mTimeSeconds;
+
+ /**
+ * Construct a CallForwardingInfo.
+ *
+ * @param status the call forwarding status
+ * @param reason the call forwarding reason
+ * @param number the phone number to which calls will be forwarded
+ * @param timeSeconds the timeout (in seconds) before the forwarding is attempted
+ * @hide
+ */
+ @SystemApi
+ public CallForwardingInfo(@CallForwardingStatus int status, @CallForwardingReason int reason,
+ @Nullable String number, int timeSeconds) {
+ mStatus = status;
+ mReason = reason;
+ mNumber = number;
+ mTimeSeconds = timeSeconds;
+ }
+
+ /**
+ * Returns the call forwarding status.
+ *
+ * @return the call forwarding status.
+ *
+ * @hide
+ */
+ @SystemApi
+ public @CallForwardingStatus int getStatus() {
+ return mStatus;
+ }
+
+ /**
+ * Returns the call forwarding reason. The call forwarding reason indicates the condition
+ * under which calls will be forwarded. For example, {@link #REASON_NO_REPLY} indicates
+ * that calls will be forward to {@link #getNumber()} when the user fails to answer the call.
+ *
+ * @return the call forwarding reason.
+ *
+ * @hide
+ */
+ @SystemApi
+ public @CallForwardingReason int getReason() {
+ return mReason;
+ }
+
+ /**
+ * Returns the phone number to which calls will be forwarded.
+ *
+ * @return the number calls will be forwarded to, or {@code null} if call forwarding
+ * is being disabled.
+ *
+ * @hide
+ */
+ @SystemApi
+ @Nullable
+ public String getNumber() {
+ return mNumber;
+ }
+
+ /**
+ * Gets the timeout (in seconds) before the forwarding is attempted. For example,
+ * if {@link #REASON_NO_REPLY} is the call forwarding reason, the device will wait this
+ * duration of time before forwarding the call to {@link #getNumber()}.
+ *
+ * Reference: 3GPP TS 27.007 version 10.3.0 Release 10
+ * 7.11 Call forwarding number and conditions +CCFC
+ *
+ * @return the timeout (in seconds) before the forwarding is attempted.
+ *
+ * @hide
+ */
+ @SystemApi
+ @SuppressLint("MethodNameUnits")
+ public int getTimeoutSeconds() {
+ return mTimeSeconds;
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ /**
+ * @hide
+ */
+ @Override
+ public void writeToParcel(Parcel out, int flags) {
+ out.writeString(mNumber);
+ out.writeInt(mStatus);
+ out.writeInt(mReason);
+ out.writeInt(mTimeSeconds);
+ }
+
+ private CallForwardingInfo(Parcel in) {
+ mNumber = in.readString();
+ mStatus = in.readInt();
+ mReason = in.readInt();
+ mTimeSeconds = in.readInt();
+ }
+
+ /**
+ * @hide
+ */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+
+ if (!(o instanceof CallForwardingInfo)) {
+ return false;
+ }
+
+ CallForwardingInfo other = (CallForwardingInfo) o;
+ return mStatus == other.mStatus
+ && mNumber == other.mNumber
+ && mReason == other.mReason
+ && mTimeSeconds == other.mTimeSeconds;
+ }
+
+ /**
+ * @hide
+ */
+ @Override
+ public int hashCode() {
+ return Objects.hash(mStatus, mNumber, mReason, mTimeSeconds);
+ }
+
+ public static final @NonNull Parcelable.Creator<CallForwardingInfo> CREATOR =
+ new Parcelable.Creator<CallForwardingInfo>() {
+ @Override
+ public CallForwardingInfo createFromParcel(Parcel in) {
+ return new CallForwardingInfo(in);
+ }
+
+ @Override
+ public CallForwardingInfo[] newArray(int size) {
+ return new CallForwardingInfo[size];
+ }
+ };
+
+ /**
+ * @hide
+ */
+ @Override
+ public String toString() {
+ return "[CallForwardingInfo: status=" + mStatus
+ + ", reason= " + mReason
+ + ", timeSec= " + mTimeSeconds + " seconds"
+ + ", number=" + Rlog.pii(TAG, mNumber) + "]";
+ }
+}
diff --git a/telephony/java/android/telephony/CallQuality.java b/telephony/java/android/telephony/CallQuality.java
index 1e1cdba..428a515 100644
--- a/telephony/java/android/telephony/CallQuality.java
+++ b/telephony/java/android/telephony/CallQuality.java
@@ -400,14 +400,14 @@
/**
* {@link Parcelable#describeContents}
*/
- public @Parcelable.ContentsFlags int describeContents() {
+ public int describeContents() {
return 0;
}
/**
* {@link Parcelable#writeToParcel}
*/
- public void writeToParcel(Parcel dest, @Parcelable.WriteFlags int flags) {
+ public void writeToParcel(Parcel dest, int flags) {
dest.writeInt(mDownlinkCallQualityLevel);
dest.writeInt(mUplinkCallQualityLevel);
dest.writeInt(mCallDuration);
diff --git a/telephony/java/android/telephony/PhoneCapability.java b/telephony/java/android/telephony/PhoneCapability.java
index 90244b3..70931fb 100644
--- a/telephony/java/android/telephony/PhoneCapability.java
+++ b/telephony/java/android/telephony/PhoneCapability.java
@@ -429,14 +429,14 @@
/**
* {@link Parcelable#describeContents}
*/
- public @Parcelable.ContentsFlags int describeContents() {
+ public int describeContents() {
return 0;
}
/**
* {@link Parcelable#writeToParcel}
*/
- public void writeToParcel(@NonNull Parcel dest, @Parcelable.WriteFlags int flags) {
+ public void writeToParcel(@NonNull Parcel dest, int flags) {
dest.writeInt(mUtranUeCategoryDl);
dest.writeInt(mUtranUeCategoryUl);
dest.writeInt(mEutranUeCategoryDl);
diff --git a/telephony/java/android/telephony/SimSlotCapability.java b/telephony/java/android/telephony/SimSlotCapability.java
index 3d38d04..b4fef46 100644
--- a/telephony/java/android/telephony/SimSlotCapability.java
+++ b/telephony/java/android/telephony/SimSlotCapability.java
@@ -105,14 +105,14 @@
/**
* {@link Parcelable#describeContents}
*/
- public @ContentsFlags int describeContents() {
+ public int describeContents() {
return 0;
}
/**
* {@link Parcelable#writeToParcel}
*/
- public void writeToParcel(@NonNull Parcel dest, @WriteFlags int flags) {
+ public void writeToParcel(@NonNull Parcel dest, int flags) {
dest.writeInt(mPhysicalSlotIndex);
dest.writeInt(mSlotType);
}
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 86913a6..ba28006 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -69,7 +69,9 @@
import android.telecom.PhoneAccountHandle;
import android.telecom.TelecomManager;
import android.telephony.Annotation.ApnType;
+import android.telephony.Annotation.CallForwardingReason;
import android.telephony.Annotation.CallState;
+import android.telephony.Annotation.CallWaitingStatus;
import android.telephony.Annotation.NetworkType;
import android.telephony.Annotation.RadioPowerState;
import android.telephony.Annotation.SimActivationState;
@@ -5638,13 +5640,6 @@
//
/**
- * To check the SDK version for {@link TelephonyManager#listen}.
- */
- @ChangeId
- @EnabledAfter(targetSdkVersion = Build.VERSION_CODES.P)
- private static final long LISTEN_CODE_CHANGE = 147600208L;
-
- /**
* Registers a listener object to receive notification of changes
* in specified telephony states.
* <p>
@@ -5681,19 +5676,7 @@
(TelephonyRegistryManager)
mContext.getSystemService(Context.TELEPHONY_REGISTRY_SERVICE);
if (telephonyRegistry != null) {
- // subId from PhoneStateListener is deprecated Q on forward, use the subId from
- // TelephonyManager instance. keep using subId from PhoneStateListener for pre-Q.
- int subId = mSubId;
- if (Compatibility.isChangeEnabled(LISTEN_CODE_CHANGE)) {
- // since mSubId in PhoneStateListener is deprecated from Q on forward, this is
- // the only place to set mSubId and its for "informational" only.
- // TODO: remove this once we completely get rid of mSubId in PhoneStateListener
- listener.mSubId = (events == PhoneStateListener.LISTEN_NONE)
- ? SubscriptionManager.INVALID_SUBSCRIPTION_ID : subId;
- } else if (listener.mSubId != null) {
- subId = listener.mSubId;
- }
- telephonyRegistry.listenForSubscriber(subId, getOpPackageName(), getFeatureId(),
+ telephonyRegistry.listenForSubscriber(mSubId, getOpPackageName(), getFeatureId(),
listener, events, notifyNow);
} else {
Rlog.w(TAG, "telephony registry not ready.");
@@ -12765,6 +12748,191 @@
}
/**
+ * Gets the voice call forwarding info {@link CallForwardingInfo}, given the call forward
+ * reason.
+ *
+ * @param callForwardingReason the call forwarding reasons
+ *
+ * @throws IllegalArgumentException if callForwardingReason is not any of
+ * {@link CallForwardingInfo.REASON_UNCONDITIONAL}, {@link CallForwardingInfo.REASON_BUSY},
+ * {@link CallForwardingInfo.REASON_NO_REPLY}, {@link CallForwardingInfo.REASON_NOT_REACHABLE},
+ * {@link CallForwardingInfo.REASON_ALL}, {@link CallForwardingInfo.REASON_ALL_CONDITIONAL}
+ *
+ * @return {@link CallForwardingInfo} with the status {@link CallForwardingInfo#STATUS_ACTIVE}
+ * or {@link CallForwardingInfo#STATUS_INACTIVE} and the target phone number to forward calls
+ * to, if it's available. Otherwise, it will return a {@link CallForwardingInfo} with status
+ * {@link CallForwardingInfo#STATUS_UNKNOWN_ERROR},
+ * {@link CallForwardingInfo#STATUS_NOT_SUPPORTED},
+ * or {@link CallForwardingInfo#STATUS_FDN_CHECK_FAILURE} depending on the situation.
+ *
+ * @hide
+ */
+ @SystemApi
+ @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
+ @NonNull
+ public CallForwardingInfo getCallForwarding(@CallForwardingReason int callForwardingReason) {
+ if (callForwardingReason < CallForwardingInfo.REASON_UNCONDITIONAL
+ || callForwardingReason > CallForwardingInfo.REASON_ALL_CONDITIONAL) {
+ throw new IllegalArgumentException("callForwardingReason is out of range");
+ }
+ try {
+ ITelephony telephony = getITelephony();
+ if (telephony != null) {
+ return telephony.getCallForwarding(getSubId(), callForwardingReason);
+ }
+ } catch (RemoteException ex) {
+ Rlog.e(TAG, "getCallForwarding RemoteException", ex);
+ } catch (NullPointerException ex) {
+ Rlog.e(TAG, "getCallForwarding NPE", ex);
+ }
+ return new CallForwardingInfo(
+ CallForwardingInfo.STATUS_UNKNOWN_ERROR, 0 /* reason */, null /* number */,
+ 0 /* timeout */);
+ }
+
+ /**
+ * Sets the voice call forwarding info including status (enable/disable), call forwarding
+ * reason, the number to forward, and the timeout before the forwarding is attempted.
+ *
+ * @param callForwardingInfo {@link CallForwardingInfo} to setup the call forwarding.
+ * Enabling if {@link CallForwardingInfo#getStatus()} returns
+ * {@link CallForwardingInfo#STATUS_ACTIVE}; Disabling if
+ * {@link CallForwardingInfo#getStatus()} returns {@link CallForwardingInfo#STATUS_INACTIVE}.
+ *
+ * @throws IllegalArgumentException if any of the following for parameter callForwardingInfo:
+ * 0) it is {@code null}.
+ * 1) {@link CallForwardingInfo#getStatus()} returns neither
+ * {@link CallForwardingInfo#STATUS_ACTIVE} nor {@link CallForwardingInfo#STATUS_INACTIVE}.
+ * 2) {@link CallForwardingInfo#getReason()} is not any of
+ * {@link CallForwardingInfo.REASON_UNCONDITIONAL}, {@link CallForwardingInfo.REASON_BUSY},
+ * {@link CallForwardingInfo.REASON_NO_REPLY}, {@link CallForwardingInfo.REASON_NOT_REACHABLE},
+ * {@link CallForwardingInfo.REASON_ALL}, {@link CallForwardingInfo.REASON_ALL_CONDITIONAL}
+ * 3) {@link CallForwardingInfo#getNumber()} returns {@code null}.
+ * 4) {@link CallForwardingInfo#getTimeoutSeconds()} doesn't return a positive value.
+ *
+ * @return {@code true} to indicate it was set successfully; {@code false} otherwise.
+ *
+ * @hide
+ */
+ @SystemApi
+ @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
+ public boolean setCallForwarding(@NonNull CallForwardingInfo callForwardingInfo) {
+ if (callForwardingInfo == null) {
+ throw new IllegalArgumentException("callForwardingInfo is null");
+ }
+ int callForwardingStatus = callForwardingInfo.getStatus();
+ if (callForwardingStatus != CallForwardingInfo.STATUS_ACTIVE
+ && callForwardingStatus != CallForwardingInfo.STATUS_INACTIVE) {
+ throw new IllegalArgumentException(
+ "callForwardingStatus is neither active nor inactive");
+ }
+ int callForwardingReason = callForwardingInfo.getReason();
+ if (callForwardingReason < CallForwardingInfo.REASON_UNCONDITIONAL
+ || callForwardingReason > CallForwardingInfo.REASON_ALL_CONDITIONAL) {
+ throw new IllegalArgumentException("callForwardingReason is out of range");
+ }
+ if (callForwardingInfo.getNumber() == null) {
+ throw new IllegalArgumentException("callForwarding number is null");
+ }
+ if (callForwardingInfo.getTimeoutSeconds() <= 0) {
+ throw new IllegalArgumentException("callForwarding timeout isn't positive");
+ }
+ try {
+ ITelephony telephony = getITelephony();
+ if (telephony != null) {
+ return telephony.setCallForwarding(getSubId(), callForwardingInfo);
+ }
+ } catch (RemoteException ex) {
+ Rlog.e(TAG, "setCallForwarding RemoteException", ex);
+ } catch (NullPointerException ex) {
+ Rlog.e(TAG, "setCallForwarding NPE", ex);
+ }
+ return false;
+ }
+
+ /**
+ * Indicates the call waiting status is active.
+ *
+ * @hide
+ */
+ @SystemApi
+ public static final int CALL_WAITING_STATUS_ACTIVE = 1;
+
+ /**
+ * Indicates the call waiting status is inactive.
+ *
+ * @hide
+ */
+ @SystemApi
+ public static final int CALL_WAITING_STATUS_INACTIVE = 2;
+
+ /**
+ * Indicates the call waiting status is with an unknown error.
+ *
+ * @hide
+ */
+ @SystemApi
+ public static final int CALL_WAITING_STATUS_UNKNOWN_ERROR = 3;
+
+ /**
+ * Indicates the call waiting is not supported (e.g. called via CDMA).
+ *
+ * @hide
+ */
+ @SystemApi
+ public static final int CALL_WAITING_STATUS_NOT_SUPPORTED = 4;
+
+ /**
+ * Gets the status of voice call waiting function. Call waiting function enables the waiting
+ * for the incoming call when it reaches the user who is busy to make another call and allows
+ * users to decide whether to switch to the incoming call.
+ *
+ * @return the status of call waiting function.
+ * @hide
+ */
+ @SystemApi
+ @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
+ public @CallWaitingStatus int getCallWaitingStatus() {
+ try {
+ ITelephony telephony = getITelephony();
+ if (telephony != null) {
+ return telephony.getCallWaitingStatus(getSubId());
+ }
+ } catch (RemoteException ex) {
+ Rlog.e(TAG, "getCallWaitingStatus RemoteException", ex);
+ } catch (NullPointerException ex) {
+ Rlog.e(TAG, "getCallWaitingStatus NPE", ex);
+ }
+ return CALL_WAITING_STATUS_UNKNOWN_ERROR;
+ }
+
+ /**
+ * Sets the status for voice call waiting function. Call waiting function enables the waiting
+ * for the incoming call when it reaches the user who is busy to make another call and allows
+ * users to decide whether to switch to the incoming call.
+ *
+ * @param isEnable {@code true} to enable; {@code false} to disable.
+ * @return {@code true} to indicate it was set successfully; {@code false} otherwise.
+ *
+ * @hide
+ */
+ @SystemApi
+ @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
+ public boolean setCallWaitingStatus(boolean isEnable) {
+ try {
+ ITelephony telephony = getITelephony();
+ if (telephony != null) {
+ return telephony.setCallWaitingStatus(getSubId(), isEnable);
+ }
+ } catch (RemoteException ex) {
+ Rlog.e(TAG, "setCallWaitingStatus RemoteException", ex);
+ } catch (NullPointerException ex) {
+ Rlog.e(TAG, "setCallWaitingStatus NPE", ex);
+ }
+ return false;
+ }
+
+ /**
* Set allowing mobile data during voice call. This is used for allowing data on the non-default
* data SIM. When a voice call is placed on the non-default data SIM on DSDS devices, users will
* not be able to use mobile data. By calling this API, data will be temporarily enabled on the
diff --git a/telephony/java/android/telephony/data/ApnSetting.java b/telephony/java/android/telephony/data/ApnSetting.java
index 7896320..f5dfacc6 100644
--- a/telephony/java/android/telephony/data/ApnSetting.java
+++ b/telephony/java/android/telephony/data/ApnSetting.java
@@ -27,6 +27,7 @@
import android.os.Parcelable;
import android.provider.Telephony;
import android.provider.Telephony.Carriers;
+import android.telephony.Annotation;
import android.telephony.Annotation.ApnType;
import android.telephony.Annotation.NetworkType;
import android.telephony.ServiceState;
@@ -744,7 +745,7 @@
* @return SKIP_464XLAT_DEFAULT, SKIP_464XLAT_DISABLE or SKIP_464XLAT_ENABLE
* @hide
*/
- @Carriers.Skip464XlatStatus
+ @Annotation.Skip464XlatStatus
public int getSkip464Xlat() {
return mSkip464Xlat;
}
@@ -2061,10 +2062,10 @@
/**
* Sets skip464xlat flag for this APN.
*
- * @param skip464xlat skip464xlat for this APN
+ * @param skip464xlat skip464xlat for this APN.
* @hide
*/
- public Builder setSkip464Xlat(@Carriers.Skip464XlatStatus int skip464xlat) {
+ public Builder setSkip464Xlat(@Annotation.Skip464XlatStatus int skip464xlat) {
this.mSkip464Xlat = skip464xlat;
return this;
}
diff --git a/telephony/java/android/telephony/ims/feature/MmTelFeature.java b/telephony/java/android/telephony/ims/feature/MmTelFeature.java
index a3ce1b5..7ff8735 100644
--- a/telephony/java/android/telephony/ims/feature/MmTelFeature.java
+++ b/telephony/java/android/telephony/ims/feature/MmTelFeature.java
@@ -259,10 +259,7 @@
super(capabilities);
}
- /**
- * @hide
- */
- @SystemApi @TestApi
+ /** @hide */
@IntDef(flag = true,
value = {
CAPABILITY_TYPE_VOICE,
@@ -396,10 +393,7 @@
@SystemApi @TestApi
public static final int PROCESS_CALL_CSFB = 1;
- /**
- * @hide
- */
- @SystemApi @TestApi
+ /** @hide */
@IntDef(flag = true,
value = {
PROCESS_CALL_IMS,
diff --git a/telephony/java/android/telephony/ims/stub/ImsCallSessionImplBase.java b/telephony/java/android/telephony/ims/stub/ImsCallSessionImplBase.java
index f4367da..e8f69ea 100644
--- a/telephony/java/android/telephony/ims/stub/ImsCallSessionImplBase.java
+++ b/telephony/java/android/telephony/ims/stub/ImsCallSessionImplBase.java
@@ -410,6 +410,13 @@
* Rejects an incoming call or session update.
*
* @param reason reason code to reject an incoming call, defined in {@link ImsReasonInfo}.
+ * The {@link android.telecom.InCallService} (dialer app) can use the
+ * {@link android.telecom.Call#reject(int)} API to reject a call while specifying
+ * a user-indicated reason for rejecting the call.
+ * Normal call declines ({@link android.telecom.Call#REJECT_REASON_DECLINED}) will
+ * map to {@link ImsReasonInfo#CODE_USER_DECLINE}.
+ * Unwanted calls ({@link android.telecom.Call#REJECT_REASON_UNWANTED}) will map
+ * to {@link ImsReasonInfo#CODE_SIP_USER_MARKED_UNWANTED}.
* {@link ImsCallSession.Listener#callSessionStartFailed}
*/
public void reject(int reason) {
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index 3f573c9..beb3c8c 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -29,6 +29,7 @@
import android.service.carrier.CarrierIdentifier;
import android.telecom.PhoneAccount;
import android.telecom.PhoneAccountHandle;
+import android.telephony.CallForwardingInfo;
import android.telephony.CarrierRestrictionRules;
import android.telephony.CellIdentity;
import android.telephony.CellInfo;
@@ -1633,6 +1634,79 @@
NetworkStats getVtDataUsage(int subId, boolean perUidStats);
/**
+ * Gets the voice call forwarding info {@link CallForwardingInfo}, given the call forward
+ * reason.
+ *
+ * @param callForwardingReason the call forwarding reasons which are the bitwise-OR combination
+ * of the following constants:
+ * <ol>
+ * <li>{@link CallForwardingInfo#REASON_BUSY} </li>
+ * <li>{@link CallForwardingInfo#REASON_NO_REPLY} </li>
+ * <li>{@link CallForwardingInfo#REASON_NOT_REACHABLE} </li>
+ * </ol>
+ *
+ * @throws IllegalArgumentException if callForwardingReason is not a bitwise-OR combination
+ * of {@link CallForwardingInfo.REASON_BUSY}, {@link CallForwardingInfo.REASON_BUSY},
+ * {@link CallForwardingInfo.REASON_NOT_REACHABLE}
+ *
+ * @return {@link CallForwardingInfo} with the status {@link CallForwardingInfo#STATUS_ACTIVE}
+ * or {@link CallForwardingInfo#STATUS_INACTIVE} and the target phone number to forward calls
+ * to, if it's available. Otherwise, it will return a {@link CallForwardingInfo} with status
+ * {@link CallForwardingInfo#STATUS_NOT_SUPPORTED} or
+ * {@link CallForwardingInfo#STATUS_FDN_CHECK_FAILURE} depending on the situation.
+ *
+ * @hide
+ */
+ CallForwardingInfo getCallForwarding(int subId, int callForwardingReason);
+
+ /**
+ * Sets the voice call forwarding info including status (enable/disable), call forwarding
+ * reason, the number to forward, and the timeout before the forwarding is attempted.
+ *
+ * @param callForwardingInfo {@link CallForwardingInfo} to setup the call forwarding.
+ * Enabling if {@link CallForwardingInfo#getStatus()} returns
+ * {@link CallForwardingInfo#STATUS_ACTIVE}; Disabling if
+ * {@link CallForwardingInfo#getStatus()} returns {@link CallForwardingInfo#STATUS_INACTIVE}.
+ *
+ * @throws IllegalArgumentException if any of the following:
+ * 0) callForwardingInfo is null.
+ * 1) {@link CallForwardingInfo#getStatus()} for callForwardingInfo returns neither
+ * {@link CallForwardingInfo#STATUS_ACTIVE} nor {@link CallForwardingInfo#STATUS_INACTIVE}.
+ * 2) {@link CallForwardingInfo#getReason()} for callForwardingInfo doesn't return the
+ * bitwise-OR combination of {@link CallForwardingInfo.REASON_BUSY},
+ * {@link CallForwardingInfo.REASON_BUSY}, {@link CallForwardingInfo.REASON_NOT_REACHABLE}
+ * 3) {@link CallForwardingInfo#getNumber()} for callForwardingInfo returns null.
+ * 4) {@link CallForwardingInfo#getTimeout()} for callForwardingInfo returns nagetive value.
+ *
+ * @return {@code true} to indicate it was set successfully; {@code false} otherwise.
+ *
+ * @hide
+ */
+ boolean setCallForwarding(int subId, in CallForwardingInfo callForwardingInfo);
+
+ /**
+ * Gets the status of voice call waiting function. Call waiting function enables the waiting
+ * for the incoming call when it reaches the user who is busy to make another call and allows
+ * users to decide whether to switch to the incoming call.
+ *
+ * @return the status of call waiting function.
+ * @hide
+ */
+ int getCallWaitingStatus(int subId);
+
+ /**
+ * Sets the status for voice call waiting function. Call waiting function enables the waiting
+ * for the incoming call when it reaches the user who is busy to make another call and allows
+ * users to decide whether to switch to the incoming call.
+ *
+ * @param isEnable {@code true} to enable; {@code false} to disable.
+ * @return {@code true} to indicate it was set successfully; {@code false} otherwise.
+ *
+ * @hide
+ */
+ boolean setCallWaitingStatus(int subId, boolean isEnable);
+
+ /**
* Policy control of data connection. Usually used when data limit is passed.
* @param enabled True if enabling the data, otherwise disabling.
* @param subId Subscription index
diff --git a/wifi/java/android/net/wifi/WifiInfo.java b/wifi/java/android/net/wifi/WifiInfo.java
index 419bcb1..f8d48c5 100644
--- a/wifi/java/android/net/wifi/WifiInfo.java
+++ b/wifi/java/android/net/wifi/WifiInfo.java
@@ -178,7 +178,7 @@
* If connected to a network suggestion or specifier, store the package name of the app,
* else null.
*/
- private String mAppPackageName;
+ private String mRequestingPackageName;
/**
* Running total count of lost (not ACKed) transmitted unicast data packets.
@@ -201,68 +201,68 @@
*/
public long rxSuccess;
- private double mTxBadRate;
+ private double mLostTxPacketsPerSecond;
/**
* Average rate of lost transmitted packets, in units of packets per second.
* @hide
*/
@SystemApi
- public double getTxBadRate() {
- return mTxBadRate;
+ public double getLostTxPacketsPerSecond() {
+ return mLostTxPacketsPerSecond;
}
/** @hide */
- public void setTxBadRate(double txBadRate) {
- mTxBadRate = txBadRate;
+ public void setLostTxPacketsPerSecond(double lostTxPacketsPerSecond) {
+ mLostTxPacketsPerSecond = lostTxPacketsPerSecond;
}
- private double mTxRetriesRate;
+ private double mTxRetriedTxPacketsPerSecond;
/**
* Average rate of transmitted retry packets, in units of packets per second.
* @hide
*/
@SystemApi
- public double getTxRetriesRate() {
- return mTxRetriesRate;
+ public double getRetriedTxPacketsPerSecond() {
+ return mTxRetriedTxPacketsPerSecond;
}
/** @hide */
- public void setTxRetriesRate(double txRetriesRate) {
- mTxRetriesRate = txRetriesRate;
+ public void setRetriedTxPacketsRate(double txRetriedTxPacketsPerSecond) {
+ mTxRetriedTxPacketsPerSecond = txRetriedTxPacketsPerSecond;
}
- private double mTxSuccessRate;
+ private double mSuccessfulTxPacketsPerSecond;
/**
* Average rate of successfully transmitted unicast packets, in units of packets per second.
* @hide
*/
@SystemApi
- public double getTxSuccessRate() {
- return mTxSuccessRate;
+ public double getSuccessfulTxPacketsPerSecond() {
+ return mSuccessfulTxPacketsPerSecond;
}
/** @hide */
- public void setTxSuccessRate(double txSuccessRate) {
- mTxSuccessRate = txSuccessRate;
+ public void setSuccessfulTxPacketsPerSecond(double successfulTxPacketsPerSecond) {
+ mSuccessfulTxPacketsPerSecond = successfulTxPacketsPerSecond;
}
- private double mRxSuccessRate;
+ private double mSuccessfulRxPacketsPerSecond;
/**
* Average rate of received unicast data packets, in units of packets per second.
* @hide
*/
@SystemApi
- public double getRxSuccessRate() {
- return mRxSuccessRate;
+ public double getSuccessfulRxPacketsPerSecond() {
+ return mSuccessfulRxPacketsPerSecond;
}
/** @hide */
- public void setRxSuccessRate(double rxSuccessRate) {
- mRxSuccessRate = rxSuccessRate;
+ public void setSuccessfulRxPacketsPerSecond(double successfulRxPacketsPerSecond) {
+ mSuccessfulRxPacketsPerSecond = successfulRxPacketsPerSecond;
}
/** @hide */
@@ -319,17 +319,17 @@
setMeteredHint(false);
setEphemeral(false);
setOsuAp(false);
- setAppPackageName(null);
+ setRequestingPackageName(null);
setFQDN(null);
setProviderFriendlyName(null);
txBad = 0;
txSuccess = 0;
rxSuccess = 0;
txRetries = 0;
- mTxBadRate = 0;
- mTxSuccessRate = 0;
- mRxSuccessRate = 0;
- mTxRetriesRate = 0;
+ mLostTxPacketsPerSecond = 0;
+ mSuccessfulTxPacketsPerSecond = 0;
+ mSuccessfulRxPacketsPerSecond = 0;
+ mTxRetriedTxPacketsPerSecond = 0;
score = 0;
}
@@ -353,8 +353,8 @@
mMeteredHint = source.mMeteredHint;
mEphemeral = source.mEphemeral;
mTrusted = source.mTrusted;
- mAppPackageName =
- source.mAppPackageName;
+ mRequestingPackageName =
+ source.mRequestingPackageName;
mOsuAp = source.mOsuAp;
mFqdn = source.mFqdn;
mProviderFriendlyName = source.mProviderFriendlyName;
@@ -362,10 +362,10 @@
txRetries = source.txRetries;
txSuccess = source.txSuccess;
rxSuccess = source.rxSuccess;
- mTxBadRate = source.mTxBadRate;
- mTxRetriesRate = source.mTxRetriesRate;
- mTxSuccessRate = source.mTxSuccessRate;
- mRxSuccessRate = source.mRxSuccessRate;
+ mLostTxPacketsPerSecond = source.mLostTxPacketsPerSecond;
+ mTxRetriedTxPacketsPerSecond = source.mTxRetriedTxPacketsPerSecond;
+ mSuccessfulTxPacketsPerSecond = source.mSuccessfulTxPacketsPerSecond;
+ mSuccessfulRxPacketsPerSecond = source.mSuccessfulRxPacketsPerSecond;
score = source.score;
mWifiStandard = source.mWifiStandard;
mMaxSupportedTxLinkSpeed = source.mMaxSupportedTxLinkSpeed;
@@ -777,8 +777,8 @@
}
/** {@hide} */
- public void setAppPackageName(@Nullable String packageName) {
- mAppPackageName = packageName;
+ public void setRequestingPackageName(@Nullable String packageName) {
+ mRequestingPackageName = packageName;
}
/**
@@ -788,8 +788,8 @@
* @hide
*/
@SystemApi
- public @Nullable String getAppPackageName() {
- return mAppPackageName;
+ public @Nullable String getRequestingPackageName() {
+ return mRequestingPackageName;
}
@@ -956,16 +956,16 @@
dest.writeInt(mTrusted ? 1 : 0);
dest.writeInt(score);
dest.writeLong(txSuccess);
- dest.writeDouble(mTxSuccessRate);
+ dest.writeDouble(mSuccessfulTxPacketsPerSecond);
dest.writeLong(txRetries);
- dest.writeDouble(mTxRetriesRate);
+ dest.writeDouble(mTxRetriedTxPacketsPerSecond);
dest.writeLong(txBad);
- dest.writeDouble(mTxBadRate);
+ dest.writeDouble(mLostTxPacketsPerSecond);
dest.writeLong(rxSuccess);
- dest.writeDouble(mRxSuccessRate);
+ dest.writeDouble(mSuccessfulRxPacketsPerSecond);
mSupplicantState.writeToParcel(dest, flags);
dest.writeInt(mOsuAp ? 1 : 0);
- dest.writeString(mAppPackageName);
+ dest.writeString(mRequestingPackageName);
dest.writeString(mFqdn);
dest.writeString(mProviderFriendlyName);
dest.writeInt(mWifiStandard);
@@ -1000,16 +1000,16 @@
info.mTrusted = in.readInt() != 0;
info.score = in.readInt();
info.txSuccess = in.readLong();
- info.mTxSuccessRate = in.readDouble();
+ info.mSuccessfulTxPacketsPerSecond = in.readDouble();
info.txRetries = in.readLong();
- info.mTxRetriesRate = in.readDouble();
+ info.mTxRetriedTxPacketsPerSecond = in.readDouble();
info.txBad = in.readLong();
- info.mTxBadRate = in.readDouble();
+ info.mLostTxPacketsPerSecond = in.readDouble();
info.rxSuccess = in.readLong();
- info.mRxSuccessRate = in.readDouble();
+ info.mSuccessfulRxPacketsPerSecond = in.readDouble();
info.mSupplicantState = SupplicantState.CREATOR.createFromParcel(in);
info.mOsuAp = in.readInt() != 0;
- info.mAppPackageName = in.readString();
+ info.mRequestingPackageName = in.readString();
info.mFqdn = in.readString();
info.mProviderFriendlyName = in.readString();
info.mWifiStandard = in.readInt();
diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java
index fb3e794..1d71cf9 100644
--- a/wifi/java/android/net/wifi/WifiManager.java
+++ b/wifi/java/android/net/wifi/WifiManager.java
@@ -4854,13 +4854,19 @@
/**
* Set Wi-Fi verbose logging level from developer settings.
*
- * @param verbose the verbose logging level to set. 0 will disable verbose logging, a positive
- * integer will enable verbose logging.
+ * @param enable true to enable verbose logging, false to disable.
*
* @hide
*/
@SystemApi
@RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS)
+ public void setVerboseLoggingEnabled(boolean enable) {
+ enableVerboseLogging(enable ? 1 : 0);
+ }
+
+ /** @hide */
+ @UnsupportedAppUsage
+ @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS)
public void enableVerboseLogging (int verbose) {
try {
mService.enableVerboseLogging(verbose);
@@ -4871,15 +4877,23 @@
}
/**
- * Get the persisted WiFi verbose logging level, set by {@link #enableVerboseLogging(int)}.
+ * Get the persisted Wi-Fi verbose logging level, set by
+ * {@link #setVerboseLoggingEnabled(boolean)}.
* No permissions are required to call this method.
*
- * @return 0 to indicate that verbose logging is disabled, a positive integer to indicate that
- * verbose logging is enabled.
+ * @return true to indicate that verbose logging is enabled, false to indicate that verbose
+ * logging is disabled.
*
* @hide
*/
@SystemApi
+ public boolean isVerboseLoggingEnabled() {
+ return getVerboseLoggingLevel() > 0;
+ }
+
+ /** @hide */
+ // TODO(b/145484145): remove once SUW stops calling this via reflection
+ @UnsupportedAppUsage
public int getVerboseLoggingLevel() {
try {
return mService.getVerboseLoggingLevel();
@@ -4910,7 +4924,10 @@
*/
@Nullable
@SystemApi
- @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE)
+ @RequiresPermission(anyOf = {
+ android.Manifest.permission.NETWORK_SETTINGS,
+ android.Manifest.permission.NETWORK_SETUP_WIZARD
+ })
public Network getCurrentNetwork() {
try {
return mService.getCurrentNetwork();
@@ -5012,10 +5029,8 @@
* and ipconfig.txt file.
* @param supplicantData bytes representing wpa_supplicant.conf
* @param ipConfigData bytes representing ipconfig.txt
- * @deprecated this is no longer supported.
* @hide
*/
- @Deprecated
@SystemApi
@RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS)
public void restoreSupplicantBackupData(
@@ -5204,7 +5219,7 @@
* level from wifi service.
*/
private void updateVerboseLoggingEnabledFromService() {
- mVerboseLoggingEnabled = getVerboseLoggingLevel() > 0;
+ mVerboseLoggingEnabled = isVerboseLoggingEnabled();
}
/**
diff --git a/wifi/java/android/net/wifi/WifiScanner.java b/wifi/java/android/net/wifi/WifiScanner.java
index 18533ef..6f01350 100644
--- a/wifi/java/android/net/wifi/WifiScanner.java
+++ b/wifi/java/android/net/wifi/WifiScanner.java
@@ -1037,10 +1037,8 @@
/**
* Retrieve the most recent scan results from a single scan request.
- * {@hide}
*/
@NonNull
- @SystemApi
@RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE)
public List<ScanResult> getSingleScanResults() {
validateChannel();
diff --git a/wifi/tests/README.md b/wifi/tests/README.md
index b0594f2..f909404 100644
--- a/wifi/tests/README.md
+++ b/wifi/tests/README.md
@@ -8,12 +8,9 @@
The easiest way to run tests is simply run
```
-frameworks/base/wifi/tests/runtests.sh
+atest android.net.wifi
```
-`runtests.sh` will build the test project and all of its dependencies and push the APK to the
-connected device. It will then run the tests on the device.
-
To pick up changes in framework/base, you will need to:
1. rebuild the framework library 'make -j32'
2. sync over the updated library to the device 'adb sync'
@@ -24,22 +21,6 @@
2. adb reboot
3. adb remount
-See below for a few example of options to limit which tests are run.
-See the
-[AndroidJUnitRunner Documentation](https://developer.android.com/reference/android/support/test/runner/AndroidJUnitRunner.html)
-for more details on the supported options.
-
-```
-runtests.sh -e package android.net.wifi
-runtests.sh -e class android.net.wifi.WifiScannerTest
-```
-
-If you manually build and push the test APK to the device you can run tests using
-
-```
-adb shell am instrument -w 'android.net.wifi.test/androidx.test.runner.AndroidJUnitRunner'
-```
-
## Adding Tests
Tests can be added by adding classes to the src directory. JUnit4 style test cases can
be written by simply annotating test methods with `org.junit.Test`.
diff --git a/wifi/tests/runtests.sh b/wifi/tests/runtests.sh
deleted file mode 100755
index 4024371..0000000
--- a/wifi/tests/runtests.sh
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/usr/bin/env bash
-
-if [ -z $ANDROID_BUILD_TOP ]; then
- echo "You need to source and lunch before you can use this script"
- exit 1
-fi
-
-echo "Running tests"
-
-set -e # fail early
-
-echo "+ mmma -j32 $ANDROID_BUILD_TOP/frameworks/base/wifi/tests"
-# NOTE Don't actually run the command above since this shell doesn't inherit functions from the
-# caller.
-$ANDROID_BUILD_TOP/build/soong/soong_ui.bash --make-mode MODULES-IN-frameworks-base-wifi-tests
-
-set -x # print commands
-
-adb wait-for-device
-
-TARGET_ARCH=$($ANDROID_BUILD_TOP/build/soong/soong_ui.bash --dumpvar-mode TARGET_ARCH)
-adb install -r -g "$OUT/testcases/FrameworksWifiApiTests/$TARGET_ARCH/FrameworksWifiApiTests.apk"
-
-adb shell am instrument --no-hidden-api-checks -w "$@" \
- 'android.net.wifi.test/androidx.test.runner.AndroidJUnitRunner'
diff --git a/wifi/tests/src/android/net/wifi/WifiInfoTest.java b/wifi/tests/src/android/net/wifi/WifiInfoTest.java
index 04759ac..311bbc4 100644
--- a/wifi/tests/src/android/net/wifi/WifiInfoTest.java
+++ b/wifi/tests/src/android/net/wifi/WifiInfoTest.java
@@ -64,7 +64,7 @@
writeWifiInfo.setOsuAp(true);
writeWifiInfo.setFQDN(TEST_FQDN);
writeWifiInfo.setProviderFriendlyName(TEST_PROVIDER_NAME);
- writeWifiInfo.setAppPackageName(TEST_PACKAGE_NAME);
+ writeWifiInfo.setRequestingPackageName(TEST_PACKAGE_NAME);
writeWifiInfo.setWifiStandard(TEST_WIFI_STANDARD);
writeWifiInfo.setMaxSupportedTxLinkSpeedMbps(TEST_MAX_SUPPORTED_TX_LINK_SPEED_MBPS);
writeWifiInfo.setMaxSupportedRxLinkSpeedMbps(TEST_MAX_SUPPORTED_RX_LINK_SPEED_MBPS);
@@ -83,7 +83,7 @@
assertTrue(readWifiInfo.isTrusted());
assertTrue(readWifiInfo.isOsuAp());
assertTrue(readWifiInfo.isPasspointAp());
- assertEquals(TEST_PACKAGE_NAME, readWifiInfo.getAppPackageName());
+ assertEquals(TEST_PACKAGE_NAME, readWifiInfo.getRequestingPackageName());
assertEquals(TEST_FQDN, readWifiInfo.getPasspointFqdn());
assertEquals(TEST_PROVIDER_NAME, readWifiInfo.getPasspointProviderFriendlyName());
assertEquals(TEST_WIFI_STANDARD, readWifiInfo.getWifiStandard());