Merge "Refactor hid command, mitigate overflows"
diff --git a/Android.bp b/Android.bp
index 6815a0d..e825610 100644
--- a/Android.bp
+++ b/Android.bp
@@ -743,22 +743,24 @@
name: "framework-javastream-protos",
depfile: true,
+ tool_files: [ "tools/genprotos.sh", ],
tools: [
"aprotoc",
"protoc-gen-javastream",
"soong_zip",
],
- cmd: "mkdir -p $(genDir)/$(in) " +
- "&& $(location aprotoc) " +
- " --plugin=$(location protoc-gen-javastream) " +
- " --dependency_out=$(depfile) " +
- " --javastream_out=$(genDir)/$(in) " +
- " -Iexternal/protobuf/src " +
- " -I . " +
- " $(in) " +
- "&& $(location soong_zip) -jar -o $(out) -C $(genDir)/$(in) -D $(genDir)/$(in)",
-
+ // TODO This should not be needed. If you set a custom OUT_DIR or OUT_DIR_COMMON_BASE you can
+ // end up with a command that is extremely long, potentially going passed MAX_ARG_STRLEN due to
+ // the way sbox rewrites the command. See b/70221552.
+ cmd: "$(location tools/genprotos.sh) " +
+ " $(location aprotoc) " +
+ " $(location protoc-gen-javastream) " +
+ " $(location soong_zip) " +
+ " $(genDir) " +
+ " $(depfile) " +
+ " $(in) " +
+ " $(out)",
srcs: [
"core/proto/**/*.proto",
"libs/incident/**/*.proto",
@@ -1173,6 +1175,8 @@
srcs_lib_whitelist_dirs: frameworks_base_subdirs,
srcs_lib_whitelist_pkgs: packages_to_document,
libs: [
+ "conscrypt",
+ "bouncycastle",
"voip-common",
"android.test.mock",
"android-support-annotations",
@@ -1569,7 +1573,7 @@
metalava_annotations_enabled: true,
metalava_previous_api: ":public-api-for-metalava-annotations",
metalava_merge_annotations_dirs: [
- "tools/metalava/manual",
+ "metalava-manual",
],
}
diff --git a/api/current.txt b/api/current.txt
index c236186..897a8d9 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -27716,6 +27716,7 @@
method public java.util.Date getValidNotAfterDate();
method public deprecated java.lang.String getValidNotBefore();
method public java.util.Date getValidNotBeforeDate();
+ method public java.security.cert.X509Certificate getX509Certificate();
method public static android.net.http.SslCertificate restoreState(android.os.Bundle);
method public static android.os.Bundle saveState(android.net.http.SslCertificate);
}
@@ -35621,11 +35622,11 @@
protected static abstract interface ContactsContract.ContactOptionsColumns {
field public static final java.lang.String CUSTOM_RINGTONE = "custom_ringtone";
- field public static final java.lang.String LAST_TIME_CONTACTED = "last_time_contacted";
+ field public static final deprecated java.lang.String LAST_TIME_CONTACTED = "last_time_contacted";
field public static final java.lang.String PINNED = "pinned";
field public static final java.lang.String SEND_TO_VOICEMAIL = "send_to_voicemail";
field public static final java.lang.String STARRED = "starred";
- field public static final java.lang.String TIMES_CONTACTED = "times_contacted";
+ field public static final deprecated java.lang.String TIMES_CONTACTED = "times_contacted";
}
protected static abstract interface ContactsContract.ContactStatusColumns {
@@ -35647,7 +35648,7 @@
method public static java.io.InputStream openContactPhotoInputStream(android.content.ContentResolver, android.net.Uri, boolean);
method public static java.io.InputStream openContactPhotoInputStream(android.content.ContentResolver, android.net.Uri);
field public static final android.net.Uri CONTENT_FILTER_URI;
- field public static final android.net.Uri CONTENT_FREQUENT_URI;
+ field public static final deprecated android.net.Uri CONTENT_FREQUENT_URI;
field public static final android.net.Uri CONTENT_GROUP_URI;
field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/contact";
field public static final android.net.Uri CONTENT_LOOKUP_URI;
@@ -35755,7 +35756,7 @@
protected static abstract interface ContactsContract.DataColumnsWithJoins implements android.provider.BaseColumns android.provider.ContactsContract.ContactNameColumns android.provider.ContactsContract.ContactOptionsColumns android.provider.ContactsContract.ContactStatusColumns android.provider.ContactsContract.ContactsColumns android.provider.ContactsContract.DataColumns android.provider.ContactsContract.DataUsageStatColumns android.provider.ContactsContract.RawContactsColumns android.provider.ContactsContract.StatusColumns {
}
- public static final class ContactsContract.DataUsageFeedback {
+ public static final deprecated class ContactsContract.DataUsageFeedback {
ctor public ContactsContract.DataUsageFeedback();
field public static final android.net.Uri DELETE_USAGE_URI;
field public static final android.net.Uri FEEDBACK_URI;
@@ -35766,8 +35767,8 @@
}
protected static abstract interface ContactsContract.DataUsageStatColumns {
- field public static final java.lang.String LAST_TIME_USED = "last_time_used";
- field public static final java.lang.String TIMES_USED = "times_used";
+ field public static final deprecated java.lang.String LAST_TIME_USED = "last_time_used";
+ field public static final deprecated java.lang.String TIMES_USED = "times_used";
}
public static final class ContactsContract.DeletedContacts implements android.provider.ContactsContract.DeletedContactsColumns {
@@ -39151,6 +39152,7 @@
method public int describeContents();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.service.autofill.SaveInfo> CREATOR;
+ field public static final int FLAG_DELAY_SAVE = 4; // 0x4
field public static final int FLAG_DONT_SAVE_ON_FINISH = 2; // 0x2
field public static final int FLAG_SAVE_ON_ALL_VIEWS_INVISIBLE = 1; // 0x1
field public static final int NEGATIVE_BUTTON_STYLE_CANCEL = 0; // 0x0
@@ -57736,14 +57738,14 @@
method public void setContextClassLoader(java.lang.ClassLoader);
method public final void setDaemon(boolean);
method public static void setDefaultUncaughtExceptionHandler(java.lang.Thread.UncaughtExceptionHandler);
- method public final void setName(java.lang.String);
+ method public final synchronized void setName(java.lang.String);
method public final void setPriority(int);
method public void setUncaughtExceptionHandler(java.lang.Thread.UncaughtExceptionHandler);
method public static void sleep(long) throws java.lang.InterruptedException;
method public static void sleep(long, int) throws java.lang.InterruptedException;
method public synchronized void start();
method public final deprecated void stop();
- method public final deprecated void stop(java.lang.Throwable);
+ method public final deprecated synchronized void stop(java.lang.Throwable);
method public final deprecated void suspend();
method public static void yield();
field public static final int MAX_PRIORITY = 10; // 0xa
diff --git a/api/test-current.txt b/api/test-current.txt
index 9dc61ee..63ece40 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -228,6 +228,14 @@
}
+package android.bluetooth {
+
+ public final class BluetoothClass implements android.os.Parcelable {
+ method public int getClassOfDevice();
+ }
+
+}
+
package android.content {
public abstract class ContentResolver {
diff --git a/cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java b/cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java
index 641ae00..043b7f9 100644
--- a/cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java
+++ b/cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java
@@ -16,10 +16,13 @@
package com.android.commands.bmgr;
+import android.annotation.IntDef;
import android.app.backup.BackupManager;
+import android.app.backup.BackupManagerMonitor;
import android.app.backup.BackupProgress;
import android.app.backup.BackupTransport;
import android.app.backup.IBackupManager;
+import android.app.backup.IBackupManagerMonitor;
import android.app.backup.IBackupObserver;
import android.app.backup.IRestoreObserver;
import android.app.backup.IRestoreSession;
@@ -28,6 +31,7 @@
import android.content.ComponentName;
import android.content.pm.IPackageManager;
import android.content.pm.PackageInfo;
+import android.os.Bundle;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.SystemClock;
@@ -36,10 +40,13 @@
import com.android.internal.annotations.GuardedBy;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
+import java.util.Set;
import java.util.concurrent.CountDownLatch;
public final class Bmgr {
@@ -247,7 +254,7 @@
}
// IBackupObserver generically usable for any backup/init operation
- abstract class Observer extends IBackupObserver.Stub {
+ private static abstract class Observer extends IBackupObserver.Stub {
private final Object trigger = new Object();
@GuardedBy("trigger")
@@ -295,7 +302,7 @@
}
}
- class BackupObserver extends Observer {
+ private static class BackupObserver extends Observer {
@Override
public void onUpdate(String currentPackage, BackupProgress backupProgress) {
super.onUpdate(currentPackage, backupProgress);
@@ -347,7 +354,7 @@
}
}
- private void backupNowAllPackages(boolean nonIncrementalBackup) {
+ private void backupNowAllPackages(boolean nonIncrementalBackup, @Monitor int monitorState) {
int userId = UserHandle.USER_SYSTEM;
IPackageManager mPm =
IPackageManager.Stub.asInterface(ServiceManager.getService("package"));
@@ -372,20 +379,27 @@
System.err.println(e.toString());
System.err.println(BMGR_NOT_RUNNING_ERR);
}
- backupNowPackages(Arrays.asList(filteredPackages), nonIncrementalBackup);
+ backupNowPackages(Arrays.asList(filteredPackages), nonIncrementalBackup, monitorState);
}
}
- private void backupNowPackages(List<String> packages, boolean nonIncrementalBackup) {
+ private void backupNowPackages(
+ List<String> packages, boolean nonIncrementalBackup, @Monitor int monitorState) {
int flags = 0;
if (nonIncrementalBackup) {
flags |= BackupManager.FLAG_NON_INCREMENTAL_BACKUP;
}
try {
BackupObserver observer = new BackupObserver();
- // TODO: implement monitor here?
- int err = mBmgr.requestBackup(packages.toArray(new String[packages.size()]), observer,
- null, flags);
+ BackupMonitor monitor =
+ (monitorState != Monitor.OFF)
+ ? new BackupMonitor(monitorState == Monitor.VERBOSE)
+ : null;
+ int err = mBmgr.requestBackup(
+ packages.toArray(new String[packages.size()]),
+ observer,
+ monitor,
+ flags);
if (err == 0) {
// Off and running -- wait for the backup to complete
observer.waitForCompletion();
@@ -402,6 +416,7 @@
String pkg;
boolean backupAll = false;
boolean nonIncrementalBackup = false;
+ @Monitor int monitor = Monitor.OFF;
ArrayList<String> allPkgs = new ArrayList<String>();
while ((pkg = nextArg()) != null) {
if (pkg.equals("--all")) {
@@ -410,6 +425,10 @@
nonIncrementalBackup = true;
} else if (pkg.equals("--incremental")) {
nonIncrementalBackup = false;
+ } else if (pkg.equals("--monitor")) {
+ monitor = Monitor.NORMAL;
+ } else if (pkg.equals("--monitor-verbose")) {
+ monitor = Monitor.VERBOSE;
} else {
if (!allPkgs.contains(pkg)) {
allPkgs.add(pkg);
@@ -420,14 +439,14 @@
if (allPkgs.size() == 0) {
System.out.println("Running " + (nonIncrementalBackup ? "non-" : "") +
"incremental backup for all packages.");
- backupNowAllPackages(nonIncrementalBackup);
+ backupNowAllPackages(nonIncrementalBackup, monitor);
} else {
System.err.println("Provide only '--all' flag or list of packages.");
}
} else if (allPkgs.size() > 0) {
System.out.println("Running " + (nonIncrementalBackup ? "non-" : "") +
"incremental backup for " + allPkgs.size() +" requested packages.");
- backupNowPackages(allPkgs, nonIncrementalBackup);
+ backupNowPackages(allPkgs, nonIncrementalBackup, monitor);
} else {
System.err.println("Provide '--all' flag or list of packages.");
}
@@ -824,7 +843,7 @@
System.err.println(" bmgr run");
System.err.println(" bmgr wipe TRANSPORT PACKAGE");
System.err.println(" bmgr fullbackup PACKAGE...");
- System.err.println(" bmgr backupnow --all|PACKAGE...");
+ System.err.println(" bmgr backupnow [--monitor|--monitor-verbose] --all|PACKAGE...");
System.err.println(" bmgr cancel backups");
System.err.println("");
System.err.println("The 'backup' command schedules a backup pass for the named package.");
@@ -878,9 +897,164 @@
System.err.println("");
System.err.println("The 'backupnow' command runs an immediate backup for one or more packages.");
System.err.println(" --all flag runs backup for all eligible packages.");
+ System.err.println(" --monitor flag prints monitor events.");
+ System.err.println(" --monitor-verbose flag prints monitor events with all keys.");
System.err.println("For each package it will run key/value or full data backup ");
System.err.println("depending on the package's manifest declarations.");
System.err.println("The data is sent via the currently active transport.");
System.err.println("The 'cancel backups' command cancels all running backups.");
}
+
+ private static class BackupMonitor extends IBackupManagerMonitor.Stub {
+ private final boolean mVerbose;
+
+ private BackupMonitor(boolean verbose) {
+ mVerbose = verbose;
+ }
+
+ @Override
+ public void onEvent(Bundle event) throws RemoteException {
+ StringBuilder out = new StringBuilder();
+ int id = event.getInt(BackupManagerMonitor.EXTRA_LOG_EVENT_ID);
+ int category = event.getInt(BackupManagerMonitor.EXTRA_LOG_EVENT_CATEGORY);
+ out.append("=> Event{").append(eventCategoryToString(category));
+ out.append(" / ").append(eventIdToString(id));
+ String packageName = event.getString(BackupManagerMonitor.EXTRA_LOG_EVENT_PACKAGE_NAME);
+ if (packageName != null) {
+ out.append(" : package = ").append(packageName);
+ if (event.containsKey(BackupManagerMonitor.EXTRA_LOG_EVENT_PACKAGE_LONG_VERSION)) {
+ long version =
+ event.getLong(
+ BackupManagerMonitor.EXTRA_LOG_EVENT_PACKAGE_LONG_VERSION);
+ out.append("(v").append(version).append(")");
+ }
+ }
+ if (mVerbose) {
+ Set<String> remainingKeys = new ArraySet<>(event.keySet());
+ remainingKeys.remove(BackupManagerMonitor.EXTRA_LOG_EVENT_ID);
+ remainingKeys.remove(BackupManagerMonitor.EXTRA_LOG_EVENT_CATEGORY);
+ remainingKeys.remove(BackupManagerMonitor.EXTRA_LOG_EVENT_PACKAGE_NAME);
+ remainingKeys.remove(BackupManagerMonitor.EXTRA_LOG_EVENT_PACKAGE_LONG_VERSION);
+ remainingKeys.remove(BackupManagerMonitor.EXTRA_LOG_EVENT_PACKAGE_VERSION);
+ if (!remainingKeys.isEmpty()) {
+ out.append(", other keys =");
+ for (String key : remainingKeys) {
+ out.append(" ").append(key);
+ }
+ }
+ }
+ out.append("}");
+ System.out.println(out.toString());
+ }
+ }
+
+ private static String eventCategoryToString(int eventCategory) {
+ switch (eventCategory) {
+ case BackupManagerMonitor.LOG_EVENT_CATEGORY_TRANSPORT:
+ return "TRANSPORT";
+ case BackupManagerMonitor.LOG_EVENT_CATEGORY_AGENT:
+ return "AGENT";
+ case BackupManagerMonitor.LOG_EVENT_CATEGORY_BACKUP_MANAGER_POLICY:
+ return "BACKUP_MANAGER_POLICY";
+ default:
+ return "UNKNOWN_CATEGORY";
+ }
+ }
+
+ private static String eventIdToString(int eventId) {
+ switch (eventId) {
+ case BackupManagerMonitor.LOG_EVENT_ID_FULL_BACKUP_CANCEL:
+ return "FULL_BACKUP_CANCEL";
+ case BackupManagerMonitor.LOG_EVENT_ID_ILLEGAL_KEY:
+ return "ILLEGAL_KEY";
+ case BackupManagerMonitor.LOG_EVENT_ID_NO_DATA_TO_SEND:
+ return "NO_DATA_TO_SEND";
+ case BackupManagerMonitor.LOG_EVENT_ID_PACKAGE_INELIGIBLE:
+ return "PACKAGE_INELIGIBLE";
+ case BackupManagerMonitor.LOG_EVENT_ID_PACKAGE_KEY_VALUE_PARTICIPANT:
+ return "PACKAGE_KEY_VALUE_PARTICIPANT";
+ case BackupManagerMonitor.LOG_EVENT_ID_PACKAGE_STOPPED:
+ return "PACKAGE_STOPPED";
+ case BackupManagerMonitor.LOG_EVENT_ID_PACKAGE_NOT_FOUND:
+ return "PACKAGE_NOT_FOUND";
+ case BackupManagerMonitor.LOG_EVENT_ID_BACKUP_DISABLED:
+ return "BACKUP_DISABLED";
+ case BackupManagerMonitor.LOG_EVENT_ID_DEVICE_NOT_PROVISIONED:
+ return "DEVICE_NOT_PROVISIONED";
+ case BackupManagerMonitor.LOG_EVENT_ID_PACKAGE_TRANSPORT_NOT_PRESENT:
+ return "PACKAGE_TRANSPORT_NOT_PRESENT";
+ case BackupManagerMonitor.LOG_EVENT_ID_ERROR_PREFLIGHT:
+ return "ERROR_PREFLIGHT";
+ case BackupManagerMonitor.LOG_EVENT_ID_QUOTA_HIT_PREFLIGHT:
+ return "QUOTA_HIT_PREFLIGHT";
+ case BackupManagerMonitor.LOG_EVENT_ID_EXCEPTION_FULL_BACKUP:
+ return "EXCEPTION_FULL_BACKUP";
+ case BackupManagerMonitor.LOG_EVENT_ID_KEY_VALUE_BACKUP_CANCEL:
+ return "KEY_VALUE_BACKUP_CANCEL";
+ case BackupManagerMonitor.LOG_EVENT_ID_NO_RESTORE_METADATA_AVAILABLE:
+ return "NO_RESTORE_METADATA_AVAILABLE";
+ case BackupManagerMonitor.LOG_EVENT_ID_NO_PM_METADATA_RECEIVED:
+ return "NO_PM_METADATA_RECEIVED";
+ case BackupManagerMonitor.LOG_EVENT_ID_PM_AGENT_HAS_NO_METADATA:
+ return "PM_AGENT_HAS_NO_METADATA";
+ case BackupManagerMonitor.LOG_EVENT_ID_LOST_TRANSPORT:
+ return "LOST_TRANSPORT";
+ case BackupManagerMonitor.LOG_EVENT_ID_PACKAGE_NOT_PRESENT:
+ return "PACKAGE_NOT_PRESENT";
+ case BackupManagerMonitor.LOG_EVENT_ID_RESTORE_VERSION_HIGHER:
+ return "RESTORE_VERSION_HIGHER";
+ case BackupManagerMonitor.LOG_EVENT_ID_APP_HAS_NO_AGENT:
+ return "APP_HAS_NO_AGENT";
+ case BackupManagerMonitor.LOG_EVENT_ID_SIGNATURE_MISMATCH:
+ return "SIGNATURE_MISMATCH";
+ case BackupManagerMonitor.LOG_EVENT_ID_CANT_FIND_AGENT:
+ return "CANT_FIND_AGENT";
+ case BackupManagerMonitor.LOG_EVENT_ID_KEY_VALUE_RESTORE_TIMEOUT:
+ return "KEY_VALUE_RESTORE_TIMEOUT";
+ case BackupManagerMonitor.LOG_EVENT_ID_RESTORE_ANY_VERSION:
+ return "RESTORE_ANY_VERSION";
+ case BackupManagerMonitor.LOG_EVENT_ID_VERSIONS_MATCH:
+ return "VERSIONS_MATCH";
+ case BackupManagerMonitor.LOG_EVENT_ID_VERSION_OF_BACKUP_OLDER:
+ return "VERSION_OF_BACKUP_OLDER";
+ case BackupManagerMonitor.LOG_EVENT_ID_FULL_RESTORE_SIGNATURE_MISMATCH:
+ return "FULL_RESTORE_SIGNATURE_MISMATCH";
+ case BackupManagerMonitor.LOG_EVENT_ID_SYSTEM_APP_NO_AGENT:
+ return "SYSTEM_APP_NO_AGENT";
+ case BackupManagerMonitor.LOG_EVENT_ID_FULL_RESTORE_ALLOW_BACKUP_FALSE:
+ return "FULL_RESTORE_ALLOW_BACKUP_FALSE";
+ case BackupManagerMonitor.LOG_EVENT_ID_APK_NOT_INSTALLED:
+ return "APK_NOT_INSTALLED";
+ case BackupManagerMonitor.LOG_EVENT_ID_CANNOT_RESTORE_WITHOUT_APK:
+ return "CANNOT_RESTORE_WITHOUT_APK";
+ case BackupManagerMonitor.LOG_EVENT_ID_MISSING_SIGNATURE:
+ return "MISSING_SIGNATURE";
+ case BackupManagerMonitor.LOG_EVENT_ID_EXPECTED_DIFFERENT_PACKAGE:
+ return "EXPECTED_DIFFERENT_PACKAGE";
+ case BackupManagerMonitor.LOG_EVENT_ID_UNKNOWN_VERSION:
+ return "UNKNOWN_VERSION";
+ case BackupManagerMonitor.LOG_EVENT_ID_FULL_RESTORE_TIMEOUT:
+ return "FULL_RESTORE_TIMEOUT";
+ case BackupManagerMonitor.LOG_EVENT_ID_CORRUPT_MANIFEST:
+ return "CORRUPT_MANIFEST";
+ case BackupManagerMonitor.LOG_EVENT_ID_WIDGET_METADATA_MISMATCH:
+ return "WIDGET_METADATA_MISMATCH";
+ case BackupManagerMonitor.LOG_EVENT_ID_WIDGET_UNKNOWN_VERSION:
+ return "WIDGET_UNKNOWN_VERSION";
+ case BackupManagerMonitor.LOG_EVENT_ID_NO_PACKAGES:
+ return "NO_PACKAGES";
+ case BackupManagerMonitor.LOG_EVENT_ID_TRANSPORT_IS_NULL:
+ return "TRANSPORT_IS_NULL";
+ default:
+ return "UNKNOWN_ID";
+ }
+ }
+
+ @IntDef({Monitor.OFF, Monitor.NORMAL, Monitor.VERBOSE})
+ @Retention(RetentionPolicy.SOURCE)
+ private @interface Monitor {
+ int OFF = 0;
+ int NORMAL = 1;
+ int VERBOSE = 2;
+ }
}
diff --git a/cmds/incident_helper/src/ih_util.cpp b/cmds/incident_helper/src/ih_util.cpp
index 4c4d1b9..012310c 100644
--- a/cmds/incident_helper/src/ih_util.cpp
+++ b/cmds/incident_helper/src/ih_util.cpp
@@ -97,7 +97,7 @@
size_t lastIndex = 0;
int i = 0;
- while (headerNames[i] != NULL) {
+ while (headerNames[i] != nullptr) {
std::string s = headerNames[i];
lastIndex = line.find(s, lastIndex);
if (lastIndex == std::string::npos) {
@@ -237,18 +237,18 @@
Reader::Reader(const int fd)
{
mFile = fdopen(fd, "r");
- mStatus = mFile == NULL ? "Invalid fd " + std::to_string(fd) : "";
+ mStatus = mFile == nullptr ? "Invalid fd " + std::to_string(fd) : "";
}
Reader::~Reader()
{
- if (mFile != NULL) fclose(mFile);
+ if (mFile != nullptr) fclose(mFile);
}
bool Reader::readLine(std::string* line) {
- if (mFile == NULL) return false;
+ if (mFile == nullptr) return false;
- char* buf = NULL;
+ char* buf = nullptr;
size_t len = 0;
ssize_t read = getline(&buf, &len, mFile);
if (read != -1) {
diff --git a/cmds/incident_helper/src/main.cpp b/cmds/incident_helper/src/main.cpp
index 5b6ac7a..809a771 100644
--- a/cmds/incident_helper/src/main.cpp
+++ b/cmds/incident_helper/src/main.cpp
@@ -98,7 +98,7 @@
fprintf(stderr, "Pasring section %d...\n", sectionID);
TextParserBase* parser = selectParser(sectionID);
- if (parser != NULL) {
+ if (parser != nullptr) {
fprintf(stderr, "Running parser: %s\n", parser->name.string());
status_t err = parser->Parse(STDIN_FILENO, STDOUT_FILENO);
if (err != NO_ERROR) {
diff --git a/cmds/incident_helper/src/parsers/CpuInfoParser.cpp b/cmds/incident_helper/src/parsers/CpuInfoParser.cpp
index eed68b9..21ced9c 100644
--- a/cmds/incident_helper/src/parsers/CpuInfoParser.cpp
+++ b/cmds/incident_helper/src/parsers/CpuInfoParser.cpp
@@ -109,7 +109,7 @@
nextToUsage = false;
// NAME is not in the list since we need to modify the end of the CMD index.
- const char* headerNames[] = { "PID", "TID", "USER", "PR", "NI", "CPU", "S", "VIRT", "RES", "PCY", "CMD", NULL };
+ const char* headerNames[] = { "PID", "TID", "USER", "PR", "NI", "CPU", "S", "VIRT", "RES", "PCY", "CMD", nullptr };
if (!getColumnIndices(columnIndices, headerNames, line)) {
return -1;
}
diff --git a/cmds/incident_helper/src/parsers/PsParser.cpp b/cmds/incident_helper/src/parsers/PsParser.cpp
index 8d64064..d3cb4be 100644
--- a/cmds/incident_helper/src/parsers/PsParser.cpp
+++ b/cmds/incident_helper/src/parsers/PsParser.cpp
@@ -48,7 +48,7 @@
if (nline++ == 0) {
header = parseHeader(line, DEFAULT_WHITESPACE);
- const char* headerNames[] = { "LABEL", "USER", "PID", "TID", "PPID", "VSZ", "RSS", "WCHAN", "ADDR", "S", "PRI", "NI", "RTPRIO", "SCH", "PCY", "TIME", "CMD", NULL };
+ const char* headerNames[] = { "LABEL", "USER", "PID", "TID", "PPID", "VSZ", "RSS", "WCHAN", "ADDR", "S", "PRI", "NI", "RTPRIO", "SCH", "PCY", "TIME", "CMD", nullptr };
if (!getColumnIndices(columnIndices, headerNames, line)) {
return -1;
}
diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto
index 203a8e9b..d7a926f 100644
--- a/cmds/statsd/src/atoms.proto
+++ b/cmds/statsd/src/atoms.proto
@@ -1727,6 +1727,17 @@
optional uint64 timestamp_millis = 1 [(stateFieldOption).option = EXCLUSIVE];
}
+/**
+ * An atom for generic metrics logging. Available from Android Q.
+ */
+message GenericAtom {
+ // The uid of the application that sent this custom atom.
+ optional int32 uid = 1 [(is_uid) = true];
+
+ // An event_id indicates the type of event.
+ optional int32 event_id = 2;
+}
+
//////////////////////////////////////////////////////////////////////
// Pulled atoms below this line //
//////////////////////////////////////////////////////////////////////
@@ -2156,14 +2167,3 @@
// Total number of exceptions.
optional int64 exception_count = 2;
}
-
-/**
- * An atom for generic metrics logging. Available from Android Q.
- */
-message GenericAtom {
- // The uid of the application that sent this custom atom.
- optional int32 uid = 1 [(is_uid) = true];
-
- // An event_id indicates the type of event.
- optional int32 event_id = 2;
-}
diff --git a/config/hiddenapi-light-greylist.txt b/config/hiddenapi-light-greylist.txt
index ee4e20a..4f60b0c 100644
--- a/config/hiddenapi-light-greylist.txt
+++ b/config/hiddenapi-light-greylist.txt
@@ -1,23 +1,5 @@
Landroid/accessibilityservice/IAccessibilityServiceConnection$Stub;-><init>()V
Landroid/accessibilityservice/IAccessibilityServiceConnection$Stub;->asInterface(Landroid/os/IBinder;)Landroid/accessibilityservice/IAccessibilityServiceConnection;
-Landroid/accounts/Account;->accessId:Ljava/lang/String;
-Landroid/accounts/Account;->TAG:Ljava/lang/String;
-Landroid/accounts/AccountAndUser;-><init>(Landroid/accounts/Account;I)V
-Landroid/accounts/AccountAndUser;->account:Landroid/accounts/Account;
-Landroid/accounts/AccountAndUser;->userId:I
-Landroid/accounts/AccountAuthenticatorResponse;-><init>(Landroid/accounts/IAccountAuthenticatorResponse;)V
-Landroid/accounts/AccountManager$AmsTask;->mActivity:Landroid/app/Activity;
-Landroid/accounts/AccountManager$AmsTask;->mHandler:Landroid/os/Handler;
-Landroid/accounts/AccountManager$AmsTask;->mResponse:Landroid/accounts/IAccountManagerResponse;
-Landroid/accounts/AccountManager$GetAuthTokenByTypeAndFeaturesTask;->mAuthTokenType:Ljava/lang/String;
-Landroid/accounts/AccountManager$GetAuthTokenByTypeAndFeaturesTask;->mLoginOptions:Landroid/os/Bundle;
-Landroid/accounts/AccountManager$GetAuthTokenByTypeAndFeaturesTask;->mMyCallback:Landroid/accounts/AccountManagerCallback;
-Landroid/accounts/AccountManager;-><init>(Landroid/content/Context;Landroid/accounts/IAccountManager;)V
-Landroid/accounts/AccountManager;->confirmCredentialsAsUser(Landroid/accounts/Account;Landroid/os/Bundle;Landroid/app/Activity;Landroid/accounts/AccountManagerCallback;Landroid/os/Handler;Landroid/os/UserHandle;)Landroid/accounts/AccountManagerFuture;
-Landroid/accounts/AccountManager;->getAccountsByTypeAsUser(Ljava/lang/String;Landroid/os/UserHandle;)[Landroid/accounts/Account;
-Landroid/accounts/AccountManager;->mContext:Landroid/content/Context;
-Landroid/accounts/AuthenticatorDescription;-><init>(Landroid/os/Parcel;)V
-Landroid/accounts/AuthenticatorDescription;-><init>(Ljava/lang/String;)V
Landroid/accounts/IAccountAuthenticator$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
Landroid/accounts/IAccountAuthenticator$Stub$Proxy;->mRemote:Landroid/os/IBinder;
Landroid/accounts/IAccountAuthenticator$Stub;-><init>()V
@@ -1823,242 +1805,19 @@
Landroid/database/sqlite/SqliteWrapper;->update(Landroid/content/Context;Landroid/content/ContentResolver;Landroid/net/Uri;Landroid/content/ContentValues;Ljava/lang/String;[Ljava/lang/String;)I
Landroid/hardware/biometrics/BiometricConstants;->BIOMETRIC_ERROR_VENDOR_BASE:I
Landroid/hardware/biometrics/BiometricFingerprintConstants;->FINGERPRINT_ERROR_VENDOR_BASE:I
-Landroid/hardware/Camera$Parameters;->copyFrom(Landroid/hardware/Camera$Parameters;)V
-Landroid/hardware/Camera$Parameters;->dump()V
-Landroid/hardware/Camera$Parameters;->splitArea(Ljava/lang/String;)Ljava/util/ArrayList;
-Landroid/hardware/camera2/CameraCharacteristics$Key;-><init>(Ljava/lang/String;Landroid/hardware/camera2/utils/TypeReference;)V
-Landroid/hardware/camera2/CameraCharacteristics$Key;-><init>(Ljava/lang/String;Ljava/lang/Class;)V
-Landroid/hardware/camera2/CameraCharacteristics$Key;-><init>(Ljava/lang/String;Ljava/lang/Class;J)V
-Landroid/hardware/camera2/CameraCharacteristics$Key;->getNativeKey()Landroid/hardware/camera2/impl/CameraMetadataNative$Key;
-Landroid/hardware/camera2/CameraCharacteristics;->CONTROL_AVAILABLE_HIGH_SPEED_VIDEO_CONFIGURATIONS:Landroid/hardware/camera2/CameraCharacteristics$Key;
-Landroid/hardware/camera2/CameraCharacteristics;->CONTROL_MAX_REGIONS:Landroid/hardware/camera2/CameraCharacteristics$Key;
-Landroid/hardware/camera2/CameraCharacteristics;->DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS:Landroid/hardware/camera2/CameraCharacteristics$Key;
-Landroid/hardware/camera2/CameraCharacteristics;->DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS:Landroid/hardware/camera2/CameraCharacteristics$Key;
-Landroid/hardware/camera2/CameraCharacteristics;->DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS:Landroid/hardware/camera2/CameraCharacteristics$Key;
-Landroid/hardware/camera2/CameraCharacteristics;->LED_AVAILABLE_LEDS:Landroid/hardware/camera2/CameraCharacteristics$Key;
-Landroid/hardware/camera2/CameraCharacteristics;->LENS_INFO_SHADING_MAP_SIZE:Landroid/hardware/camera2/CameraCharacteristics$Key;
-Landroid/hardware/camera2/CameraCharacteristics;->LOGICAL_MULTI_CAMERA_PHYSICAL_IDS:Landroid/hardware/camera2/CameraCharacteristics$Key;
-Landroid/hardware/camera2/CameraCharacteristics;->mProperties:Landroid/hardware/camera2/impl/CameraMetadataNative;
-Landroid/hardware/camera2/CameraCharacteristics;->QUIRKS_USE_PARTIAL_RESULT:Landroid/hardware/camera2/CameraCharacteristics$Key;
-Landroid/hardware/camera2/CameraCharacteristics;->REQUEST_AVAILABLE_CHARACTERISTICS_KEYS:Landroid/hardware/camera2/CameraCharacteristics$Key;
-Landroid/hardware/camera2/CameraCharacteristics;->REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS:Landroid/hardware/camera2/CameraCharacteristics$Key;
-Landroid/hardware/camera2/CameraCharacteristics;->REQUEST_AVAILABLE_REQUEST_KEYS:Landroid/hardware/camera2/CameraCharacteristics$Key;
-Landroid/hardware/camera2/CameraCharacteristics;->REQUEST_AVAILABLE_RESULT_KEYS:Landroid/hardware/camera2/CameraCharacteristics$Key;
-Landroid/hardware/camera2/CameraCharacteristics;->REQUEST_AVAILABLE_SESSION_KEYS:Landroid/hardware/camera2/CameraCharacteristics$Key;
-Landroid/hardware/camera2/CameraCharacteristics;->REQUEST_MAX_NUM_OUTPUT_STREAMS:Landroid/hardware/camera2/CameraCharacteristics$Key;
-Landroid/hardware/camera2/CameraCharacteristics;->SCALER_AVAILABLE_FORMATS:Landroid/hardware/camera2/CameraCharacteristics$Key;
-Landroid/hardware/camera2/CameraCharacteristics;->SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP:Landroid/hardware/camera2/CameraCharacteristics$Key;
-Landroid/hardware/camera2/CameraCharacteristics;->SCALER_AVAILABLE_JPEG_MIN_DURATIONS:Landroid/hardware/camera2/CameraCharacteristics$Key;
-Landroid/hardware/camera2/CameraCharacteristics;->SCALER_AVAILABLE_JPEG_SIZES:Landroid/hardware/camera2/CameraCharacteristics$Key;
-Landroid/hardware/camera2/CameraCharacteristics;->SCALER_AVAILABLE_MIN_FRAME_DURATIONS:Landroid/hardware/camera2/CameraCharacteristics$Key;
-Landroid/hardware/camera2/CameraCharacteristics;->SCALER_AVAILABLE_PROCESSED_MIN_DURATIONS:Landroid/hardware/camera2/CameraCharacteristics$Key;
-Landroid/hardware/camera2/CameraCharacteristics;->SCALER_AVAILABLE_PROCESSED_SIZES:Landroid/hardware/camera2/CameraCharacteristics$Key;
-Landroid/hardware/camera2/CameraCharacteristics;->SCALER_AVAILABLE_STALL_DURATIONS:Landroid/hardware/camera2/CameraCharacteristics$Key;
-Landroid/hardware/camera2/CameraCharacteristics;->SCALER_AVAILABLE_STREAM_CONFIGURATIONS:Landroid/hardware/camera2/CameraCharacteristics$Key;
-Landroid/hardware/camera2/CaptureRequest$Builder;->setPartOfCHSRequestList(Z)V
-Landroid/hardware/camera2/CaptureRequest$Key;-><init>(Ljava/lang/String;Landroid/hardware/camera2/utils/TypeReference;)V
-Landroid/hardware/camera2/CaptureRequest$Key;-><init>(Ljava/lang/String;Ljava/lang/Class;J)V
-Landroid/hardware/camera2/CaptureRequest$Key;->getNativeKey()Landroid/hardware/camera2/impl/CameraMetadataNative$Key;
-Landroid/hardware/camera2/CaptureRequest;->getTargets()Ljava/util/Collection;
-Landroid/hardware/camera2/CaptureRequest;->JPEG_GPS_COORDINATES:Landroid/hardware/camera2/CaptureRequest$Key;
-Landroid/hardware/camera2/CaptureRequest;->JPEG_GPS_PROCESSING_METHOD:Landroid/hardware/camera2/CaptureRequest$Key;
-Landroid/hardware/camera2/CaptureRequest;->JPEG_GPS_TIMESTAMP:Landroid/hardware/camera2/CaptureRequest$Key;
-Landroid/hardware/camera2/CaptureRequest;->LED_TRANSMIT:Landroid/hardware/camera2/CaptureRequest$Key;
-Landroid/hardware/camera2/CaptureRequest;->mLogicalCameraSettings:Landroid/hardware/camera2/impl/CameraMetadataNative;
-Landroid/hardware/camera2/CaptureRequest;->REQUEST_ID:Landroid/hardware/camera2/CaptureRequest$Key;
-Landroid/hardware/camera2/CaptureRequest;->TONEMAP_CURVE_BLUE:Landroid/hardware/camera2/CaptureRequest$Key;
-Landroid/hardware/camera2/CaptureRequest;->TONEMAP_CURVE_GREEN:Landroid/hardware/camera2/CaptureRequest$Key;
-Landroid/hardware/camera2/CaptureRequest;->TONEMAP_CURVE_RED:Landroid/hardware/camera2/CaptureRequest$Key;
-Landroid/hardware/camera2/CaptureResult$Key;-><init>(Ljava/lang/String;Landroid/hardware/camera2/utils/TypeReference;)V
-Landroid/hardware/camera2/CaptureResult$Key;-><init>(Ljava/lang/String;Ljava/lang/Class;)V
-Landroid/hardware/camera2/CaptureResult$Key;-><init>(Ljava/lang/String;Ljava/lang/Class;J)V
-Landroid/hardware/camera2/CaptureResult$Key;->getNativeKey()Landroid/hardware/camera2/impl/CameraMetadataNative$Key;
-Landroid/hardware/camera2/CaptureResult;->JPEG_GPS_COORDINATES:Landroid/hardware/camera2/CaptureResult$Key;
-Landroid/hardware/camera2/CaptureResult;->JPEG_GPS_PROCESSING_METHOD:Landroid/hardware/camera2/CaptureResult$Key;
-Landroid/hardware/camera2/CaptureResult;->JPEG_GPS_TIMESTAMP:Landroid/hardware/camera2/CaptureResult$Key;
-Landroid/hardware/camera2/CaptureResult;->LED_TRANSMIT:Landroid/hardware/camera2/CaptureResult$Key;
-Landroid/hardware/camera2/CaptureResult;->mResults:Landroid/hardware/camera2/impl/CameraMetadataNative;
-Landroid/hardware/camera2/CaptureResult;->QUIRKS_PARTIAL_RESULT:Landroid/hardware/camera2/CaptureResult$Key;
-Landroid/hardware/camera2/CaptureResult;->REQUEST_FRAME_COUNT:Landroid/hardware/camera2/CaptureResult$Key;
-Landroid/hardware/camera2/CaptureResult;->REQUEST_ID:Landroid/hardware/camera2/CaptureResult$Key;
-Landroid/hardware/camera2/CaptureResult;->STATISTICS_FACE_IDS:Landroid/hardware/camera2/CaptureResult$Key;
-Landroid/hardware/camera2/CaptureResult;->STATISTICS_FACE_LANDMARKS:Landroid/hardware/camera2/CaptureResult$Key;
-Landroid/hardware/camera2/CaptureResult;->STATISTICS_FACE_RECTANGLES:Landroid/hardware/camera2/CaptureResult$Key;
-Landroid/hardware/camera2/CaptureResult;->STATISTICS_FACE_SCORES:Landroid/hardware/camera2/CaptureResult$Key;
-Landroid/hardware/camera2/CaptureResult;->STATISTICS_LENS_SHADING_MAP:Landroid/hardware/camera2/CaptureResult$Key;
-Landroid/hardware/camera2/CaptureResult;->STATISTICS_OIS_TIMESTAMPS:Landroid/hardware/camera2/CaptureResult$Key;
-Landroid/hardware/camera2/CaptureResult;->STATISTICS_OIS_X_SHIFTS:Landroid/hardware/camera2/CaptureResult$Key;
-Landroid/hardware/camera2/CaptureResult;->STATISTICS_OIS_Y_SHIFTS:Landroid/hardware/camera2/CaptureResult$Key;
-Landroid/hardware/camera2/CaptureResult;->STATISTICS_PREDICTED_COLOR_GAINS:Landroid/hardware/camera2/CaptureResult$Key;
-Landroid/hardware/camera2/CaptureResult;->STATISTICS_PREDICTED_COLOR_TRANSFORM:Landroid/hardware/camera2/CaptureResult$Key;
-Landroid/hardware/camera2/CaptureResult;->SYNC_FRAME_NUMBER:Landroid/hardware/camera2/CaptureResult$Key;
-Landroid/hardware/camera2/CaptureResult;->TONEMAP_CURVE_BLUE:Landroid/hardware/camera2/CaptureResult$Key;
-Landroid/hardware/camera2/CaptureResult;->TONEMAP_CURVE_GREEN:Landroid/hardware/camera2/CaptureResult$Key;
-Landroid/hardware/camera2/CaptureResult;->TONEMAP_CURVE_RED:Landroid/hardware/camera2/CaptureResult$Key;
-Landroid/hardware/camera2/impl/CameraMetadataNative$Key;->getTag()I
-Landroid/hardware/camera2/impl/CameraMetadataNative;->mMetadataPtr:J
-Landroid/hardware/camera2/impl/CameraMetadataNative;->nativeGetTagFromKeyLocal(Ljava/lang/String;)I
-Landroid/hardware/camera2/impl/CameraMetadataNative;->nativeGetTypeFromTagLocal(I)I
-Landroid/hardware/camera2/impl/CameraMetadataNative;->nativeReadValues(I)[B
-Landroid/hardware/camera2/utils/SurfaceUtils;->getSurfaceSize(Landroid/view/Surface;)Landroid/util/Size;
-Landroid/hardware/camera2/utils/TypeReference;-><init>()V
-Landroid/hardware/camera2/utils/TypeReference;->createSpecializedTypeReference(Ljava/lang/reflect/Type;)Landroid/hardware/camera2/utils/TypeReference;
-Landroid/hardware/Camera;->addCallbackBuffer([BI)V
-Landroid/hardware/Camera;->addRawImageCallbackBuffer([B)V
-Landroid/hardware/Camera;->CAMERA_HAL_API_VERSION_1_0:I
-Landroid/hardware/Camera;->getEmptyParameters()Landroid/hardware/Camera$Parameters;
-Landroid/hardware/Camera;->mNativeContext:J
-Landroid/hardware/Camera;->native_getParameters()Ljava/lang/String;
-Landroid/hardware/Camera;->native_setParameters(Ljava/lang/String;)V
-Landroid/hardware/Camera;->native_setup(Ljava/lang/Object;IILjava/lang/String;)I
-Landroid/hardware/Camera;->openLegacy(II)Landroid/hardware/Camera;
-Landroid/hardware/Camera;->postEventFromNative(Ljava/lang/Object;IIILjava/lang/Object;)V
-Landroid/hardware/Camera;->previewEnabled()Z
-Landroid/hardware/Camera;->setPreviewSurface(Landroid/view/Surface;)V
-Landroid/hardware/display/DisplayManager;->ACTION_WIFI_DISPLAY_STATUS_CHANGED:Ljava/lang/String;
-Landroid/hardware/display/DisplayManager;->connectWifiDisplay(Ljava/lang/String;)V
-Landroid/hardware/display/DisplayManager;->disconnectWifiDisplay()V
-Landroid/hardware/display/DisplayManager;->EXTRA_WIFI_DISPLAY_STATUS:Ljava/lang/String;
-Landroid/hardware/display/DisplayManager;->forgetWifiDisplay(Ljava/lang/String;)V
-Landroid/hardware/display/DisplayManager;->getWifiDisplayStatus()Landroid/hardware/display/WifiDisplayStatus;
-Landroid/hardware/display/DisplayManager;->pauseWifiDisplay()V
-Landroid/hardware/display/DisplayManager;->renameWifiDisplay(Ljava/lang/String;Ljava/lang/String;)V
-Landroid/hardware/display/DisplayManager;->resumeWifiDisplay()V
-Landroid/hardware/display/DisplayManager;->startWifiDisplayScan()V
-Landroid/hardware/display/DisplayManager;->stopWifiDisplayScan()V
-Landroid/hardware/display/DisplayManagerGlobal;->disconnectWifiDisplay()V
-Landroid/hardware/display/DisplayManagerGlobal;->getDisplayIds()[I
-Landroid/hardware/display/DisplayManagerGlobal;->getDisplayInfo(I)Landroid/view/DisplayInfo;
-Landroid/hardware/display/DisplayManagerGlobal;->getWifiDisplayStatus()Landroid/hardware/display/WifiDisplayStatus;
-Landroid/hardware/display/DisplayManagerGlobal;->mDm:Landroid/hardware/display/IDisplayManager;
-Landroid/hardware/display/DisplayManagerGlobal;->sInstance:Landroid/hardware/display/DisplayManagerGlobal;
Landroid/hardware/display/IDisplayManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/hardware/display/IDisplayManager;
Landroid/hardware/display/IDisplayManager;->getDisplayInfo(I)Landroid/view/DisplayInfo;
-Landroid/hardware/display/WifiDisplay;->canConnect()Z
-Landroid/hardware/display/WifiDisplay;->equals(Landroid/hardware/display/WifiDisplay;)Z
-Landroid/hardware/display/WifiDisplay;->getDeviceAddress()Ljava/lang/String;
-Landroid/hardware/display/WifiDisplay;->getDeviceAlias()Ljava/lang/String;
-Landroid/hardware/display/WifiDisplay;->getDeviceName()Ljava/lang/String;
-Landroid/hardware/display/WifiDisplay;->isAvailable()Z
-Landroid/hardware/display/WifiDisplay;->isRemembered()Z
-Landroid/hardware/display/WifiDisplayStatus;->DISPLAY_STATE_CONNECTED:I
-Landroid/hardware/display/WifiDisplayStatus;->DISPLAY_STATE_CONNECTING:I
-Landroid/hardware/display/WifiDisplayStatus;->DISPLAY_STATE_NOT_CONNECTED:I
-Landroid/hardware/display/WifiDisplayStatus;->FEATURE_STATE_ON:I
-Landroid/hardware/display/WifiDisplayStatus;->getActiveDisplay()Landroid/hardware/display/WifiDisplay;
-Landroid/hardware/display/WifiDisplayStatus;->getActiveDisplayState()I
-Landroid/hardware/display/WifiDisplayStatus;->getDisplays()[Landroid/hardware/display/WifiDisplay;
-Landroid/hardware/display/WifiDisplayStatus;->getFeatureState()I
-Landroid/hardware/display/WifiDisplayStatus;->getScanState()I
-Landroid/hardware/display/WifiDisplayStatus;->mActiveDisplay:Landroid/hardware/display/WifiDisplay;
-Landroid/hardware/display/WifiDisplayStatus;->mDisplays:[Landroid/hardware/display/WifiDisplay;
-Landroid/hardware/display/WifiDisplayStatus;->SCAN_STATE_NOT_SCANNING:I
-Landroid/hardware/fingerprint/FingerprintManager$AuthenticationResult;->getFingerprint()Landroid/hardware/fingerprint/Fingerprint;
-Landroid/hardware/fingerprint/FingerprintManager;->getAuthenticatorId()J
-Landroid/hardware/fingerprint/FingerprintManager;->getEnrolledFingerprints()Ljava/util/List;
-Landroid/hardware/fingerprint/FingerprintManager;->getEnrolledFingerprints(I)Ljava/util/List;
Landroid/hardware/fingerprint/IFingerprintService$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
Landroid/hardware/fingerprint/IFingerprintService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/hardware/fingerprint/IFingerprintService;
-Landroid/hardware/HardwareBuffer;-><init>(J)V
-Landroid/hardware/HardwareBuffer;->mNativeObject:J
Landroid/hardware/ICameraService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/hardware/ICameraService;
Landroid/hardware/input/IInputManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
Landroid/hardware/input/IInputManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/hardware/input/IInputManager;
Landroid/hardware/input/IInputManager$Stub;->TRANSACTION_injectInputEvent:I
Landroid/hardware/input/IInputManager;->injectInputEvent(Landroid/view/InputEvent;I)Z
-Landroid/hardware/input/InputManager;->createInputForwarder(I)Landroid/app/IInputForwarder;
-Landroid/hardware/input/InputManager;->getInstance()Landroid/hardware/input/InputManager;
-Landroid/hardware/input/InputManager;->injectInputEvent(Landroid/view/InputEvent;I)Z
-Landroid/hardware/input/InputManager;->INJECT_INPUT_EVENT_MODE_WAIT_FOR_FINISH:I
-Landroid/hardware/input/InputManager;->mIm:Landroid/hardware/input/IInputManager;
-Landroid/hardware/input/InputManager;->setPointerIconType(I)V
Landroid/hardware/location/IActivityRecognitionHardwareClient$Stub;-><init>()V
Landroid/hardware/location/IContextHubService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/hardware/location/IContextHubService;
-Landroid/hardware/Sensor;->getHandle()I
-Landroid/hardware/Sensor;->mFlags:I
-Landroid/hardware/Sensor;->TYPE_DEVICE_ORIENTATION:I
-Landroid/hardware/Sensor;->TYPE_PICK_UP_GESTURE:I
-Landroid/hardware/SensorEvent;-><init>(I)V
-Landroid/hardware/SensorManager;-><init>()V
-Landroid/hardware/SerialManager;->getSerialPorts()[Ljava/lang/String;
-Landroid/hardware/SerialManager;->openSerialPort(Ljava/lang/String;I)Landroid/hardware/SerialPort;
-Landroid/hardware/SerialPort;->close()V
-Landroid/hardware/SerialPort;->mNativeContext:I
-Landroid/hardware/SerialPort;->write(Ljava/nio/ByteBuffer;I)V
-Landroid/hardware/soundtrigger/SoundTrigger$ConfidenceLevel;-><init>(II)V
-Landroid/hardware/soundtrigger/SoundTrigger$ConfidenceLevel;->confidenceLevel:I
-Landroid/hardware/soundtrigger/SoundTrigger$ConfidenceLevel;->userId:I
-Landroid/hardware/soundtrigger/SoundTrigger$GenericRecognitionEvent;-><init>(IIZIIIZLandroid/media/AudioFormat;[B)V
-Landroid/hardware/soundtrigger/SoundTrigger$GenericSoundModel;-><init>(Ljava/util/UUID;Ljava/util/UUID;[B)V
-Landroid/hardware/soundtrigger/SoundTrigger$Keyphrase;-><init>(IILjava/lang/String;Ljava/lang/String;[I)V
-Landroid/hardware/soundtrigger/SoundTrigger$Keyphrase;->id:I
-Landroid/hardware/soundtrigger/SoundTrigger$Keyphrase;->locale:Ljava/lang/String;
-Landroid/hardware/soundtrigger/SoundTrigger$Keyphrase;->recognitionModes:I
-Landroid/hardware/soundtrigger/SoundTrigger$Keyphrase;->text:Ljava/lang/String;
-Landroid/hardware/soundtrigger/SoundTrigger$Keyphrase;->users:[I
-Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseRecognitionEvent;-><init>(IIZIIIZLandroid/media/AudioFormat;[B[Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseRecognitionExtra;)V
-Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseRecognitionEvent;->keyphraseExtras:[Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseRecognitionExtra;
-Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseRecognitionExtra;-><init>(III[Landroid/hardware/soundtrigger/SoundTrigger$ConfidenceLevel;)V
-Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseRecognitionExtra;->coarseConfidenceLevel:I
-Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseRecognitionExtra;->confidenceLevels:[Landroid/hardware/soundtrigger/SoundTrigger$ConfidenceLevel;
-Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseRecognitionExtra;->id:I
-Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseRecognitionExtra;->recognitionModes:I
-Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseSoundModel;-><init>(Ljava/util/UUID;Ljava/util/UUID;[B[Landroid/hardware/soundtrigger/SoundTrigger$Keyphrase;)V
-Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseSoundModel;->keyphrases:[Landroid/hardware/soundtrigger/SoundTrigger$Keyphrase;
-Landroid/hardware/soundtrigger/SoundTrigger$ModuleProperties;-><init>(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;IIIIIZIZIZ)V
-Landroid/hardware/soundtrigger/SoundTrigger$ModuleProperties;->id:I
-Landroid/hardware/soundtrigger/SoundTrigger$ModuleProperties;->maxSoundModels:I
-Landroid/hardware/soundtrigger/SoundTrigger$ModuleProperties;->uuid:Ljava/util/UUID;
-Landroid/hardware/soundtrigger/SoundTrigger$RecognitionConfig;-><init>(ZZ[Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseRecognitionExtra;[B)V
-Landroid/hardware/soundtrigger/SoundTrigger$RecognitionConfig;->captureRequested:Z
-Landroid/hardware/soundtrigger/SoundTrigger$RecognitionConfig;->data:[B
-Landroid/hardware/soundtrigger/SoundTrigger$RecognitionConfig;->keyphrases:[Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseRecognitionExtra;
-Landroid/hardware/soundtrigger/SoundTrigger$RecognitionEvent;-><init>(IIZIIIZLandroid/media/AudioFormat;[B)V
-Landroid/hardware/soundtrigger/SoundTrigger$RecognitionEvent;->captureAvailable:Z
-Landroid/hardware/soundtrigger/SoundTrigger$RecognitionEvent;->captureSession:I
-Landroid/hardware/soundtrigger/SoundTrigger$RecognitionEvent;->data:[B
-Landroid/hardware/soundtrigger/SoundTrigger$RecognitionEvent;->soundModelHandle:I
-Landroid/hardware/soundtrigger/SoundTrigger$RecognitionEvent;->status:I
-Landroid/hardware/soundtrigger/SoundTrigger$SoundModel;->data:[B
-Landroid/hardware/soundtrigger/SoundTrigger$SoundModel;->uuid:Ljava/util/UUID;
-Landroid/hardware/soundtrigger/SoundTrigger$SoundModel;->vendorUuid:Ljava/util/UUID;
-Landroid/hardware/soundtrigger/SoundTrigger$SoundModelEvent;-><init>(II[B)V
-Landroid/hardware/soundtrigger/SoundTrigger;->attachModule(ILandroid/hardware/soundtrigger/SoundTrigger$StatusListener;Landroid/os/Handler;)Landroid/hardware/soundtrigger/SoundTriggerModule;
-Landroid/hardware/soundtrigger/SoundTrigger;->listModules(Ljava/util/ArrayList;)I
-Landroid/hardware/soundtrigger/SoundTriggerModule;->detach()V
-Landroid/hardware/soundtrigger/SoundTriggerModule;->loadSoundModel(Landroid/hardware/soundtrigger/SoundTrigger$SoundModel;[I)I
-Landroid/hardware/soundtrigger/SoundTriggerModule;->mId:I
-Landroid/hardware/soundtrigger/SoundTriggerModule;->mNativeContext:J
-Landroid/hardware/soundtrigger/SoundTriggerModule;->postEventFromNative(Ljava/lang/Object;IIILjava/lang/Object;)V
-Landroid/hardware/soundtrigger/SoundTriggerModule;->startRecognition(ILandroid/hardware/soundtrigger/SoundTrigger$RecognitionConfig;)I
-Landroid/hardware/soundtrigger/SoundTriggerModule;->stopRecognition(I)I
-Landroid/hardware/soundtrigger/SoundTriggerModule;->unloadSoundModel(I)I
-Landroid/hardware/SystemSensorManager$BaseEventQueue;->dispatchAdditionalInfoEvent(III[F[I)V
-Landroid/hardware/SystemSensorManager$BaseEventQueue;->dispatchFlushCompleteEvent(I)V
-Landroid/hardware/SystemSensorManager$BaseEventQueue;->dispatchSensorEvent(I[FIJ)V
Landroid/hardware/usb/IUsbManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
Landroid/hardware/usb/IUsbManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/hardware/usb/IUsbManager;
-Landroid/hardware/usb/UsbDevice;->mInterfaces:[Landroid/hardware/usb/UsbInterface;
-Landroid/hardware/usb/UsbDeviceConnection;->mNativeContext:J
-Landroid/hardware/usb/UsbManager;-><init>(Landroid/content/Context;Landroid/hardware/usb/IUsbManager;)V
-Landroid/hardware/usb/UsbManager;->ACTION_USB_STATE:Ljava/lang/String;
-Landroid/hardware/usb/UsbManager;->getPorts()[Landroid/hardware/usb/UsbPort;
-Landroid/hardware/usb/UsbManager;->getPortStatus(Landroid/hardware/usb/UsbPort;)Landroid/hardware/usb/UsbPortStatus;
-Landroid/hardware/usb/UsbManager;->isFunctionEnabled(Ljava/lang/String;)Z
-Landroid/hardware/usb/UsbManager;->setCurrentFunction(Ljava/lang/String;Z)V
-Landroid/hardware/usb/UsbManager;->setPortRoles(Landroid/hardware/usb/UsbPort;II)V
-Landroid/hardware/usb/UsbManager;->USB_CONNECTED:Ljava/lang/String;
-Landroid/hardware/usb/UsbManager;->USB_DATA_UNLOCKED:Ljava/lang/String;
-Landroid/hardware/usb/UsbManager;->USB_FUNCTION_NONE:Ljava/lang/String;
-Landroid/hardware/usb/UsbPortStatus;->getCurrentDataRole()I
-Landroid/hardware/usb/UsbPortStatus;->getCurrentMode()I
-Landroid/hardware/usb/UsbPortStatus;->getCurrentPowerRole()I
-Landroid/hardware/usb/UsbPortStatus;->getSupportedRoleCombinations()I
-Landroid/hardware/usb/UsbPortStatus;->isConnected()Z
-Landroid/hardware/usb/UsbPortStatus;->isRoleCombinationSupported(II)Z
-Landroid/hardware/usb/UsbRequest;->mBuffer:Ljava/nio/ByteBuffer;
-Landroid/hardware/usb/UsbRequest;->mLength:I
-Landroid/hardware/usb/UsbRequest;->mNativeContext:J
Landroid/icu/impl/CurrencyData;-><init>()V
Landroid/icu/text/ArabicShaping;-><init>(I)V
Landroid/icu/text/ArabicShaping;->isAlefMaksouraChar(C)Z
@@ -4349,17 +4108,6 @@
Landroid/service/wallpaper/WallpaperService$Engine;->setFixedSizeAllowed(Z)V
Landroid/service/wallpaper/WallpaperService;->MSG_WINDOW_RESIZED:I
Landroid/speech/IRecognitionListener;->onEvent(ILandroid/os/Bundle;)V
-Landroid/speech/tts/TextToSpeech;->getCurrentEngine()Ljava/lang/String;
-Landroid/speech/tts/TextToSpeech;->mConnectingServiceConnection:Landroid/speech/tts/TextToSpeech$Connection;
-Landroid/speech/tts/TextToSpeech;->mCurrentEngine:Ljava/lang/String;
-Landroid/speech/tts/TextToSpeech;->mInitListener:Landroid/speech/tts/TextToSpeech$OnInitListener;
-Landroid/speech/tts/TtsEngines;-><init>(Landroid/content/Context;)V
-Landroid/speech/tts/TtsEngines;->getEngines()Ljava/util/List;
-Landroid/speech/tts/TtsEngines;->getLocalePrefForEngine(Ljava/lang/String;)Ljava/util/Locale;
-Landroid/speech/tts/TtsEngines;->getSettingsIntent(Ljava/lang/String;)Landroid/content/Intent;
-Landroid/speech/tts/TtsEngines;->normalizeTTSLocale(Ljava/util/Locale;)Ljava/util/Locale;
-Landroid/speech/tts/TtsEngines;->parseLocaleString(Ljava/lang/String;)Ljava/util/Locale;
-Landroid/speech/tts/TtsEngines;->updateLocalePrefForEngine(Ljava/lang/String;Ljava/util/Locale;)V
Landroid/system/Int32Ref;->value:I
Landroid/system/OsConstants;-><init>()V
Landroid/system/OsConstants;->AF_NETLINK:I
@@ -4837,7 +4585,6 @@
Landroid/text/SpannableStringBuilder;->sendToSpanWatchers(III)V
Landroid/text/SpannableStringBuilder;->substring(II)Ljava/lang/String;
Landroid/text/SpannableStringInternal;-><init>(Ljava/lang/CharSequence;II)V
-Landroid/text/SpannableStringInternal;->charAt(I)C
Landroid/text/SpannableStringInternal;->checkRange(Ljava/lang/String;II)V
Landroid/text/SpannableStringInternal;->COLUMNS:I
Landroid/text/SpannableStringInternal;->copySpans(Landroid/text/SpannableStringInternal;II)V
@@ -4845,14 +4592,12 @@
Landroid/text/SpannableStringInternal;->EMPTY:[Ljava/lang/Object;
Landroid/text/SpannableStringInternal;->END:I
Landroid/text/SpannableStringInternal;->FLAGS:I
-Landroid/text/SpannableStringInternal;->getChars(II[CI)V
Landroid/text/SpannableStringInternal;->getSpanEnd(Ljava/lang/Object;)I
Landroid/text/SpannableStringInternal;->getSpanFlags(Ljava/lang/Object;)I
Landroid/text/SpannableStringInternal;->getSpans(IILjava/lang/Class;)[Ljava/lang/Object;
Landroid/text/SpannableStringInternal;->getSpanStart(Ljava/lang/Object;)I
Landroid/text/SpannableStringInternal;->isIndexFollowsNextLine(I)Z
Landroid/text/SpannableStringInternal;->isOutOfCopyRange(IIII)Z
-Landroid/text/SpannableStringInternal;->length()I
Landroid/text/SpannableStringInternal;->mSpanCount:I
Landroid/text/SpannableStringInternal;->mSpanData:[I
Landroid/text/SpannableStringInternal;->mSpans:[Ljava/lang/Object;
diff --git a/config/hiddenapi-vendor-list.txt b/config/hiddenapi-vendor-list.txt
index 0353e65..4b4250d 100644
--- a/config/hiddenapi-vendor-list.txt
+++ b/config/hiddenapi-vendor-list.txt
@@ -1,4 +1,3 @@
-Landroid/accounts/AccountManager;-><init>(Landroid/content/Context;Landroid/accounts/IAccountManager;Landroid/os/Handler;)V
Landroid/app/Activity;->managedQuery(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;
Landroid/app/Activity;->registerRemoteAnimations(Landroid/view/RemoteAnimationDefinition;)V
Landroid/app/ActivityManager$TaskDescription;->loadTaskDescriptionIcon(Ljava/lang/String;I)Landroid/graphics/Bitmap;
@@ -92,10 +91,6 @@
Landroid/content/pm/IPackageStatsObserver;->onGetStatsCompleted(Landroid/content/pm/PackageStats;Z)V
Landroid/database/sqlite/SqliteWrapper;->insert(Landroid/content/Context;Landroid/content/ContentResolver;Landroid/net/Uri;Landroid/content/ContentValues;)Landroid/net/Uri;
Landroid/database/sqlite/SqliteWrapper;->query(Landroid/content/Context;Landroid/content/ContentResolver;Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;
-Landroid/hardware/camera2/CaptureRequest$Key;-><init>(Ljava/lang/String;Ljava/lang/Class;)V
-Landroid/hardware/display/DisplayManagerGlobal;->getInstance()Landroid/hardware/display/DisplayManagerGlobal;
-Landroid/hardware/display/DisplayManagerGlobal;->getRealDisplay(I)Landroid/view/Display;
-Landroid/hardware/location/GeofenceHardware;-><init>(Landroid/hardware/location/IGeofenceHardware;)V
Landroid/hardware/location/IActivityRecognitionHardwareClient;->onAvailabilityChanged(ZLandroid/hardware/location/IActivityRecognitionHardware;)V
Landroid/location/IGeocodeProvider;->getFromLocation(DDILandroid/location/GeocoderParams;Ljava/util/List;)Ljava/lang/String;
Landroid/location/IGeocodeProvider;->getFromLocationName(Ljava/lang/String;DDDDILandroid/location/GeocoderParams;Ljava/util/List;)Ljava/lang/String;
diff --git a/core/java/android/accounts/Account.java b/core/java/android/accounts/Account.java
index b6e85f1..f07f5ec 100644
--- a/core/java/android/accounts/Account.java
+++ b/core/java/android/accounts/Account.java
@@ -18,6 +18,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.os.Parcelable;
import android.os.Parcel;
@@ -36,6 +37,7 @@
* suitable for use as the key of a {@link java.util.Map}
*/
public class Account implements Parcelable {
+ @UnsupportedAppUsage
private static final String TAG = "Account";
@GuardedBy("sAccessedAccounts")
@@ -43,6 +45,7 @@
public final String name;
public final String type;
+ @UnsupportedAppUsage
private final @Nullable String accessId;
public boolean equals(Object o) {
diff --git a/core/java/android/accounts/AccountAndUser.java b/core/java/android/accounts/AccountAndUser.java
index 04157cc..b0d5343 100644
--- a/core/java/android/accounts/AccountAndUser.java
+++ b/core/java/android/accounts/AccountAndUser.java
@@ -16,15 +16,20 @@
package android.accounts;
+import android.annotation.UnsupportedAppUsage;
+
/**
* Used to store the Account and the UserId this account is associated with.
*
* @hide
*/
public class AccountAndUser {
+ @UnsupportedAppUsage
public Account account;
+ @UnsupportedAppUsage
public int userId;
+ @UnsupportedAppUsage
public AccountAndUser(Account account, int userId) {
this.account = account;
this.userId = userId;
diff --git a/core/java/android/accounts/AccountAuthenticatorResponse.java b/core/java/android/accounts/AccountAuthenticatorResponse.java
index 41f26ac..bcc9f90 100644
--- a/core/java/android/accounts/AccountAuthenticatorResponse.java
+++ b/core/java/android/accounts/AccountAuthenticatorResponse.java
@@ -16,6 +16,7 @@
package android.accounts;
+import android.annotation.UnsupportedAppUsage;
import android.os.Bundle;
import android.os.Parcelable;
import android.os.Parcel;
@@ -33,6 +34,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public AccountAuthenticatorResponse(IAccountAuthenticatorResponse response) {
mAccountAuthenticatorResponse = response;
}
diff --git a/core/java/android/accounts/AccountManager.java b/core/java/android/accounts/AccountManager.java
index 5176d71e..3189d08 100644
--- a/core/java/android/accounts/AccountManager.java
+++ b/core/java/android/accounts/AccountManager.java
@@ -27,6 +27,7 @@
import android.annotation.SystemService;
import android.annotation.SdkConstant.SdkConstantType;
import android.annotation.BroadcastBehavior;
+import android.annotation.UnsupportedAppUsage;
import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
@@ -336,6 +337,7 @@
public static final String ACCOUNT_ACCESS_TOKEN_TYPE =
"com.android.AccountManager.ACCOUNT_ACCESS_TOKEN_TYPE";
+ @UnsupportedAppUsage
private final Context mContext;
private final IAccountManager mService;
private final Handler mMainHandler;
@@ -409,6 +411,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public AccountManager(Context context, IAccountManager service) {
mContext = context;
mService = service;
@@ -418,6 +421,7 @@
/**
* @hide used for testing only
*/
+ @UnsupportedAppUsage
public AccountManager(Context context, IAccountManager service, Handler handler) {
mContext = context;
mService = service;
@@ -685,6 +689,7 @@
/** @hide Same as {@link #getAccountsByType(String)} but for a specific user. */
@NonNull
+ @UnsupportedAppUsage
public Account[] getAccountsByTypeAsUser(String type, UserHandle userHandle) {
try {
return mService.getAccountsAsUser(type, userHandle.getIdentifier(),
@@ -2014,6 +2019,7 @@
* Same as {@link #confirmCredentials(Account, Bundle, Activity, AccountManagerCallback, Handler)}
* but for the specified user.
*/
+ @UnsupportedAppUsage
public AccountManagerFuture<Bundle> confirmCredentialsAsUser(final Account account,
final Bundle options,
final Activity activity,
@@ -2225,9 +2231,12 @@
}
private abstract class AmsTask extends FutureTask<Bundle> implements AccountManagerFuture<Bundle> {
+ @UnsupportedAppUsage
final IAccountManagerResponse mResponse;
+ @UnsupportedAppUsage
final Handler mHandler;
final AccountManagerCallback<Bundle> mCallback;
+ @UnsupportedAppUsage
final Activity mActivity;
public AmsTask(Activity activity, Handler handler, AccountManagerCallback<Bundle> callback) {
super(new Callable<Bundle>() {
@@ -2552,10 +2561,13 @@
}
volatile AccountManagerFuture<Bundle> mFuture = null;
final String mAccountType;
+ @UnsupportedAppUsage
final String mAuthTokenType;
final String[] mFeatures;
final Bundle mAddAccountOptions;
+ @UnsupportedAppUsage
final Bundle mLoginOptions;
+ @UnsupportedAppUsage
final AccountManagerCallback<Bundle> mMyCallback;
private volatile int mNumAccounts = 0;
diff --git a/core/java/android/accounts/AuthenticatorDescription.java b/core/java/android/accounts/AuthenticatorDescription.java
index 5d9abb0..6875867 100644
--- a/core/java/android/accounts/AuthenticatorDescription.java
+++ b/core/java/android/accounts/AuthenticatorDescription.java
@@ -16,6 +16,7 @@
package android.accounts;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcelable;
import android.os.Parcel;
@@ -76,6 +77,7 @@
return new AuthenticatorDescription(type);
}
+ @UnsupportedAppUsage
private AuthenticatorDescription(String type) {
this.type = type;
this.packageName = null;
@@ -86,6 +88,7 @@
this.customTokens = false;
}
+ @UnsupportedAppUsage
private AuthenticatorDescription(Parcel source) {
this.type = source.readString();
this.packageName = source.readString();
diff --git a/core/java/android/app/ActivityManagerInternal.java b/core/java/android/app/ActivityManagerInternal.java
index 2baae92..87366db 100644
--- a/core/java/android/app/ActivityManagerInternal.java
+++ b/core/java/android/app/ActivityManagerInternal.java
@@ -18,21 +18,13 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
-import android.content.ComponentName;
import android.content.IIntentSender;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.UserInfo;
-import android.content.res.Configuration;
-import android.os.Bundle;
import android.os.IBinder;
-import android.os.SystemClock;
-import android.service.voice.IVoiceInteractionSession;
-import android.util.SparseIntArray;
import android.view.RemoteAnimationAdapter;
-import com.android.internal.app.IVoiceInteractor;
-
import java.util.ArrayList;
import java.util.List;
@@ -231,4 +223,7 @@
/** Schedule the execution of all pending app GCs. */
public abstract void scheduleAppGcs();
+
+ /** Gets the task id for a given activity. */
+ public abstract int getTaskIdForActivity(@NonNull IBinder token, boolean onlyRoot);
}
diff --git a/core/java/android/app/JobSchedulerImpl.java b/core/java/android/app/JobSchedulerImpl.java
index 4ac44f7..5494e2a 100644
--- a/core/java/android/app/JobSchedulerImpl.java
+++ b/core/java/android/app/JobSchedulerImpl.java
@@ -17,16 +17,15 @@
// in android.app so ContextImpl has package access
package android.app;
+import android.app.job.IJobScheduler;
import android.app.job.JobInfo;
import android.app.job.JobScheduler;
-import android.app.job.IJobScheduler;
+import android.app.job.JobSnapshot;
import android.app.job.JobWorkItem;
-import android.content.Intent;
import android.os.RemoteException;
import java.util.List;
-
/**
* Concrete implementation of the JobScheduler interface
* @hide
@@ -98,4 +97,22 @@
return null;
}
}
+
+ @Override
+ public List<JobInfo> getStartedJobs() {
+ try {
+ return mBinder.getStartedJobs();
+ } catch (RemoteException e) {
+ return null;
+ }
+ }
+
+ @Override
+ public List<JobSnapshot> getAllJobSnapshots() {
+ try {
+ return mBinder.getAllJobSnapshots();
+ } catch (RemoteException e) {
+ return null;
+ }
+ }
}
diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java
index cbd8741..dfdb7eb 100644
--- a/core/java/android/app/admin/DevicePolicyManager.java
+++ b/core/java/android/app/admin/DevicePolicyManager.java
@@ -7722,6 +7722,9 @@
* LockTask mode will be registered, but will only take effect when the device leaves LockTask
* mode.
*
+ * <p>This policy does not have any effect while on the lock screen, where the status bar will
+ * not be disabled. Using LockTask instead of this method is recommended.
+ *
* @param admin Which {@link DeviceAdminReceiver} this request is associated with.
* @param disabled {@code true} disables the status bar, {@code false} reenables it.
* @return {@code false} if attempting to disable the status bar failed. {@code true} otherwise.
diff --git a/core/java/android/app/job/IJobScheduler.aidl b/core/java/android/app/job/IJobScheduler.aidl
index e94da0c..53b33c2 100644
--- a/core/java/android/app/job/IJobScheduler.aidl
+++ b/core/java/android/app/job/IJobScheduler.aidl
@@ -17,6 +17,7 @@
package android.app.job;
import android.app.job.JobInfo;
+import android.app.job.JobSnapshot;
import android.app.job.JobWorkItem;
/**
@@ -31,4 +32,6 @@
void cancelAll();
List<JobInfo> getAllPendingJobs();
JobInfo getPendingJob(int jobId);
+ List<JobInfo> getStartedJobs();
+ List<JobSnapshot> getAllJobSnapshots();
}
diff --git a/core/java/android/app/job/JobScheduler.java b/core/java/android/app/job/JobScheduler.java
index 0deb2e1..08b1c2b 100644
--- a/core/java/android/app/job/JobScheduler.java
+++ b/core/java/android/app/job/JobScheduler.java
@@ -172,4 +172,20 @@
* if the supplied job ID does not correspond to any job.
*/
public abstract @Nullable JobInfo getPendingJob(int jobId);
-}
+
+ /**
+ * <b>For internal system callers only!</b>
+ * Returns a list of all currently-executing jobs.
+ * @hide
+ */
+ public abstract List<JobInfo> getStartedJobs();
+
+ /**
+ * <b>For internal system callers only!</b>
+ * Returns a snapshot of the state of all jobs known to the system.
+ *
+ * <p class="note">This is a slow operation, so it should be called sparingly.
+ * @hide
+ */
+ public abstract List<JobSnapshot> getAllJobSnapshots();
+}
\ No newline at end of file
diff --git a/core/java/android/app/job/JobSnapshot.aidl b/core/java/android/app/job/JobSnapshot.aidl
new file mode 100644
index 0000000..d40f4e3
--- /dev/null
+++ b/core/java/android/app/job/JobSnapshot.aidl
@@ -0,0 +1,19 @@
+/**
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.app.job;
+
+parcelable JobSnapshot;
diff --git a/core/java/android/app/job/JobSnapshot.java b/core/java/android/app/job/JobSnapshot.java
new file mode 100644
index 0000000..d6cc70d
--- /dev/null
+++ b/core/java/android/app/job/JobSnapshot.java
@@ -0,0 +1,111 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.app.job;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+/**
+ * Current-state snapshot of a scheduled job. These snapshots are not used in apps;
+ * they exist only within the system process across the local call surface where JobStatus
+ * is not directly accessible at build time.
+ *
+ * Constraints that the underlying job does not require are always reported as
+ * being currently satisfied.
+ * @hide
+ */
+public class JobSnapshot implements Parcelable {
+ private final JobInfo mJob;
+ private final int mSatisfiedConstraints;
+ private final boolean mIsRunnable;
+
+ public JobSnapshot(JobInfo info, int satisfiedMask, boolean runnable) {
+ mJob = info;
+ mSatisfiedConstraints = satisfiedMask;
+ mIsRunnable = runnable;
+ }
+
+ public JobSnapshot(Parcel in) {
+ mJob = JobInfo.CREATOR.createFromParcel(in);
+ mSatisfiedConstraints = in.readInt();
+ mIsRunnable = in.readBoolean();
+ }
+
+ private boolean satisfied(int flag) {
+ return (mSatisfiedConstraints & flag) != 0;
+ }
+
+ /**
+ * Is this job actually runnable at this moment?
+ */
+ public boolean isRunnable() {
+ return mIsRunnable;
+ }
+
+ /**
+ * @see JobInfo.Builder#setRequiresCharging(boolean)
+ */
+ public boolean isChargingSatisfied() {
+ return !mJob.isRequireCharging()
+ || satisfied(JobInfo.CONSTRAINT_FLAG_CHARGING);
+ }
+
+ /**
+ * @see JobInfo.Builder#setRequiresBatteryNotLow(boolean)
+ */
+ public boolean isBatteryNotLowSatisfied() {
+ return !mJob.isRequireBatteryNotLow()
+ || satisfied(JobInfo.CONSTRAINT_FLAG_BATTERY_NOT_LOW);
+ }
+
+ /**
+ * @see JobInfo.Builder#setRequiresDeviceIdle(boolean)
+ */
+ public boolean isRequireDeviceIdleSatisfied() {
+ return !mJob.isRequireDeviceIdle()
+ || satisfied(JobInfo.CONSTRAINT_FLAG_BATTERY_NOT_LOW);
+ }
+
+ public boolean isRequireStorageNotLowSatisfied() {
+ return !mJob.isRequireStorageNotLow()
+ || satisfied(JobInfo.CONSTRAINT_FLAG_STORAGE_NOT_LOW);
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(Parcel out, int flags) {
+ mJob.writeToParcel(out, flags);
+ out.writeInt(mSatisfiedConstraints);
+ out.writeBoolean(mIsRunnable);
+ }
+
+ public static final Creator<JobSnapshot> CREATOR = new Creator<JobSnapshot>() {
+ @Override
+ public JobSnapshot createFromParcel(Parcel in) {
+ return new JobSnapshot(in);
+ }
+
+ @Override
+ public JobSnapshot[] newArray(int size) {
+ return new JobSnapshot[size];
+ }
+ };
+}
diff --git a/core/java/android/bluetooth/BluetoothClass.java b/core/java/android/bluetooth/BluetoothClass.java
index 8557f38..3a78cbd 100755
--- a/core/java/android/bluetooth/BluetoothClass.java
+++ b/core/java/android/bluetooth/BluetoothClass.java
@@ -16,6 +16,7 @@
package android.bluetooth;
+import android.annotation.TestApi;
import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -293,6 +294,7 @@
*
* @hide
*/
+ @TestApi
public int getClassOfDevice() {
return mClass;
}
diff --git a/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java b/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
index 0fb4ba1..13c5ff6 100644
--- a/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
+++ b/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
@@ -411,7 +411,14 @@
try {
gatt = mBluetoothManager.getBluetoothGatt();
} catch (RemoteException e) {
- Log.e(TAG, "Failed to get Bluetooth gatt - ", e);
+ Log.e(TAG, "Failed to get Bluetooth GATT - ", e);
+ postStartSetFailure(handler, callback,
+ AdvertiseCallback.ADVERTISE_FAILED_INTERNAL_ERROR);
+ return;
+ }
+
+ if (gatt == null) {
+ Log.e(TAG, "Bluetooth GATT is null");
postStartSetFailure(handler, callback,
AdvertiseCallback.ADVERTISE_FAILED_INTERNAL_ERROR);
return;
diff --git a/core/java/android/content/ContentProvider.java b/core/java/android/content/ContentProvider.java
index cdeaea3..7bde871 100644
--- a/core/java/android/content/ContentProvider.java
+++ b/core/java/android/content/ContentProvider.java
@@ -21,6 +21,7 @@
import static android.app.AppOpsManager.MODE_ERRORED;
import static android.app.AppOpsManager.MODE_IGNORED;
import static android.content.pm.PackageManager.PERMISSION_GRANTED;
+import static android.os.Trace.TRACE_TAG_DATABASE;
import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -42,6 +43,7 @@
import android.os.ParcelFileDescriptor;
import android.os.Process;
import android.os.RemoteException;
+import android.os.Trace;
import android.os.UserHandle;
import android.os.storage.StorageManager;
import android.text.TextUtils;
@@ -235,6 +237,7 @@
// Return an empty cursor for all columns.
return new MatrixCursor(cursor.getColumnNames(), 0);
}
+ Trace.traceBegin(TRACE_TAG_DATABASE, "query");
final String original = setCallingPackage(callingPkg);
try {
return ContentProvider.this.query(
@@ -242,6 +245,7 @@
CancellationSignal.fromTransport(cancellationSignal));
} finally {
setCallingPackage(original);
+ Trace.traceEnd(TRACE_TAG_DATABASE);
}
}
@@ -249,7 +253,12 @@
public String getType(Uri uri) {
validateIncomingUri(uri);
uri = maybeGetUriWithoutUserId(uri);
- return ContentProvider.this.getType(uri);
+ Trace.traceBegin(TRACE_TAG_DATABASE, "getType");
+ try {
+ return ContentProvider.this.getType(uri);
+ } finally {
+ Trace.traceEnd(TRACE_TAG_DATABASE);
+ }
}
@Override
@@ -260,11 +269,13 @@
if (enforceWritePermission(callingPkg, uri, null) != AppOpsManager.MODE_ALLOWED) {
return rejectInsert(uri, initialValues);
}
+ Trace.traceBegin(TRACE_TAG_DATABASE, "insert");
final String original = setCallingPackage(callingPkg);
try {
return maybeAddUserId(ContentProvider.this.insert(uri, initialValues), userId);
} finally {
setCallingPackage(original);
+ Trace.traceEnd(TRACE_TAG_DATABASE);
}
}
@@ -275,11 +286,13 @@
if (enforceWritePermission(callingPkg, uri, null) != AppOpsManager.MODE_ALLOWED) {
return 0;
}
+ Trace.traceBegin(TRACE_TAG_DATABASE, "bulkInsert");
final String original = setCallingPackage(callingPkg);
try {
return ContentProvider.this.bulkInsert(uri, initialValues);
} finally {
setCallingPackage(original);
+ Trace.traceEnd(TRACE_TAG_DATABASE);
}
}
@@ -312,6 +325,7 @@
}
}
}
+ Trace.traceBegin(TRACE_TAG_DATABASE, "applyBatch");
final String original = setCallingPackage(callingPkg);
try {
ContentProviderResult[] results = ContentProvider.this.applyBatch(operations);
@@ -326,6 +340,7 @@
return results;
} finally {
setCallingPackage(original);
+ Trace.traceEnd(TRACE_TAG_DATABASE);
}
}
@@ -336,11 +351,13 @@
if (enforceWritePermission(callingPkg, uri, null) != AppOpsManager.MODE_ALLOWED) {
return 0;
}
+ Trace.traceBegin(TRACE_TAG_DATABASE, "delete");
final String original = setCallingPackage(callingPkg);
try {
return ContentProvider.this.delete(uri, selection, selectionArgs);
} finally {
setCallingPackage(original);
+ Trace.traceEnd(TRACE_TAG_DATABASE);
}
}
@@ -352,11 +369,13 @@
if (enforceWritePermission(callingPkg, uri, null) != AppOpsManager.MODE_ALLOWED) {
return 0;
}
+ Trace.traceBegin(TRACE_TAG_DATABASE, "update");
final String original = setCallingPackage(callingPkg);
try {
return ContentProvider.this.update(uri, values, selection, selectionArgs);
} finally {
setCallingPackage(original);
+ Trace.traceEnd(TRACE_TAG_DATABASE);
}
}
@@ -367,12 +386,14 @@
validateIncomingUri(uri);
uri = maybeGetUriWithoutUserId(uri);
enforceFilePermission(callingPkg, uri, mode, callerToken);
+ Trace.traceBegin(TRACE_TAG_DATABASE, "openFile");
final String original = setCallingPackage(callingPkg);
try {
return ContentProvider.this.openFile(
uri, mode, CancellationSignal.fromTransport(cancellationSignal));
} finally {
setCallingPackage(original);
+ Trace.traceEnd(TRACE_TAG_DATABASE);
}
}
@@ -383,12 +404,14 @@
validateIncomingUri(uri);
uri = maybeGetUriWithoutUserId(uri);
enforceFilePermission(callingPkg, uri, mode, null);
+ Trace.traceBegin(TRACE_TAG_DATABASE, "openAssetFile");
final String original = setCallingPackage(callingPkg);
try {
return ContentProvider.this.openAssetFile(
uri, mode, CancellationSignal.fromTransport(cancellationSignal));
} finally {
setCallingPackage(original);
+ Trace.traceEnd(TRACE_TAG_DATABASE);
}
}
@@ -396,11 +419,13 @@
public Bundle call(
String callingPkg, String method, @Nullable String arg, @Nullable Bundle extras) {
Bundle.setDefusable(extras, true);
+ Trace.traceBegin(TRACE_TAG_DATABASE, "call");
final String original = setCallingPackage(callingPkg);
try {
return ContentProvider.this.call(method, arg, extras);
} finally {
setCallingPackage(original);
+ Trace.traceEnd(TRACE_TAG_DATABASE);
}
}
@@ -408,7 +433,12 @@
public String[] getStreamTypes(Uri uri, String mimeTypeFilter) {
validateIncomingUri(uri);
uri = maybeGetUriWithoutUserId(uri);
- return ContentProvider.this.getStreamTypes(uri, mimeTypeFilter);
+ Trace.traceBegin(TRACE_TAG_DATABASE, "getStreamTypes");
+ try {
+ return ContentProvider.this.getStreamTypes(uri, mimeTypeFilter);
+ } finally {
+ Trace.traceEnd(TRACE_TAG_DATABASE);
+ }
}
@Override
@@ -418,12 +448,14 @@
validateIncomingUri(uri);
uri = maybeGetUriWithoutUserId(uri);
enforceFilePermission(callingPkg, uri, "r", null);
+ Trace.traceBegin(TRACE_TAG_DATABASE, "openTypedAssetFile");
final String original = setCallingPackage(callingPkg);
try {
return ContentProvider.this.openTypedAssetFile(
uri, mimeType, opts, CancellationSignal.fromTransport(cancellationSignal));
} finally {
setCallingPackage(original);
+ Trace.traceEnd(TRACE_TAG_DATABASE);
}
}
@@ -440,11 +472,13 @@
if (enforceReadPermission(callingPkg, uri, null) != AppOpsManager.MODE_ALLOWED) {
return null;
}
+ Trace.traceBegin(TRACE_TAG_DATABASE, "canonicalize");
final String original = setCallingPackage(callingPkg);
try {
return maybeAddUserId(ContentProvider.this.canonicalize(uri), userId);
} finally {
setCallingPackage(original);
+ Trace.traceEnd(TRACE_TAG_DATABASE);
}
}
@@ -456,11 +490,13 @@
if (enforceReadPermission(callingPkg, uri, null) != AppOpsManager.MODE_ALLOWED) {
return null;
}
+ Trace.traceBegin(TRACE_TAG_DATABASE, "uncanonicalize");
final String original = setCallingPackage(callingPkg);
try {
return maybeAddUserId(ContentProvider.this.uncanonicalize(uri), userId);
} finally {
setCallingPackage(original);
+ Trace.traceEnd(TRACE_TAG_DATABASE);
}
}
@@ -472,12 +508,14 @@
if (enforceReadPermission(callingPkg, uri, null) != AppOpsManager.MODE_ALLOWED) {
return false;
}
+ Trace.traceBegin(TRACE_TAG_DATABASE, "refresh");
final String original = setCallingPackage(callingPkg);
try {
return ContentProvider.this.refresh(uri, args,
CancellationSignal.fromTransport(cancellationSignal));
} finally {
setCallingPackage(original);
+ Trace.traceEnd(TRACE_TAG_DATABASE);
}
}
diff --git a/core/java/android/database/sqlite/SQLiteConnection.java b/core/java/android/database/sqlite/SQLiteConnection.java
index 3597260..47a5138 100644
--- a/core/java/android/database/sqlite/SQLiteConnection.java
+++ b/core/java/android/database/sqlite/SQLiteConnection.java
@@ -609,7 +609,9 @@
applyBlockGuardPolicy(statement);
attachCancellationSignal(cancellationSignal);
try {
- return nativeExecuteForLong(mConnectionPtr, statement.mStatementPtr);
+ long ret = nativeExecuteForLong(mConnectionPtr, statement.mStatementPtr);
+ mRecentOperations.setResult(ret);
+ return ret;
} finally {
detachCancellationSignal(cancellationSignal);
}
@@ -652,7 +654,9 @@
applyBlockGuardPolicy(statement);
attachCancellationSignal(cancellationSignal);
try {
- return nativeExecuteForString(mConnectionPtr, statement.mStatementPtr);
+ String ret = nativeExecuteForString(mConnectionPtr, statement.mStatementPtr);
+ mRecentOperations.setResult(ret);
+ return ret;
} finally {
detachCancellationSignal(cancellationSignal);
}
@@ -1312,12 +1316,17 @@
private int mIndex;
private int mGeneration;
private final SQLiteConnectionPool mPool;
+ private long mResultLong = Long.MIN_VALUE;
+ private String mResultString;
OperationLog(SQLiteConnectionPool pool) {
mPool = pool;
}
public int beginOperation(String kind, String sql, Object[] bindArgs) {
+ mResultLong = Long.MIN_VALUE;
+ mResultString = null;
+
synchronized (mOperations) {
final int index = (mIndex + 1) % MAX_RECENT_OPERATIONS;
Operation operation = mOperations[index];
@@ -1335,6 +1344,9 @@
operation.mStartTime = SystemClock.uptimeMillis();
operation.mKind = kind;
operation.mSql = sql;
+ operation.mPath = mPool.getPath();
+ operation.mResultLong = Long.MIN_VALUE;
+ operation.mResultString = null;
if (bindArgs != null) {
if (operation.mBindArgs == null) {
operation.mBindArgs = new ArrayList<Object>();
@@ -1390,6 +1402,14 @@
}
}
+ public void setResult(long longResult) {
+ mResultLong = longResult;
+ }
+
+ public void setResult(String stringResult) {
+ mResultString = stringResult;
+ }
+
private boolean endOperationDeferLogLocked(int cookie) {
final Operation operation = getOperationLocked(cookie);
if (operation != null) {
@@ -1409,6 +1429,8 @@
private void logOperationLocked(int cookie, String detail) {
final Operation operation = getOperationLocked(cookie);
+ operation.mResultLong = mResultLong;
+ operation.mResultString = mResultString;
StringBuilder msg = new StringBuilder();
operation.describe(msg, true);
if (detail != null) {
@@ -1491,8 +1513,11 @@
public boolean mFinished;
public Exception mException;
public int mCookie;
+ public String mPath;
+ public long mResultLong; // MIN_VALUE means "value not set".
+ public String mResultString;
- public void describe(StringBuilder msg, boolean allowBindArgsLog) {
+ public void describe(StringBuilder msg, boolean allowDetailedLog) {
msg.append(mKind);
if (mFinished) {
msg.append(" took ").append(mEndTime - mStartTime).append("ms");
@@ -1504,8 +1529,9 @@
if (mSql != null) {
msg.append(", sql=\"").append(trimSqlForDisplay(mSql)).append("\"");
}
- if (allowBindArgsLog && Consts.DEBUG_LOG_BIND_ARGS
- && mBindArgs != null && mBindArgs.size() != 0) {
+ final boolean dumpDetails = allowDetailedLog && Consts.DEBUG_LOG_DETAILED
+ && mBindArgs != null && mBindArgs.size() != 0;
+ if (dumpDetails) {
msg.append(", bindArgs=[");
final int count = mBindArgs.size();
for (int i = 0; i < count; i++) {
@@ -1525,9 +1551,16 @@
}
msg.append("]");
}
+ msg.append(", path=").append(mPath);
if (mException != null) {
msg.append(", exception=\"").append(mException.getMessage()).append("\"");
}
+ if (mResultLong != Long.MIN_VALUE) {
+ msg.append(", result=").append(mResultLong);
+ }
+ if (mResultString != null) {
+ msg.append(", result=\"").append(mResultString).append("\"");
+ }
}
private String getStatus() {
diff --git a/core/java/android/database/sqlite/SQLiteConnectionPool.java b/core/java/android/database/sqlite/SQLiteConnectionPool.java
index e519302..3ee348b 100644
--- a/core/java/android/database/sqlite/SQLiteConnectionPool.java
+++ b/core/java/android/database/sqlite/SQLiteConnectionPool.java
@@ -1183,6 +1183,10 @@
return "SQLiteConnectionPool: " + mConfiguration.path;
}
+ public String getPath() {
+ return mConfiguration.path;
+ }
+
private static final class ConnectionWaiter {
public ConnectionWaiter mNext;
public Thread mThread;
diff --git a/core/java/android/database/sqlite/SQLiteDebug.java b/core/java/android/database/sqlite/SQLiteDebug.java
index 790af6a..1c66204 100644
--- a/core/java/android/database/sqlite/SQLiteDebug.java
+++ b/core/java/android/database/sqlite/SQLiteDebug.java
@@ -77,10 +77,10 @@
SLOW_QUERY_THRESHOLD_PROP + "." + Process.myUid();
/**
- * Whether to log bind args in slow query log or not.
+ * Whether to add detailed information to slow query log.
*/
- public static final boolean DEBUG_LOG_BIND_ARGS = Build.IS_DEBUGGABLE
- && SystemProperties.getBoolean("db.log.bindargs", false);
+ public static final boolean DEBUG_LOG_DETAILED = Build.IS_DEBUGGABLE
+ && SystemProperties.getBoolean("db.log.detailed", false);
}
private SQLiteDebug() {
diff --git a/core/java/android/hardware/Camera.java b/core/java/android/hardware/Camera.java
index 22e1f45..8e96f56 100644
--- a/core/java/android/hardware/Camera.java
+++ b/core/java/android/hardware/Camera.java
@@ -21,6 +21,7 @@
import android.annotation.Nullable;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActivityThread;
import android.app.AppOpsManager;
import android.content.Context;
@@ -164,6 +165,7 @@
private static final int CAMERA_MSG_PREVIEW_METADATA = 0x400;
private static final int CAMERA_MSG_FOCUS_MOVE = 0x800;
+ @UnsupportedAppUsage
private long mNativeContext; // accessed by native methods
private EventHandler mEventHandler;
private ShutterCallback mShutterCallback;
@@ -236,6 +238,7 @@
* Camera HAL device API version 1.0
* @hide
*/
+ @UnsupportedAppUsage
public static final int CAMERA_HAL_API_VERSION_1_0 = 0x100;
/**
@@ -451,6 +454,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static Camera openLegacy(int cameraId, int halVersion) {
if (halVersion < CAMERA_HAL_API_VERSION_1_0) {
throw new IllegalArgumentException("Invalid HAL version " + halVersion);
@@ -604,6 +608,7 @@
release();
}
+ @UnsupportedAppUsage
private native final int native_setup(Object camera_this, int cameraId, int halVersion,
String packageName);
@@ -716,6 +721,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public native final void setPreviewSurface(Surface surface) throws IOException;
/**
@@ -839,6 +845,7 @@
* FIXME: Unhide before release
* @hide
*/
+ @UnsupportedAppUsage
public native final boolean previewEnabled();
/**
@@ -1012,11 +1019,13 @@
*
* {@hide}
*/
+ @UnsupportedAppUsage
public final void addRawImageCallbackBuffer(byte[] callbackBuffer)
{
addCallbackBuffer(callbackBuffer, CAMERA_MSG_RAW_IMAGE);
}
+ @UnsupportedAppUsage
private final void addCallbackBuffer(byte[] callbackBuffer, int msgType)
{
// CAMERA_MSG_VIDEO_FRAME may be allowed in the future.
@@ -1263,6 +1272,7 @@
}
}
+ @UnsupportedAppUsage
private static void postEventFromNative(Object camera_ref,
int what, int arg1, int arg2, Object obj)
{
@@ -2075,7 +2085,9 @@
mDetailedErrorCallback = cb;
}
+ @UnsupportedAppUsage
private native final void native_setParameters(String params);
+ @UnsupportedAppUsage
private native final String native_getParameters();
/**
@@ -2124,6 +2136,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static Parameters getEmptyParameters() {
Camera camera = new Camera();
return camera.new Parameters();
@@ -2658,6 +2671,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void copyFrom(Parameters other) {
if (other == null) {
throw new NullPointerException("other must not be null");
@@ -2689,6 +2703,7 @@
* @deprecated
*/
@Deprecated
+ @UnsupportedAppUsage
public void dump() {
Log.e(TAG, "dump: size=" + mMap.size());
for (String k : mMap.keySet()) {
@@ -4407,6 +4422,7 @@
// Splits a comma delimited string to an ArrayList of Area objects.
// Example string: "(-10,-10,0,0,300),(0,0,10,10,700)". Return null if
// the passing string is null or the size is 0 or (0,0,0,0,0).
+ @UnsupportedAppUsage
private ArrayList<Area> splitArea(String str) {
if (str == null || str.charAt(0) != '('
|| str.charAt(str.length() - 1) != ')') {
diff --git a/core/java/android/hardware/HardwareBuffer.java b/core/java/android/hardware/HardwareBuffer.java
index 9aa3f40..c17aabb 100644
--- a/core/java/android/hardware/HardwareBuffer.java
+++ b/core/java/android/hardware/HardwareBuffer.java
@@ -19,6 +19,7 @@
import android.annotation.IntDef;
import android.annotation.LongDef;
import android.annotation.NonNull;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -89,6 +90,7 @@
public static final int S_UI8 = 0x35;
// Note: do not rename, this field is used by native code
+ @UnsupportedAppUsage
private long mNativeObject;
// Invoked on destruction
@@ -182,6 +184,7 @@
* Private use only. See {@link #create(int, int, int, int, long)}. May also be
* called from JNI using an already allocated native <code>HardwareBuffer</code>.
*/
+ @UnsupportedAppUsage
private HardwareBuffer(long nativeObject) {
mNativeObject = nativeObject;
diff --git a/core/java/android/hardware/Sensor.java b/core/java/android/hardware/Sensor.java
index 7297426..4aa6fab 100644
--- a/core/java/android/hardware/Sensor.java
+++ b/core/java/android/hardware/Sensor.java
@@ -18,6 +18,7 @@
package android.hardware;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.os.Build;
/**
@@ -504,6 +505,7 @@
*
* @hide Expected to be used internally for always on display.
*/
+ @UnsupportedAppUsage
public static final int TYPE_PICK_UP_GESTURE = 25;
/**
@@ -543,6 +545,7 @@
* @hide Expected to be used internally for auto-rotate and speaker rotation.
*
*/
+ @UnsupportedAppUsage
public static final int TYPE_DEVICE_ORIENTATION = 27;
/**
@@ -891,6 +894,7 @@
private String mStringType;
private String mRequiredPermission;
private int mMaxDelay;
+ @UnsupportedAppUsage
private int mFlags;
private int mId;
@@ -1014,6 +1018,7 @@
}
/** @hide */
+ @UnsupportedAppUsage
public int getHandle() {
return mHandle;
}
diff --git a/core/java/android/hardware/SensorEvent.java b/core/java/android/hardware/SensorEvent.java
index bbd04a3..8c910b2 100644
--- a/core/java/android/hardware/SensorEvent.java
+++ b/core/java/android/hardware/SensorEvent.java
@@ -16,6 +16,8 @@
package android.hardware;
+import android.annotation.UnsupportedAppUsage;
+
/**
* This class represents a {@link android.hardware.Sensor Sensor} event and
* holds information such as the sensor's type, the time-stamp, accuracy and of
@@ -649,6 +651,7 @@
*/
public long timestamp;
+ @UnsupportedAppUsage
SensorEvent(int valueSize) {
values = new float[valueSize];
}
diff --git a/core/java/android/hardware/SensorManager.java b/core/java/android/hardware/SensorManager.java
index cbddc91..3250428 100644
--- a/core/java/android/hardware/SensorManager.java
+++ b/core/java/android/hardware/SensorManager.java
@@ -18,6 +18,7 @@
import android.annotation.SystemApi;
import android.annotation.SystemService;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.os.Build;
import android.os.Handler;
@@ -368,6 +369,7 @@
/**
* {@hide}
*/
+ @UnsupportedAppUsage
public SensorManager() {
}
diff --git a/core/java/android/hardware/SerialManager.java b/core/java/android/hardware/SerialManager.java
index 610f6a5..571c3cc 100644
--- a/core/java/android/hardware/SerialManager.java
+++ b/core/java/android/hardware/SerialManager.java
@@ -17,6 +17,7 @@
package android.hardware;
import android.annotation.SystemService;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.os.ParcelFileDescriptor;
import android.os.RemoteException;
@@ -46,6 +47,7 @@
*
* @return names of available serial ports
*/
+ @UnsupportedAppUsage
public String[] getSerialPorts() {
try {
return mService.getSerialPorts();
@@ -65,6 +67,7 @@
* @param speed at which to open the serial port
* @return the serial port
*/
+ @UnsupportedAppUsage
public SerialPort openSerialPort(String name, int speed) throws IOException {
try {
ParcelFileDescriptor pfd = mService.openSerialPort(name);
diff --git a/core/java/android/hardware/SerialPort.java b/core/java/android/hardware/SerialPort.java
index 5d83d9c..78ac3c0 100644
--- a/core/java/android/hardware/SerialPort.java
+++ b/core/java/android/hardware/SerialPort.java
@@ -16,6 +16,7 @@
package android.hardware;
+import android.annotation.UnsupportedAppUsage;
import android.os.ParcelFileDescriptor;
import java.io.FileDescriptor;
@@ -31,6 +32,7 @@
private static final String TAG = "SerialPort";
// used by the JNI code
+ @UnsupportedAppUsage
private int mNativeContext;
private final String mName;
private ParcelFileDescriptor mFileDescriptor;
@@ -59,6 +61,7 @@
/**
* Closes the serial port
*/
+ @UnsupportedAppUsage
public void close() throws IOException {
if (mFileDescriptor != null) {
mFileDescriptor.close();
@@ -102,6 +105,7 @@
* @param buffer to write
* @param length number of bytes to write
*/
+ @UnsupportedAppUsage
public void write(ByteBuffer buffer, int length) throws IOException {
if (buffer.isDirect()) {
native_write_direct(buffer, length);
diff --git a/core/java/android/hardware/SystemSensorManager.java b/core/java/android/hardware/SystemSensorManager.java
index 1174cb6..7abfabf 100644
--- a/core/java/android/hardware/SystemSensorManager.java
+++ b/core/java/android/hardware/SystemSensorManager.java
@@ -16,6 +16,7 @@
package android.hardware;
+import android.annotation.UnsupportedAppUsage;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
@@ -758,10 +759,13 @@
if (sensor == null) throw new NullPointerException();
return nativeDisableSensor(mNativeSensorEventQueue, sensor.getHandle());
}
+ @UnsupportedAppUsage
protected abstract void dispatchSensorEvent(int handle, float[] values, int accuracy,
long timestamp);
+ @UnsupportedAppUsage
protected abstract void dispatchFlushCompleteEvent(int handle);
+ @UnsupportedAppUsage
protected void dispatchAdditionalInfoEvent(
int handle, int type, int serial, float[] floatValues, int[] intValues) {
// default implementation is do nothing
diff --git a/core/java/android/hardware/camera2/CameraCharacteristics.java b/core/java/android/hardware/camera2/CameraCharacteristics.java
index d027fd9..f7d1b8d 100644
--- a/core/java/android/hardware/camera2/CameraCharacteristics.java
+++ b/core/java/android/hardware/camera2/CameraCharacteristics.java
@@ -18,6 +18,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.hardware.camera2.impl.CameraMetadataNative;
import android.hardware.camera2.impl.PublicKey;
import android.hardware.camera2.impl.SyntheticKey;
@@ -72,6 +73,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public Key(String name, Class<T> type, long vendorId) {
mKey = new CameraMetadataNative.Key<T>(name, type, vendorId);
}
@@ -90,6 +92,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public Key(String name, Class<T> type) {
mKey = new CameraMetadataNative.Key<T>(name, type);
}
@@ -99,6 +102,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public Key(String name, TypeReference<T> typeReference) {
mKey = new CameraMetadataNative.Key<T>(name, typeReference);
}
@@ -168,6 +172,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public CameraMetadataNative.Key<T> getNativeKey() {
return mKey;
}
@@ -180,6 +185,7 @@
}
}
+ @UnsupportedAppUsage
private final CameraMetadataNative mProperties;
private List<CameraCharacteristics.Key<?>> mKeys;
private List<CaptureRequest.Key<?>> mAvailableRequestKeys;
@@ -767,6 +773,7 @@
* @see CaptureRequest#CONTROL_AWB_REGIONS
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<int[]> CONTROL_MAX_REGIONS =
new Key<int[]>("android.control.maxRegions", int[].class);
@@ -872,6 +879,7 @@
* @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<android.hardware.camera2.params.HighSpeedVideoConfiguration[]> CONTROL_AVAILABLE_HIGH_SPEED_VIDEO_CONFIGURATIONS =
new Key<android.hardware.camera2.params.HighSpeedVideoConfiguration[]>("android.control.availableHighSpeedVideoConfigurations", android.hardware.camera2.params.HighSpeedVideoConfiguration[].class);
@@ -1140,6 +1148,7 @@
* @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<android.util.Size> LENS_INFO_SHADING_MAP_SIZE =
new Key<android.util.Size>("android.lens.info.shadingMapSize", android.util.Size.class);
@@ -1491,6 +1500,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public static final Key<Byte> QUIRKS_USE_PARTIAL_RESULT =
new Key<Byte>("android.quirks.usePartialResult", byte.class);
@@ -1528,6 +1538,7 @@
* @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<int[]> REQUEST_MAX_NUM_OUTPUT_STREAMS =
new Key<int[]>("android.request.maxNumOutputStreams", int[].class);
@@ -1767,6 +1778,7 @@
* @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<int[]> REQUEST_AVAILABLE_REQUEST_KEYS =
new Key<int[]>("android.request.availableRequestKeys", int[].class);
@@ -1792,6 +1804,7 @@
* @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<int[]> REQUEST_AVAILABLE_RESULT_KEYS =
new Key<int[]>("android.request.availableResultKeys", int[].class);
@@ -1804,6 +1817,7 @@
* <p>This key is available on all devices.</p>
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<int[]> REQUEST_AVAILABLE_CHARACTERISTICS_KEYS =
new Key<int[]>("android.request.availableCharacteristicsKeys", int[].class);
@@ -1850,6 +1864,7 @@
* <p>This key is available on all devices.</p>
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<int[]> REQUEST_AVAILABLE_SESSION_KEYS =
new Key<int[]>("android.request.availableSessionKeys", int[].class);
@@ -1870,6 +1885,7 @@
* @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<int[]> REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS =
new Key<int[]>("android.request.availablePhysicalCameraRequestKeys", int[].class);
@@ -1885,6 +1901,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public static final Key<int[]> SCALER_AVAILABLE_FORMATS =
new Key<int[]>("android.scaler.availableFormats", int[].class);
@@ -1907,6 +1924,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public static final Key<long[]> SCALER_AVAILABLE_JPEG_MIN_DURATIONS =
new Key<long[]>("android.scaler.availableJpegMinDurations", long[].class);
@@ -1925,6 +1943,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public static final Key<android.util.Size[]> SCALER_AVAILABLE_JPEG_SIZES =
new Key<android.util.Size[]>("android.scaler.availableJpegSizes", android.util.Size[].class);
@@ -1966,6 +1985,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public static final Key<long[]> SCALER_AVAILABLE_PROCESSED_MIN_DURATIONS =
new Key<long[]>("android.scaler.availableProcessedMinDurations", long[].class);
@@ -1990,6 +2010,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public static final Key<android.util.Size[]> SCALER_AVAILABLE_PROCESSED_SIZES =
new Key<android.util.Size[]>("android.scaler.availableProcessedSizes", android.util.Size[].class);
@@ -2045,6 +2066,7 @@
* @see CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<android.hardware.camera2.params.ReprocessFormatsMap> SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP =
new Key<android.hardware.camera2.params.ReprocessFormatsMap>("android.scaler.availableInputOutputFormatsMap", android.hardware.camera2.params.ReprocessFormatsMap.class);
@@ -2137,6 +2159,7 @@
* @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<android.hardware.camera2.params.StreamConfiguration[]> SCALER_AVAILABLE_STREAM_CONFIGURATIONS =
new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.scaler.availableStreamConfigurations", android.hardware.camera2.params.StreamConfiguration[].class);
@@ -2159,6 +2182,7 @@
* @see CaptureRequest#SENSOR_FRAME_DURATION
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> SCALER_AVAILABLE_MIN_FRAME_DURATIONS =
new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.scaler.availableMinFrameDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
@@ -2227,6 +2251,7 @@
* @see CaptureRequest#SENSOR_FRAME_DURATION
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> SCALER_AVAILABLE_STALL_DURATIONS =
new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.scaler.availableStallDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
@@ -3134,6 +3159,7 @@
* @see #LED_AVAILABLE_LEDS_TRANSMIT
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<int[]> LED_AVAILABLE_LEDS =
new Key<int[]>("android.led.availableLeds", int[].class);
@@ -3320,6 +3346,7 @@
* @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<android.hardware.camera2.params.StreamConfiguration[]> DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS =
new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.depth.availableDepthStreamConfigurations", android.hardware.camera2.params.StreamConfiguration[].class);
@@ -3346,6 +3373,7 @@
* @see CaptureRequest#SENSOR_FRAME_DURATION
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS =
new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.depth.availableDepthMinFrameDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
@@ -3369,6 +3397,7 @@
* @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS =
new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.depth.availableDepthStallDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
@@ -3412,6 +3441,7 @@
* @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<byte[]> LOGICAL_MULTI_CAMERA_PHYSICAL_IDS =
new Key<byte[]>("android.logicalMultiCamera.physicalIds", byte[].class);
diff --git a/core/java/android/hardware/camera2/CaptureRequest.java b/core/java/android/hardware/camera2/CaptureRequest.java
index 0c3fe77..47bef12 100644
--- a/core/java/android/hardware/camera2/CaptureRequest.java
+++ b/core/java/android/hardware/camera2/CaptureRequest.java
@@ -18,6 +18,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.hardware.camera2.impl.CameraMetadataNative;
import android.hardware.camera2.impl.PublicKey;
import android.hardware.camera2.impl.SyntheticKey;
@@ -107,6 +108,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public Key(String name, Class<T> type, long vendorId) {
mKey = new CameraMetadataNative.Key<T>(name, type, vendorId);
}
@@ -116,6 +118,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public Key(String name, Class<T> type) {
mKey = new CameraMetadataNative.Key<T>(name, type);
}
@@ -125,6 +128,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public Key(String name, TypeReference<T> typeReference) {
mKey = new CameraMetadataNative.Key<T>(name, typeReference);
}
@@ -194,6 +198,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public CameraMetadataNative.Key<T> getNativeKey() {
return mKey;
}
@@ -223,6 +228,7 @@
private static final ArraySet<Surface> mEmptySurfaceSet = new ArraySet<Surface>();
private String mLogicalCameraId;
+ @UnsupportedAppUsage
private CameraMetadataNative mLogicalCameraSettings;
private final HashMap<String, CameraMetadataNative> mPhysicalCameraSettings =
new HashMap<String, CameraMetadataNative>();
@@ -598,6 +604,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public Collection<Surface> getTargets() {
return Collections.unmodifiableCollection(mSurfaceSet);
}
@@ -886,6 +893,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void setPartOfCHSRequestList(boolean partOfCHSList) {
mRequest.mIsPartOfCHSRequestList = partOfCHSList;
}
@@ -2132,6 +2140,7 @@
* <p>This key is available on all devices.</p>
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<double[]> JPEG_GPS_COORDINATES =
new Key<double[]>("android.jpeg.gpsCoordinates", double[].class);
@@ -2142,6 +2151,7 @@
* <p>This key is available on all devices.</p>
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<String> JPEG_GPS_PROCESSING_METHOD =
new Key<String>("android.jpeg.gpsProcessingMethod", String.class);
@@ -2152,6 +2162,7 @@
* <p>This key is available on all devices.</p>
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<Long> JPEG_GPS_TIMESTAMP =
new Key<Long>("android.jpeg.gpsTimestamp", long.class);
@@ -2487,6 +2498,7 @@
* <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<Integer> REQUEST_ID =
new Key<Integer>("android.request.id", int.class);
@@ -2902,6 +2914,7 @@
* @see CaptureRequest#TONEMAP_MODE
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<float[]> TONEMAP_CURVE_BLUE =
new Key<float[]>("android.tonemap.curveBlue", float[].class);
@@ -2919,6 +2932,7 @@
* @see CaptureRequest#TONEMAP_MODE
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<float[]> TONEMAP_CURVE_GREEN =
new Key<float[]>("android.tonemap.curveGreen", float[].class);
@@ -2981,6 +2995,7 @@
* @see CaptureRequest#TONEMAP_MODE
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<float[]> TONEMAP_CURVE_RED =
new Key<float[]>("android.tonemap.curveRed", float[].class);
@@ -3155,6 +3170,7 @@
* <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<Boolean> LED_TRANSMIT =
new Key<Boolean>("android.led.transmit", boolean.class);
diff --git a/core/java/android/hardware/camera2/CaptureResult.java b/core/java/android/hardware/camera2/CaptureResult.java
index 5836288..007794f 100644
--- a/core/java/android/hardware/camera2/CaptureResult.java
+++ b/core/java/android/hardware/camera2/CaptureResult.java
@@ -18,6 +18,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.hardware.camera2.impl.CameraMetadataNative;
import android.hardware.camera2.impl.CaptureResultExtras;
import android.hardware.camera2.impl.PublicKey;
@@ -78,6 +79,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public Key(String name, Class<T> type, long vendorId) {
mKey = new CameraMetadataNative.Key<T>(name, type, vendorId);
}
@@ -96,6 +98,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public Key(String name, Class<T> type) {
mKey = new CameraMetadataNative.Key<T>(name, type);
}
@@ -105,6 +108,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public Key(String name, TypeReference<T> typeReference) {
mKey = new CameraMetadataNative.Key<T>(name, typeReference);
}
@@ -174,6 +178,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public CameraMetadataNative.Key<T> getNativeKey() {
return mKey;
}
@@ -184,6 +189,7 @@
}
}
+ @UnsupportedAppUsage
private final CameraMetadataNative mResults;
private final CaptureRequest mRequest;
private final int mSequenceId;
@@ -2458,6 +2464,7 @@
* <p>This key is available on all devices.</p>
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<double[]> JPEG_GPS_COORDINATES =
new Key<double[]>("android.jpeg.gpsCoordinates", double[].class);
@@ -2468,6 +2475,7 @@
* <p>This key is available on all devices.</p>
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<String> JPEG_GPS_PROCESSING_METHOD =
new Key<String>("android.jpeg.gpsProcessingMethod", String.class);
@@ -2478,6 +2486,7 @@
* <p>This key is available on all devices.</p>
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<Long> JPEG_GPS_TIMESTAMP =
new Key<Long>("android.jpeg.gpsTimestamp", long.class);
@@ -3116,6 +3125,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public static final Key<Boolean> QUIRKS_PARTIAL_RESULT =
new Key<Boolean>("android.quirks.partialResult", boolean.class);
@@ -3134,6 +3144,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public static final Key<Integer> REQUEST_FRAME_COUNT =
new Key<Integer>("android.request.frameCount", int.class);
@@ -3147,6 +3158,7 @@
* <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<Integer> REQUEST_ID =
new Key<Integer>("android.request.id", int.class);
@@ -3708,6 +3720,7 @@
* @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<int[]> STATISTICS_FACE_IDS =
new Key<int[]>("android.statistics.faceIds", int[].class);
@@ -3734,6 +3747,7 @@
* @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<int[]> STATISTICS_FACE_LANDMARKS =
new Key<int[]>("android.statistics.faceLandmarks", int[].class);
@@ -3760,6 +3774,7 @@
* @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<android.graphics.Rect[]> STATISTICS_FACE_RECTANGLES =
new Key<android.graphics.Rect[]>("android.statistics.faceRectangles", android.graphics.Rect[].class);
@@ -3774,6 +3789,7 @@
* @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<byte[]> STATISTICS_FACE_SCORES =
new Key<byte[]>("android.statistics.faceScores", byte[].class);
@@ -3933,6 +3949,7 @@
* @see CameraCharacteristics#SENSOR_INFO_LENS_SHADING_APPLIED
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<float[]> STATISTICS_LENS_SHADING_MAP =
new Key<float[]>("android.statistics.lensShadingMap", float[].class);
@@ -3956,6 +3973,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public static final Key<float[]> STATISTICS_PREDICTED_COLOR_GAINS =
new Key<float[]>("android.statistics.predictedColorGains", float[].class);
@@ -3982,6 +4000,7 @@
* @hide
*/
@Deprecated
+ @UnsupportedAppUsage
public static final Key<Rational[]> STATISTICS_PREDICTED_COLOR_TRANSFORM =
new Key<Rational[]>("android.statistics.predictedColorTransform", Rational[].class);
@@ -4124,6 +4143,7 @@
* @see CaptureResult#SENSOR_TIMESTAMP
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<long[]> STATISTICS_OIS_TIMESTAMPS =
new Key<long[]>("android.statistics.oisTimestamps", long[].class);
@@ -4143,6 +4163,7 @@
* <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<float[]> STATISTICS_OIS_X_SHIFTS =
new Key<float[]>("android.statistics.oisXShifts", float[].class);
@@ -4162,6 +4183,7 @@
* <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<float[]> STATISTICS_OIS_Y_SHIFTS =
new Key<float[]>("android.statistics.oisYShifts", float[].class);
@@ -4202,6 +4224,7 @@
* @see CaptureRequest#TONEMAP_MODE
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<float[]> TONEMAP_CURVE_BLUE =
new Key<float[]>("android.tonemap.curveBlue", float[].class);
@@ -4219,6 +4242,7 @@
* @see CaptureRequest#TONEMAP_MODE
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<float[]> TONEMAP_CURVE_GREEN =
new Key<float[]>("android.tonemap.curveGreen", float[].class);
@@ -4281,6 +4305,7 @@
* @see CaptureRequest#TONEMAP_MODE
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<float[]> TONEMAP_CURVE_RED =
new Key<float[]>("android.tonemap.curveRed", float[].class);
@@ -4455,6 +4480,7 @@
* <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<Boolean> LED_TRANSMIT =
new Key<Boolean>("android.led.transmit", boolean.class);
@@ -4544,6 +4570,7 @@
* @see #SYNC_FRAME_NUMBER_UNKNOWN
* @hide
*/
+ @UnsupportedAppUsage
public static final Key<Long> SYNC_FRAME_NUMBER =
new Key<Long>("android.sync.frameNumber", long.class);
diff --git a/core/java/android/hardware/camera2/impl/CameraMetadataNative.java b/core/java/android/hardware/camera2/impl/CameraMetadataNative.java
index 86bd30c..0610d7a 100644
--- a/core/java/android/hardware/camera2/impl/CameraMetadataNative.java
+++ b/core/java/android/hardware/camera2/impl/CameraMetadataNative.java
@@ -16,6 +16,7 @@
package android.hardware.camera2.impl;
+import android.annotation.UnsupportedAppUsage;
import android.graphics.ImageFormat;
import android.graphics.Point;
import android.graphics.Rect;
@@ -231,6 +232,7 @@
*
* @return The tag numeric value corresponding to the string
*/
+ @UnsupportedAppUsage
public final int getTag() {
if (!mHasTag) {
mTag = CameraMetadataNative.getTag(mName, mVendorId);
@@ -1188,6 +1190,7 @@
return true;
}
+ @UnsupportedAppUsage
private long mMetadataPtr; // native CameraMetadata*
private native long nativeAllocate();
@@ -1202,13 +1205,16 @@
private native synchronized boolean nativeIsEmpty();
private native synchronized int nativeGetEntryCount();
+ @UnsupportedAppUsage
private native synchronized byte[] nativeReadValues(int tag);
private native synchronized void nativeWriteValues(int tag, byte[] src);
private native synchronized void nativeDump() throws IOException; // dump to ALOGD
private native synchronized ArrayList nativeGetAllVendorKeys(Class keyClass);
+ @UnsupportedAppUsage
private native synchronized int nativeGetTagFromKeyLocal(String keyName)
throws IllegalArgumentException;
+ @UnsupportedAppUsage
private native synchronized int nativeGetTypeFromTagLocal(int tag)
throws IllegalArgumentException;
private static native int nativeGetTagFromKey(String keyName, long vendorId)
diff --git a/core/java/android/hardware/camera2/utils/SurfaceUtils.java b/core/java/android/hardware/camera2/utils/SurfaceUtils.java
index 9247844..d3c4505 100644
--- a/core/java/android/hardware/camera2/utils/SurfaceUtils.java
+++ b/core/java/android/hardware/camera2/utils/SurfaceUtils.java
@@ -16,6 +16,7 @@
package android.hardware.camera2.utils;
+import android.annotation.UnsupportedAppUsage;
import android.graphics.ImageFormat;
import android.hardware.camera2.legacy.LegacyCameraDevice;
import android.hardware.camera2.legacy.LegacyExceptionUtils.BufferQueueAbandonedException;
@@ -77,6 +78,7 @@
*
* @throws IllegalArgumentException if the surface is already abandoned.
*/
+ @UnsupportedAppUsage
public static Size getSurfaceSize(Surface surface) {
try {
return LegacyCameraDevice.getSurfaceSize(surface);
diff --git a/core/java/android/hardware/camera2/utils/TypeReference.java b/core/java/android/hardware/camera2/utils/TypeReference.java
index 24ce124..d9ba31b 100644
--- a/core/java/android/hardware/camera2/utils/TypeReference.java
+++ b/core/java/android/hardware/camera2/utils/TypeReference.java
@@ -16,6 +16,7 @@
package android.hardware.camera2.utils;
+import android.annotation.UnsupportedAppUsage;
import java.lang.reflect.Array;
import java.lang.reflect.GenericArrayType;
import java.lang.reflect.ParameterizedType;
@@ -55,6 +56,7 @@
*
* @see TypeReference
*/
+ @UnsupportedAppUsage
protected TypeReference() {
ParameterizedType thisType = (ParameterizedType)getClass().getGenericSuperclass();
@@ -136,6 +138,7 @@
*
* @throws IllegalArgumentException if {@code type} had any type variables
*/
+ @UnsupportedAppUsage
public static TypeReference<?> createSpecializedTypeReference(Type type) {
return new SpecializedBaseTypeReference(type);
}
diff --git a/core/java/android/hardware/display/DisplayManager.java b/core/java/android/hardware/display/DisplayManager.java
index b182fa2..e700cac 100644
--- a/core/java/android/hardware/display/DisplayManager.java
+++ b/core/java/android/hardware/display/DisplayManager.java
@@ -23,6 +23,7 @@
import android.annotation.SystemApi;
import android.annotation.SystemService;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.app.KeyguardManager;
import android.content.Context;
import android.graphics.Point;
@@ -62,6 +63,7 @@
* </p>
* @hide
*/
+ @UnsupportedAppUsage
public static final String ACTION_WIFI_DISPLAY_STATUS_CHANGED =
"android.hardware.display.action.WIFI_DISPLAY_STATUS_CHANGED";
@@ -69,6 +71,7 @@
* Contains a {@link WifiDisplayStatus} object.
* @hide
*/
+ @UnsupportedAppUsage
public static final String EXTRA_WIFI_DISPLAY_STATUS =
"android.hardware.display.extra.WIFI_DISPLAY_STATUS";
@@ -437,6 +440,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void startWifiDisplayScan() {
mGlobal.startWifiDisplayScan();
}
@@ -449,6 +453,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void stopWifiDisplayScan() {
mGlobal.stopWifiDisplayScan();
}
@@ -466,16 +471,19 @@
* @param deviceAddress The MAC address of the device to which we should connect.
* @hide
*/
+ @UnsupportedAppUsage
public void connectWifiDisplay(String deviceAddress) {
mGlobal.connectWifiDisplay(deviceAddress);
}
/** @hide */
+ @UnsupportedAppUsage
public void pauseWifiDisplay() {
mGlobal.pauseWifiDisplay();
}
/** @hide */
+ @UnsupportedAppUsage
public void resumeWifiDisplay() {
mGlobal.resumeWifiDisplay();
}
@@ -485,6 +493,7 @@
* The results are sent as a {@link #ACTION_WIFI_DISPLAY_STATUS_CHANGED} broadcast.
* @hide
*/
+ @UnsupportedAppUsage
public void disconnectWifiDisplay() {
mGlobal.disconnectWifiDisplay();
}
@@ -504,6 +513,7 @@
* or empty if no alias should be used.
* @hide
*/
+ @UnsupportedAppUsage
public void renameWifiDisplay(String deviceAddress, String alias) {
mGlobal.renameWifiDisplay(deviceAddress, alias);
}
@@ -519,6 +529,7 @@
* @param deviceAddress The MAC address of the device to forget.
* @hide
*/
+ @UnsupportedAppUsage
public void forgetWifiDisplay(String deviceAddress) {
mGlobal.forgetWifiDisplay(deviceAddress);
}
@@ -531,6 +542,7 @@
* @return The current Wifi display status.
* @hide
*/
+ @UnsupportedAppUsage
public WifiDisplayStatus getWifiDisplayStatus() {
return mGlobal.getWifiDisplayStatus();
}
diff --git a/core/java/android/hardware/display/DisplayManagerGlobal.java b/core/java/android/hardware/display/DisplayManagerGlobal.java
index d968a3e..7304ab4 100644
--- a/core/java/android/hardware/display/DisplayManagerGlobal.java
+++ b/core/java/android/hardware/display/DisplayManagerGlobal.java
@@ -16,6 +16,7 @@
package android.hardware.display;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.pm.ParceledListSlice;
import android.content.res.Resources;
@@ -66,10 +67,12 @@
public static final int EVENT_DISPLAY_CHANGED = 2;
public static final int EVENT_DISPLAY_REMOVED = 3;
+ @UnsupportedAppUsage
private static DisplayManagerGlobal sInstance;
private final Object mLock = new Object();
+ @UnsupportedAppUsage
private final IDisplayManager mDm;
private DisplayManagerCallback mCallback;
@@ -91,6 +94,7 @@
* @return The display manager instance, may be null early in system startup
* before the display manager has been fully initialized.
*/
+ @UnsupportedAppUsage
public static DisplayManagerGlobal getInstance() {
synchronized (DisplayManagerGlobal.class) {
if (sInstance == null) {
@@ -110,6 +114,7 @@
* @return Information about the specified display, or null if it does not exist.
* This object belongs to an internal cache and should be treated as if it were immutable.
*/
+ @UnsupportedAppUsage
public DisplayInfo getDisplayInfo(int displayId) {
try {
synchronized (mLock) {
@@ -146,6 +151,7 @@
*
* @return An array containing all display ids.
*/
+ @UnsupportedAppUsage
public int[] getDisplayIds() {
try {
synchronized (mLock) {
@@ -209,6 +215,7 @@
* @param displayId The logical display id.
* @return The display object, or null if there is no display with the given id.
*/
+ @UnsupportedAppUsage
public Display getRealDisplay(int displayId) {
return getCompatibleDisplay(displayId, DisplayAdjustments.DEFAULT_DISPLAY_ADJUSTMENTS);
}
@@ -337,6 +344,7 @@
}
}
+ @UnsupportedAppUsage
public void disconnectWifiDisplay() {
try {
mDm.disconnectWifiDisplay();
@@ -369,6 +377,7 @@
}
}
+ @UnsupportedAppUsage
public WifiDisplayStatus getWifiDisplayStatus() {
try {
return mDm.getWifiDisplayStatus();
diff --git a/core/java/android/hardware/display/WifiDisplay.java b/core/java/android/hardware/display/WifiDisplay.java
index bb32c19..12486e8 100644
--- a/core/java/android/hardware/display/WifiDisplay.java
+++ b/core/java/android/hardware/display/WifiDisplay.java
@@ -16,6 +16,7 @@
package android.hardware.display;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -76,6 +77,7 @@
/**
* Gets the MAC address of the Wifi display device.
*/
+ @UnsupportedAppUsage
public String getDeviceAddress() {
return mDeviceAddress;
}
@@ -83,6 +85,7 @@
/**
* Gets the name of the Wifi display device.
*/
+ @UnsupportedAppUsage
public String getDeviceName() {
return mDeviceName;
}
@@ -94,6 +97,7 @@
* provided by the user when renaming the device.
* </p>
*/
+ @UnsupportedAppUsage
public String getDeviceAlias() {
return mDeviceAlias;
}
@@ -101,6 +105,7 @@
/**
* Returns true if device is available, false otherwise.
*/
+ @UnsupportedAppUsage
public boolean isAvailable() {
return mIsAvailable;
}
@@ -108,6 +113,7 @@
/**
* Returns true if device can be connected to (not in use), false otherwise.
*/
+ @UnsupportedAppUsage
public boolean canConnect() {
return mCanConnect;
}
@@ -115,6 +121,7 @@
/**
* Returns true if device has been remembered, false otherwise.
*/
+ @UnsupportedAppUsage
public boolean isRemembered() {
return mIsRemembered;
}
@@ -136,6 +143,7 @@
* Returns true if the two displays have the same identity (address, name and alias).
* This method does not compare the current status of the displays.
*/
+ @UnsupportedAppUsage
public boolean equals(WifiDisplay other) {
return other != null
&& mDeviceAddress.equals(other.mDeviceAddress)
diff --git a/core/java/android/hardware/display/WifiDisplayStatus.java b/core/java/android/hardware/display/WifiDisplayStatus.java
index b645662..c267834 100644
--- a/core/java/android/hardware/display/WifiDisplayStatus.java
+++ b/core/java/android/hardware/display/WifiDisplayStatus.java
@@ -16,6 +16,7 @@
package android.hardware.display;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -34,7 +35,9 @@
private final int mFeatureState;
private final int mScanState;
private final int mActiveDisplayState;
+ @UnsupportedAppUsage
private final WifiDisplay mActiveDisplay;
+ @UnsupportedAppUsage
private final WifiDisplay[] mDisplays;
/** Session info needed for Miracast Certification */
@@ -47,18 +50,23 @@
/** Feature state: Wifi display is turned off in settings. */
public static final int FEATURE_STATE_OFF = 2;
/** Feature state: Wifi display is turned on in settings. */
+ @UnsupportedAppUsage
public static final int FEATURE_STATE_ON = 3;
/** Scan state: Not currently scanning. */
+ @UnsupportedAppUsage
public static final int SCAN_STATE_NOT_SCANNING = 0;
/** Scan state: Currently scanning. */
public static final int SCAN_STATE_SCANNING = 1;
/** Display state: Not connected. */
+ @UnsupportedAppUsage
public static final int DISPLAY_STATE_NOT_CONNECTED = 0;
/** Display state: Connecting to active display. */
+ @UnsupportedAppUsage
public static final int DISPLAY_STATE_CONNECTING = 1;
/** Display state: Connected to active display. */
+ @UnsupportedAppUsage
public static final int DISPLAY_STATE_CONNECTED = 2;
public static final Creator<WifiDisplayStatus> CREATOR = new Creator<WifiDisplayStatus>() {
@@ -117,6 +125,7 @@
* connecting to displays have been met.
* </p>
*/
+ @UnsupportedAppUsage
public int getFeatureState() {
return mFeatureState;
}
@@ -126,6 +135,7 @@
*
* @return One of: {@link #SCAN_STATE_NOT_SCANNING} or {@link #SCAN_STATE_SCANNING}.
*/
+ @UnsupportedAppUsage
public int getScanState() {
return mScanState;
}
@@ -136,6 +146,7 @@
* @return One of: {@link #DISPLAY_STATE_NOT_CONNECTED}, {@link #DISPLAY_STATE_CONNECTING},
* or {@link #DISPLAY_STATE_CONNECTED}.
*/
+ @UnsupportedAppUsage
public int getActiveDisplayState() {
return mActiveDisplayState;
}
@@ -144,6 +155,7 @@
* Gets the Wifi display that is currently active. It may be connecting or
* connected.
*/
+ @UnsupportedAppUsage
public WifiDisplay getActiveDisplay() {
return mActiveDisplay;
}
@@ -153,6 +165,7 @@
* Wifi displays as reported by the most recent scan, and all remembered
* Wifi displays (not necessarily available at the time).
*/
+ @UnsupportedAppUsage
public WifiDisplay[] getDisplays() {
return mDisplays;
}
diff --git a/core/java/android/hardware/fingerprint/FingerprintManager.java b/core/java/android/hardware/fingerprint/FingerprintManager.java
index 9192652..bf5ab90 100644
--- a/core/java/android/hardware/fingerprint/FingerprintManager.java
+++ b/core/java/android/hardware/fingerprint/FingerprintManager.java
@@ -27,6 +27,7 @@
import android.annotation.RequiresFeature;
import android.annotation.RequiresPermission;
import android.annotation.SystemService;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActivityManager;
import android.content.Context;
import android.content.pm.PackageManager;
@@ -189,6 +190,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public Fingerprint getFingerprint() { return mFingerprint; }
/**
@@ -718,6 +720,7 @@
* @hide
*/
@RequiresPermission(USE_FINGERPRINT)
+ @UnsupportedAppUsage
public List<Fingerprint> getEnrolledFingerprints(int userId) {
if (mService != null) try {
return mService.getEnrolledFingerprints(userId, mContext.getOpPackageName());
@@ -734,6 +737,7 @@
* @hide
*/
@RequiresPermission(USE_FINGERPRINT)
+ @UnsupportedAppUsage
public List<Fingerprint> getEnrolledFingerprints() {
return getEnrolledFingerprints(mContext.getUserId());
}
@@ -801,6 +805,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public long getAuthenticatorId() {
if (mService != null) {
try {
diff --git a/core/java/android/hardware/input/InputManager.java b/core/java/android/hardware/input/InputManager.java
index 6ae7a14..6ca5f0c 100644
--- a/core/java/android/hardware/input/InputManager.java
+++ b/core/java/android/hardware/input/InputManager.java
@@ -20,6 +20,7 @@
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
import android.annotation.SystemService;
+import android.annotation.UnsupportedAppUsage;
import android.app.IInputForwarder;
import android.content.Context;
import android.media.AudioAttributes;
@@ -64,6 +65,7 @@
private static InputManager sInstance;
+ @UnsupportedAppUsage
private final IInputManager mIm;
// Guarded by mInputDevicesLock
@@ -181,6 +183,7 @@
* Waits for the event to be delivered to the application and handled.
* @hide
*/
+ @UnsupportedAppUsage
public static final int INJECT_INPUT_EVENT_MODE_WAIT_FOR_FINISH = 2; // see InputDispatcher.h
/** @hide */
@@ -223,6 +226,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static InputManager getInstance() {
synchronized (InputManager.class) {
if (sInstance == null) {
@@ -866,6 +870,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public boolean injectInputEvent(InputEvent event, int mode) {
if (event == null) {
throw new IllegalArgumentException("event must not be null");
@@ -891,6 +896,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void setPointerIconType(int iconId) {
try {
mIm.setPointerIconType(iconId);
@@ -938,6 +944,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public IInputForwarder createInputForwarder(int displayId) {
try {
return mIm.createInputForwarder(displayId);
@@ -1191,8 +1198,8 @@
* @hide
*/
@Override
- public void vibrate(int uid, String opPkg,
- VibrationEffect effect, AudioAttributes attributes) {
+ public void vibrate(int uid, String opPkg, VibrationEffect effect,
+ String reason, AudioAttributes attributes) {
long[] pattern;
int repeat;
if (effect instanceof VibrationEffect.OneShot) {
diff --git a/core/java/android/hardware/location/GeofenceHardware.java b/core/java/android/hardware/location/GeofenceHardware.java
index 66dd9fc..23d8d01 100644
--- a/core/java/android/hardware/location/GeofenceHardware.java
+++ b/core/java/android/hardware/location/GeofenceHardware.java
@@ -16,6 +16,7 @@
package android.hardware.location;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.location.Location;
import android.os.Build;
import android.os.RemoteException;
@@ -168,6 +169,7 @@
GeofenceHardwareMonitorCallbackWrapper>();
/** @hide */
+ @UnsupportedAppUsage
public GeofenceHardware(IGeofenceHardware service) {
mService = service;
}
diff --git a/core/java/android/hardware/soundtrigger/SoundTrigger.java b/core/java/android/hardware/soundtrigger/SoundTrigger.java
index dde8a33..007f4bc 100644
--- a/core/java/android/hardware/soundtrigger/SoundTrigger.java
+++ b/core/java/android/hardware/soundtrigger/SoundTrigger.java
@@ -24,6 +24,7 @@
import android.annotation.Nullable;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.media.AudioFormat;
import android.os.Handler;
import android.os.Parcel;
@@ -72,6 +73,7 @@
****************************************************************************/
public static class ModuleProperties implements Parcelable {
/** Unique module ID provided by the native service */
+ @UnsupportedAppUsage
public final int id;
/** human readable voice detection engine implementor */
@@ -81,12 +83,14 @@
public final String description;
/** Unique voice engine Id (changes with each version) */
+ @UnsupportedAppUsage
public final UUID uuid;
/** Voice detection engine version */
public final int version;
/** Maximum number of active sound models */
+ @UnsupportedAppUsage
public final int maxSoundModels;
/** Maximum number of key phrases */
@@ -114,6 +118,7 @@
* recognition callback event */
public final boolean returnsTriggerInEvent;
+ @UnsupportedAppUsage
ModuleProperties(int id, String implementor, String description,
String uuid, int version, int maxSoundModels, int maxKeyphrases,
int maxUsers, int recognitionModes, boolean supportsCaptureTransition,
@@ -225,15 +230,18 @@
public static final int TYPE_GENERIC_SOUND = 1;
/** Unique sound model identifier */
+ @UnsupportedAppUsage
public final UUID uuid;
/** Sound model type (e.g. TYPE_KEYPHRASE); */
public final int type;
/** Unique sound model vendor identifier */
+ @UnsupportedAppUsage
public final UUID vendorUuid;
/** Opaque data. For use by vendor implementation and enrollment application */
+ @UnsupportedAppUsage
public final byte[] data;
public SoundModel(UUID uuid, UUID vendorUuid, int type, byte[] data) {
@@ -289,21 +297,27 @@
****************************************************************************/
public static class Keyphrase implements Parcelable {
/** Unique identifier for this keyphrase */
+ @UnsupportedAppUsage
public final int id;
/** Recognition modes supported for this key phrase in the model */
+ @UnsupportedAppUsage
public final int recognitionModes;
/** Locale of the keyphrase. JAVA Locale string e.g en_US */
+ @UnsupportedAppUsage
public final String locale;
/** Key phrase text */
+ @UnsupportedAppUsage
public final String text;
/** Users this key phrase has been trained for. countains sound trigger specific user IDs
* derived from system user IDs {@link android.os.UserHandle#getIdentifier()}. */
+ @UnsupportedAppUsage
public final int[] users;
+ @UnsupportedAppUsage
public Keyphrase(int id, int recognitionModes, String locale, String text, int[] users) {
this.id = id;
this.recognitionModes = recognitionModes;
@@ -412,8 +426,10 @@
****************************************************************************/
public static class KeyphraseSoundModel extends SoundModel implements Parcelable {
/** Key phrases in this sound model */
+ @UnsupportedAppUsage
public final Keyphrase[] keyphrases; // keyword phrases in model
+ @UnsupportedAppUsage
public KeyphraseSoundModel(
UUID uuid, UUID vendorUuid, byte[] data, Keyphrase[] keyphrases) {
super(uuid, vendorUuid, TYPE_KEYPHRASE, data);
@@ -511,6 +527,7 @@
}
};
+ @UnsupportedAppUsage
public GenericSoundModel(UUID uuid, UUID vendorUuid, byte[] data) {
super(uuid, vendorUuid, TYPE_GENERIC_SOUND, data);
}
@@ -606,6 +623,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public final int status;
/**
*
@@ -613,12 +631,14 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public final int soundModelHandle;
/**
* True if it is possible to capture audio from this utterance buffered by the hardware
*
* @hide
*/
+ @UnsupportedAppUsage
public final boolean captureAvailable;
/**
* Audio session ID to be used when capturing the utterance with an AudioRecord
@@ -626,6 +646,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public final int captureSession;
/**
* Delay in ms between end of model detection and start of audio available for capture.
@@ -659,9 +680,11 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public final byte[] data;
/** @hide */
+ @UnsupportedAppUsage
public RecognitionEvent(int status, int soundModelHandle, boolean captureAvailable,
int captureSession, int captureDelayMs, int capturePreambleMs,
boolean triggerInData, AudioFormat captureFormat, byte[] data) {
@@ -865,6 +888,7 @@
public static class RecognitionConfig implements Parcelable {
/** True if the DSP should capture the trigger sound and make it available for further
* capture. */
+ @UnsupportedAppUsage
public final boolean captureRequested;
/**
* True if the service should restart listening after the DSP triggers.
@@ -873,11 +897,14 @@
public final boolean allowMultipleTriggers;
/** List of all keyphrases in the sound model for which recognition should be performed with
* options for each keyphrase. */
+ @UnsupportedAppUsage
public final KeyphraseRecognitionExtra keyphrases[];
/** Opaque data for use by system applications who know about voice engine internals,
* typically during enrollment. */
+ @UnsupportedAppUsage
public final byte[] data;
+ @UnsupportedAppUsage
public RecognitionConfig(boolean captureRequested, boolean allowMultipleTriggers,
KeyphraseRecognitionExtra[] keyphrases, byte[] data) {
this.captureRequested = captureRequested;
@@ -938,9 +965,12 @@
* @hide
*/
public static class ConfidenceLevel implements Parcelable {
+ @UnsupportedAppUsage
public final int userId;
+ @UnsupportedAppUsage
public final int confidenceLevel;
+ @UnsupportedAppUsage
public ConfidenceLevel(int userId, int confidenceLevel) {
this.userId = userId;
this.confidenceLevel = confidenceLevel;
@@ -1014,19 +1044,24 @@
*/
public static class KeyphraseRecognitionExtra implements Parcelable {
/** The keyphrase ID */
+ @UnsupportedAppUsage
public final int id;
/** Recognition modes matched for this event */
+ @UnsupportedAppUsage
public final int recognitionModes;
/** Confidence level for mode RECOGNITION_MODE_VOICE_TRIGGER when user identification
* is not performed */
+ @UnsupportedAppUsage
public final int coarseConfidenceLevel;
/** Confidence levels for all users recognized (KeyphraseRecognitionEvent) or to
* be recognized (RecognitionConfig) */
+ @UnsupportedAppUsage
public final ConfidenceLevel[] confidenceLevels;
+ @UnsupportedAppUsage
public KeyphraseRecognitionExtra(int id, int recognitionModes, int coarseConfidenceLevel,
ConfidenceLevel[] confidenceLevels) {
this.id = id;
@@ -1114,8 +1149,10 @@
*/
public static class KeyphraseRecognitionEvent extends RecognitionEvent implements Parcelable {
/** Indicates if the key phrase is present in the buffered audio available for capture */
+ @UnsupportedAppUsage
public final KeyphraseRecognitionExtra[] keyphraseExtras;
+ @UnsupportedAppUsage
public KeyphraseRecognitionEvent(int status, int soundModelHandle, boolean captureAvailable,
int captureSession, int captureDelayMs, int capturePreambleMs,
boolean triggerInData, AudioFormat captureFormat, byte[] data,
@@ -1236,6 +1273,7 @@
* @hide
*/
public static class GenericRecognitionEvent extends RecognitionEvent implements Parcelable {
+ @UnsupportedAppUsage
public GenericRecognitionEvent(int status, int soundModelHandle,
boolean captureAvailable, int captureSession, int captureDelayMs,
int capturePreambleMs, boolean triggerInData, AudioFormat captureFormat,
@@ -1305,6 +1343,7 @@
/** New sound model data */
public final byte[] data;
+ @UnsupportedAppUsage
SoundModelEvent(int status, int soundModelHandle, byte[] data) {
this.status = status;
this.soundModelHandle = soundModelHandle;
@@ -1405,6 +1444,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static native int listModules(ArrayList <ModuleProperties> modules);
/**
@@ -1418,6 +1458,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static SoundTriggerModule attachModule(int moduleId,
StatusListener listener,
Handler handler) {
diff --git a/core/java/android/hardware/soundtrigger/SoundTriggerModule.java b/core/java/android/hardware/soundtrigger/SoundTriggerModule.java
index e23a2bb..838765b 100644
--- a/core/java/android/hardware/soundtrigger/SoundTriggerModule.java
+++ b/core/java/android/hardware/soundtrigger/SoundTriggerModule.java
@@ -16,6 +16,7 @@
package android.hardware.soundtrigger;
+import android.annotation.UnsupportedAppUsage;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
@@ -28,8 +29,10 @@
* @hide
*/
public class SoundTriggerModule {
+ @UnsupportedAppUsage
private long mNativeContext;
+ @UnsupportedAppUsage
private int mId;
private NativeEventHandlerDelegate mEventHandlerDelegate;
@@ -56,6 +59,7 @@
* Detach from this module. The {@link SoundTrigger.StatusListener} callback will not be called
* anymore and associated resources will be released.
* */
+ @UnsupportedAppUsage
public native void detach();
/**
@@ -73,6 +77,7 @@
* service fails
* - {@link SoundTrigger#STATUS_INVALID_OPERATION} if the call is out of sequence
*/
+ @UnsupportedAppUsage
public native int loadSoundModel(SoundTrigger.SoundModel model, int[] soundModelHandle);
/**
@@ -87,6 +92,7 @@
* - {@link SoundTrigger#STATUS_DEAD_OBJECT} if the binder transaction to the native
* service fails
*/
+ @UnsupportedAppUsage
public native int unloadSoundModel(int soundModelHandle);
/**
@@ -106,6 +112,7 @@
* service fails
* - {@link SoundTrigger#STATUS_INVALID_OPERATION} if the call is out of sequence
*/
+ @UnsupportedAppUsage
public native int startRecognition(int soundModelHandle, SoundTrigger.RecognitionConfig config);
/**
@@ -121,6 +128,7 @@
* service fails
* - {@link SoundTrigger#STATUS_INVALID_OPERATION} if the call is out of sequence
*/
+ @UnsupportedAppUsage
public native int stopRecognition(int soundModelHandle);
private class NativeEventHandlerDelegate {
@@ -181,6 +189,7 @@
}
@SuppressWarnings("unused")
+ @UnsupportedAppUsage
private static void postEventFromNative(Object module_ref,
int what, int arg1, int arg2, Object obj) {
SoundTriggerModule module = (SoundTriggerModule)((WeakReference)module_ref).get();
diff --git a/core/java/android/hardware/usb/UsbDevice.java b/core/java/android/hardware/usb/UsbDevice.java
index 1e98301..26c5a95 100644
--- a/core/java/android/hardware/usb/UsbDevice.java
+++ b/core/java/android/hardware/usb/UsbDevice.java
@@ -18,6 +18,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
import com.android.internal.util.Preconditions;
@@ -60,6 +61,7 @@
private @Nullable Parcelable[] mConfigurations;
/** All interfaces on the device. Initialized on first call to getInterfaceList */
+ @UnsupportedAppUsage
private @Nullable UsbInterface[] mInterfaces;
/**
diff --git a/core/java/android/hardware/usb/UsbDeviceConnection.java b/core/java/android/hardware/usb/UsbDeviceConnection.java
index 9e5174a..71297c1 100644
--- a/core/java/android/hardware/usb/UsbDeviceConnection.java
+++ b/core/java/android/hardware/usb/UsbDeviceConnection.java
@@ -20,6 +20,7 @@
import android.annotation.Nullable;
import android.annotation.SuppressLint;
import android.annotation.SystemApi;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.os.Build;
import android.os.ParcelFileDescriptor;
@@ -46,6 +47,7 @@
private Context mContext;
// used by the JNI code
+ @UnsupportedAppUsage
private long mNativeContext;
private final CloseGuard mCloseGuard = CloseGuard.get();
diff --git a/core/java/android/hardware/usb/UsbManager.java b/core/java/android/hardware/usb/UsbManager.java
index 46142e3..3141be4 100644
--- a/core/java/android/hardware/usb/UsbManager.java
+++ b/core/java/android/hardware/usb/UsbManager.java
@@ -25,6 +25,7 @@
import android.annotation.SdkConstant.SdkConstantType;
import android.annotation.SystemApi;
import android.annotation.SystemService;
+import android.annotation.UnsupportedAppUsage;
import android.app.PendingIntent;
import android.content.ComponentName;
import android.content.Context;
@@ -87,6 +88,7 @@
*
* {@hide}
*/
+ @UnsupportedAppUsage
public static final String ACTION_USB_STATE =
"android.hardware.usb.action.USB_STATE";
@@ -163,6 +165,7 @@
*
* {@hide}
*/
+ @UnsupportedAppUsage
public static final String USB_CONNECTED = "connected";
/**
@@ -189,6 +192,7 @@
*
* {@hide}
*/
+ @UnsupportedAppUsage
public static final String USB_DATA_UNLOCKED = "unlocked";
/**
@@ -197,6 +201,7 @@
*
* {@hide}
*/
+ @UnsupportedAppUsage
public static final String USB_FUNCTION_NONE = "none";
/**
@@ -363,6 +368,7 @@
/**
* {@hide}
*/
+ @UnsupportedAppUsage
public UsbManager(Context context, IUsbManager service) {
mContext = context;
mService = service;
@@ -645,6 +651,7 @@
* {@hide}
*/
@Deprecated
+ @UnsupportedAppUsage
public boolean isFunctionEnabled(String function) {
try {
return mService.isFunctionEnabled(function);
@@ -693,6 +700,7 @@
* {@hide}
*/
@Deprecated
+ @UnsupportedAppUsage
public void setCurrentFunction(String functions, boolean usbDataUnlocked) {
try {
mService.setCurrentFunction(functions, usbDataUnlocked);
@@ -774,6 +782,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public UsbPort[] getPorts() {
if (mService == null) {
return null;
@@ -793,6 +802,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public UsbPortStatus getPortStatus(UsbPort port) {
Preconditions.checkNotNull(port, "port must not be null");
@@ -822,6 +832,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void setPortRoles(UsbPort port, int powerRole, int dataRole) {
Preconditions.checkNotNull(port, "port must not be null");
UsbPort.checkRoles(powerRole, dataRole);
diff --git a/core/java/android/hardware/usb/UsbPortStatus.java b/core/java/android/hardware/usb/UsbPortStatus.java
index 5c0e81a..2cd8209 100644
--- a/core/java/android/hardware/usb/UsbPortStatus.java
+++ b/core/java/android/hardware/usb/UsbPortStatus.java
@@ -16,6 +16,7 @@
package android.hardware.usb;
+import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -47,6 +48,7 @@
*
* @return True if there is anything connected to the port.
*/
+ @UnsupportedAppUsage
public boolean isConnected() {
return mCurrentMode != 0;
}
@@ -57,6 +59,7 @@
* @return The current mode: {@link UsbPort#MODE_DFP}, {@link UsbPort#MODE_UFP},
* or 0 if nothing is connected.
*/
+ @UnsupportedAppUsage
public int getCurrentMode() {
return mCurrentMode;
}
@@ -67,6 +70,7 @@
* @return The current power role: {@link UsbPort#POWER_ROLE_SOURCE},
* {@link UsbPort#POWER_ROLE_SINK}, or 0 if nothing is connected.
*/
+ @UnsupportedAppUsage
public int getCurrentPowerRole() {
return mCurrentPowerRole;
}
@@ -77,6 +81,7 @@
* @return The current data role: {@link UsbPort#DATA_ROLE_HOST},
* {@link UsbPort#DATA_ROLE_DEVICE}, or 0 if nothing is connected.
*/
+ @UnsupportedAppUsage
public int getCurrentDataRole() {
return mCurrentDataRole;
}
@@ -90,12 +95,14 @@
* @param dataRole The data role to check: either {@link UsbPort#DATA_ROLE_HOST}
* or {@link UsbPort#DATA_ROLE_DEVICE}, or 0 if no data role.
*/
+ @UnsupportedAppUsage
public boolean isRoleCombinationSupported(int powerRole, int dataRole) {
return (mSupportedRoleCombinations &
UsbPort.combineRolesAsBit(powerRole, dataRole)) != 0;
}
/** @hide */
+ @UnsupportedAppUsage
public int getSupportedRoleCombinations() {
return mSupportedRoleCombinations;
}
diff --git a/core/java/android/hardware/usb/UsbRequest.java b/core/java/android/hardware/usb/UsbRequest.java
index f59c87e..7abf3e9 100644
--- a/core/java/android/hardware/usb/UsbRequest.java
+++ b/core/java/android/hardware/usb/UsbRequest.java
@@ -17,6 +17,7 @@
package android.hardware.usb;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.os.Build;
import android.util.Log;
@@ -47,14 +48,17 @@
static final int MAX_USBFS_BUFFER_SIZE = 16384;
// used by the JNI code
+ @UnsupportedAppUsage
private long mNativeContext;
private UsbEndpoint mEndpoint;
/** The buffer that is currently being read / written */
+ @UnsupportedAppUsage
private ByteBuffer mBuffer;
/** The amount of data to read / write when using {@link #queue} */
+ @UnsupportedAppUsage
private int mLength;
// for client use
diff --git a/core/java/android/net/NetworkUtils.java b/core/java/android/net/NetworkUtils.java
index 9a5d502..dc1f805 100644
--- a/core/java/android/net/NetworkUtils.java
+++ b/core/java/android/net/NetworkUtils.java
@@ -126,51 +126,122 @@
public native static boolean queryUserAccess(int uid, int netId);
/**
- * Convert a IPv4 address from an integer to an InetAddress.
- * @param hostAddress an int corresponding to the IPv4 address in network byte order
+ * @see #intToInet4AddressHTL(int)
+ * @deprecated Use either {@link #intToInet4AddressHTH(int)}
+ * or {@link #intToInet4AddressHTL(int)}
*/
+ @Deprecated
public static InetAddress intToInetAddress(int hostAddress) {
- byte[] addressBytes = { (byte)(0xff & hostAddress),
- (byte)(0xff & (hostAddress >> 8)),
- (byte)(0xff & (hostAddress >> 16)),
- (byte)(0xff & (hostAddress >> 24)) };
+ return intToInet4AddressHTL(hostAddress);
+ }
+
+ /**
+ * Convert a IPv4 address from an integer to an InetAddress (0x04030201 -> 1.2.3.4)
+ *
+ * <p>This method uses the higher-order int bytes as the lower-order IPv4 address bytes,
+ * which is an unusual convention. Consider {@link #intToInet4AddressHTH(int)} instead.
+ * @param hostAddress an int coding for an IPv4 address, where higher-order int byte is
+ * lower-order IPv4 address byte
+ */
+ public static InetAddress intToInet4AddressHTL(int hostAddress) {
+ return intToInet4AddressHTH(Integer.reverseBytes(hostAddress));
+ }
+
+ /**
+ * Convert a IPv4 address from an integer to an InetAddress (0x01020304 -> 1.2.3.4)
+ * @param hostAddress an int coding for an IPv4 address
+ */
+ public static InetAddress intToInet4AddressHTH(int hostAddress) {
+ byte[] addressBytes = { (byte) (0xff & (hostAddress >> 24)),
+ (byte) (0xff & (hostAddress >> 16)),
+ (byte) (0xff & (hostAddress >> 8)),
+ (byte) (0xff & hostAddress) };
try {
- return InetAddress.getByAddress(addressBytes);
+ return InetAddress.getByAddress(addressBytes);
} catch (UnknownHostException e) {
- throw new AssertionError();
+ throw new AssertionError();
}
}
/**
- * Convert a IPv4 address from an InetAddress to an integer
- * @param inetAddr is an InetAddress corresponding to the IPv4 address
- * @return the IP address as an integer in network byte order
+ * @see #inet4AddressToIntHTL(Inet4Address)
+ * @deprecated Use either {@link #inet4AddressToIntHTH(Inet4Address)}
+ * or {@link #inet4AddressToIntHTL(Inet4Address)}
*/
+ @Deprecated
public static int inetAddressToInt(Inet4Address inetAddr)
throws IllegalArgumentException {
- byte [] addr = inetAddr.getAddress();
- return ((addr[3] & 0xff) << 24) | ((addr[2] & 0xff) << 16) |
- ((addr[1] & 0xff) << 8) | (addr[0] & 0xff);
+ return inet4AddressToIntHTL(inetAddr);
}
/**
- * Convert a network prefix length to an IPv4 netmask integer
- * @param prefixLength
- * @return the IPv4 netmask as an integer in network byte order
+ * Convert an IPv4 address from an InetAddress to an integer (1.2.3.4 -> 0x01020304)
+ *
+ * <p>This conversion can help order IP addresses: considering the ordering
+ * 192.0.2.1 < 192.0.2.2 < ..., resulting ints will follow that ordering if read as unsigned
+ * integers with {@link Integer#toUnsignedLong}.
+ * @param inetAddr is an InetAddress corresponding to the IPv4 address
+ * @return the IP address as integer
*/
+ public static int inet4AddressToIntHTH(Inet4Address inetAddr)
+ throws IllegalArgumentException {
+ byte [] addr = inetAddr.getAddress();
+ return ((addr[0] & 0xff) << 24) | ((addr[1] & 0xff) << 16)
+ | ((addr[2] & 0xff) << 8) | (addr[3] & 0xff);
+ }
+
+ /**
+ * Convert a IPv4 address from an InetAddress to an integer (1.2.3.4 -> 0x04030201)
+ *
+ * <p>This method stores the higher-order IPv4 address bytes in the lower-order int bytes,
+ * which is an unusual convention. Consider {@link #inet4AddressToIntHTH(Inet4Address)} instead.
+ * @param inetAddr is an InetAddress corresponding to the IPv4 address
+ * @return the IP address as integer
+ */
+ public static int inet4AddressToIntHTL(Inet4Address inetAddr) {
+ return Integer.reverseBytes(inet4AddressToIntHTH(inetAddr));
+ }
+
+ /**
+ * @see #prefixLengthToV4NetmaskIntHTL(int)
+ * @deprecated Use either {@link #prefixLengthToV4NetmaskIntHTH(int)}
+ * or {@link #prefixLengthToV4NetmaskIntHTL(int)}
+ */
+ @Deprecated
public static int prefixLengthToNetmaskInt(int prefixLength)
throws IllegalArgumentException {
+ return prefixLengthToV4NetmaskIntHTL(prefixLength);
+ }
+
+ /**
+ * Convert a network prefix length to an IPv4 netmask integer (prefixLength 17 -> 0xffff8000)
+ * @return the IPv4 netmask as an integer
+ */
+ public static int prefixLengthToV4NetmaskIntHTH(int prefixLength)
+ throws IllegalArgumentException {
if (prefixLength < 0 || prefixLength > 32) {
throw new IllegalArgumentException("Invalid prefix length (0 <= prefix <= 32)");
}
- int value = 0xffffffff << (32 - prefixLength);
- return Integer.reverseBytes(value);
+ // (int)a << b is equivalent to a << (b & 0x1f): can't shift by 32 (-1 << 32 == -1)
+ return prefixLength == 0 ? 0 : 0xffffffff << (32 - prefixLength);
+ }
+
+ /**
+ * Convert a network prefix length to an IPv4 netmask integer (prefixLength 17 -> 0x0080ffff).
+ *
+ * <p>This method stores the higher-order IPv4 address bytes in the lower-order int bytes,
+ * which is an unusual convention. Consider {@link #prefixLengthToV4NetmaskIntHTH(int)} instead.
+ * @return the IPv4 netmask as an integer
+ */
+ public static int prefixLengthToV4NetmaskIntHTL(int prefixLength)
+ throws IllegalArgumentException {
+ return Integer.reverseBytes(prefixLengthToV4NetmaskIntHTH(prefixLength));
}
/**
* Convert a IPv4 netmask integer to a prefix length
- * @param netmask as an integer in network byte order
+ * @param netmask as an integer (0xff000000 for a /8 subnet)
* @return the network prefix length
*/
public static int netmaskIntToPrefixLength(int netmask) {
diff --git a/core/java/android/net/OWNERS b/core/java/android/net/OWNERS
index 3cd37bf..fee91fb 100644
--- a/core/java/android/net/OWNERS
+++ b/core/java/android/net/OWNERS
@@ -1,8 +1,20 @@
set noparent
+codewiz@google.com
ek@google.com
jsharkey@android.com
jchalard@google.com
lorenzo@google.com
+reminv@google.com
satk@google.com
silberst@google.com
+
+per-file SSL*=flooey@google.com
+per-file SSL*=narayan@google.com
+per-file SSL*=tobiast@google.com
+per-file Uri*=flooey@google.com
+per-file Uri*=narayan@google.com
+per-file Uri*=tobiast@google.com
+per-file Url*=flooey@google.com
+per-file Url*=narayan@google.com
+per-file Url*=tobiast@google.com
diff --git a/core/java/android/net/SSLCertificateSocketFactory.java b/core/java/android/net/SSLCertificateSocketFactory.java
index 1f53587..d7eb477 100644
--- a/core/java/android/net/SSLCertificateSocketFactory.java
+++ b/core/java/android/net/SSLCertificateSocketFactory.java
@@ -73,10 +73,14 @@
* Updating Your Security Provider to Protect Against SSL Exploits</a>
* for further information.</p>
*
- * <p>One way to verify the server's identity is to use
+ * <p>The recommended way to verify the server's identity is to use
* {@link HttpsURLConnection#getDefaultHostnameVerifier()} to get a
* {@link HostnameVerifier} to verify the certificate hostname.
*
+ * <p><b>Warning</b>: Some methods on this class return connected sockets and some return
+ * unconnected sockets. For the methods that return connected sockets, setting
+ * connection- or handshake-related properties on those sockets will have no effect.
+ *
* <p>On development devices, "setprop socket.relaxsslcheck yes" bypasses all
* SSL certificate and hostname checks for testing purposes. This setting
* requires root access.
@@ -442,8 +446,10 @@
/**
* {@inheritDoc}
*
- * <p>This method verifies the peer's certificate hostname after connecting
- * (unless created with {@link #getInsecure(int, SSLSessionCache)}).
+ * <p>By default, this method returns a <i>connected</i> socket and verifies the peer's
+ * certificate hostname after connecting; if this instance was created with
+ * {@link #getInsecure(int, SSLSessionCache)}, it returns a socket that is <i>not connected</i>
+ * instead.
*/
@Override
public Socket createSocket(Socket k, String host, int port, boolean close) throws IOException {
@@ -459,7 +465,7 @@
}
/**
- * Creates a new socket which is not connected to any remote host.
+ * Creates a new socket which is <i>not connected</i> to any remote host.
* You must use {@link Socket#connect} to connect the socket.
*
* <p class="caution"><b>Warning:</b> Hostname verification is not performed
@@ -479,6 +485,8 @@
/**
* {@inheritDoc}
*
+ * <p>This method returns a socket that is <i>not connected</i>.
+ *
* <p class="caution"><b>Warning:</b> Hostname verification is not performed
* with this method. You MUST verify the server's identity after connecting
* the socket to avoid man-in-the-middle attacks.</p>
@@ -498,6 +506,8 @@
/**
* {@inheritDoc}
*
+ * <p>This method returns a socket that is <i>not connected</i>.
+ *
* <p class="caution"><b>Warning:</b> Hostname verification is not performed
* with this method. You MUST verify the server's identity after connecting
* the socket to avoid man-in-the-middle attacks.</p>
@@ -515,8 +525,10 @@
/**
* {@inheritDoc}
*
- * <p>This method verifies the peer's certificate hostname after connecting
- * (unless created with {@link #getInsecure(int, SSLSessionCache)}).
+ * <p>By default, this method returns a <i>connected</i> socket and verifies the peer's
+ * certificate hostname after connecting; if this instance was created with
+ * {@link #getInsecure(int, SSLSessionCache)}, it returns a socket that is <i>not connected</i>
+ * instead.
*/
@Override
public Socket createSocket(String host, int port, InetAddress localAddr, int localPort)
@@ -536,8 +548,10 @@
/**
* {@inheritDoc}
*
- * <p>This method verifies the peer's certificate hostname after connecting
- * (unless created with {@link #getInsecure(int, SSLSessionCache)}).
+ * <p>By default, this method returns a <i>connected</i> socket and verifies the peer's
+ * certificate hostname after connecting; if this instance was created with
+ * {@link #getInsecure(int, SSLSessionCache)}, it returns a socket that is <i>not connected</i>
+ * instead.
*/
@Override
public Socket createSocket(String host, int port) throws IOException {
diff --git a/core/java/android/net/http/OWNERS b/core/java/android/net/http/OWNERS
new file mode 100644
index 0000000..6b8c9ed
--- /dev/null
+++ b/core/java/android/net/http/OWNERS
@@ -0,0 +1,3 @@
+flooey@google.com
+narayan@google.com
+tobiast@google.com
diff --git a/core/java/android/net/http/SslCertificate.java b/core/java/android/net/http/SslCertificate.java
index 4c0f418..21ada36 100644
--- a/core/java/android/net/http/SslCertificate.java
+++ b/core/java/android/net/http/SslCertificate.java
@@ -16,8 +16,6 @@
package android.net.http;
-import com.android.internal.util.HexDump;
-
import android.content.Context;
import android.os.Bundle;
import android.text.format.DateFormat;
@@ -25,6 +23,9 @@
import android.view.View;
import android.widget.TextView;
+import com.android.internal.util.HexDump;
+import com.android.org.bouncycastle.asn1.x509.X509Name;
+
import java.io.ByteArrayInputStream;
import java.math.BigInteger;
import java.security.MessageDigest;
@@ -39,8 +40,6 @@
import java.util.Date;
import java.util.Vector;
-import com.android.org.bouncycastle.asn1.x509.X509Name;
-
/**
* SSL certificate info (certificate details) class
*/
@@ -248,6 +247,14 @@
}
/**
+ * @return The {@code X509Certificate} used to create this {@code SslCertificate} or
+ * {@code null} if no certificate was provided.
+ */
+ public X509Certificate getX509Certificate() {
+ return mX509Certificate;
+ }
+
+ /**
* Convenience for UI presentation, not intended as public API.
*/
private static String getSerialNumber(X509Certificate x509Certificate) {
diff --git a/core/java/android/net/metrics/ValidationProbeEvent.java b/core/java/android/net/metrics/ValidationProbeEvent.java
index 1ad0929..12c2305 100644
--- a/core/java/android/net/metrics/ValidationProbeEvent.java
+++ b/core/java/android/net/metrics/ValidationProbeEvent.java
@@ -37,6 +37,7 @@
public static final int PROBE_HTTPS = 2;
public static final int PROBE_PAC = 3;
public static final int PROBE_FALLBACK = 4;
+ public static final int PROBE_PRIVDNS = 5;
public static final int DNS_FAILURE = 0;
public static final int DNS_SUCCESS = 1;
diff --git a/core/java/android/os/Build.java b/core/java/android/os/Build.java
index 25a5e91..6bd2e76 100644
--- a/core/java/android/os/Build.java
+++ b/core/java/android/os/Build.java
@@ -631,7 +631,8 @@
* October 2013: Android 4.4, KitKat, another tasty treat.
*
* <p>Applications targeting this or a later release will get these
- * new changes in behavior:</p>
+ * new changes in behavior. For more information about this release, see the
+ * <a href="/about/versions/kitkat/">Android KitKat overview</a>.</p>
* <ul>
* <li> The default result of
* {@link android.preference.PreferenceActivity#isValidFragment(String)
@@ -681,7 +682,8 @@
* November 2014: Lollipop. A flat one with beautiful shadows. But still tasty.
*
* <p>Applications targeting this or a later release will get these
- * new changes in behavior:</p>
+ * new changes in behavior. For more information about this release, see the
+ * <a href="/about/versions/lollipop/">Android Lollipop overview</a>.</p>
* <ul>
* <li> {@link android.content.Context#bindService Context.bindService} now
* requires an explicit Intent, and will throw an exception if given an implicit
@@ -710,6 +712,8 @@
/**
* March 2015: Lollipop with an extra sugar coating on the outside!
+ * For more information about this release, see the
+ * <a href="/about/versions/android-5.1">Android 5.1 APIs</a>.
*/
public static final int LOLLIPOP_MR1 = 22;
@@ -717,7 +721,8 @@
* M is for Marshmallow!
*
* <p>Applications targeting this or a later release will get these
- * new changes in behavior:</p>
+ * new changes in behavior. For more information about this release, see the
+ * <a href="/about/versions/marshmallow/">Android 6.0 Marshmallow overview</a>.</p>
* <ul>
* <li> Runtime permissions. Dangerous permissions are no longer granted at
* install time, but must be requested by the application at runtime through
@@ -748,7 +753,8 @@
* N is for Nougat.
*
* <p>Applications targeting this or a later release will get these
- * new changes in behavior:</p>
+ * new changes in behavior. For more information about this release, see
+ * the <a href="/about/versions/nougat/">Android Nougat overview</a>.</p>
* <ul>
* <li> {@link android.app.DownloadManager.Request#setAllowedNetworkTypes
* DownloadManager.Request.setAllowedNetworkTypes}
@@ -798,7 +804,9 @@
public static final int N = 24;
/**
- * N MR1: Nougat++.
+ * N MR1: Nougat++. For more information about this release, see
+ * <a href="/about/versions/nougat/android-7.1">Android 7.1 for
+ * Developers</a>.
*/
public static final int N_MR1 = 25;
@@ -806,7 +814,8 @@
* O.
*
* <p>Applications targeting this or a later release will get these
- * new changes in behavior:</p>
+ * new changes in behavior. For more information about this release, see
+ * the <a href="/about/versions/oreo/">Android Oreo overview</a>.</p>
* <ul>
* <li><a href="{@docRoot}about/versions/oreo/background.html">Background execution limits</a>
* are applied to the application.</li>
@@ -895,13 +904,16 @@
* O MR1.
*
* <p>Applications targeting this or a later release will get these
- * new changes in behavior:</p>
+ * new changes in behavior. For more information about this release, see
+ * <a href="/about/versions/oreo/android-8.1">Android 8.1 features and
+ * APIs</a>.</p>
* <ul>
* <li>Apps exporting and linking to apk shared libraries must explicitly
* enumerate all signing certificates in a consistent order.</li>
* <li>{@link android.R.attr#screenOrientation} can not be used to request a fixed
* orientation if the associated activity is not fullscreen and opaque.</li>
* </ul>
+ *
*/
public static final int O_MR1 = 27;
@@ -909,7 +921,8 @@
* P.
*
* <p>Applications targeting this or a later release will get these
- * new changes in behavior:</p>
+ * new changes in behavior. For more information about this release, see the
+ * <a href="/about/versions/pie/">Android 9 Pie overview</a>.</p>
* <ul>
* <li>{@link android.app.Service#startForeground Service.startForeground} requires
* that apps hold the permission
@@ -917,6 +930,7 @@
* <li>{@link android.widget.LinearLayout} will always remeasure weighted children,
* even if there is no excess space.</li>
* </ul>
+ *
*/
public static final int P = 28;
diff --git a/core/java/android/os/IVibratorService.aidl b/core/java/android/os/IVibratorService.aidl
index e59c3ae..e8b3ca6 100644
--- a/core/java/android/os/IVibratorService.aidl
+++ b/core/java/android/os/IVibratorService.aidl
@@ -23,7 +23,8 @@
{
boolean hasVibrator();
boolean hasAmplitudeControl();
- void vibrate(int uid, String opPkg, in VibrationEffect effect, int usageHint, IBinder token);
+ void vibrate(int uid, String opPkg, in VibrationEffect effect, int usageHint, String reason,
+ IBinder token);
void cancelVibrate(IBinder token);
}
diff --git a/core/java/android/os/NullVibrator.java b/core/java/android/os/NullVibrator.java
index b8bdc89..1d0f9d3 100644
--- a/core/java/android/os/NullVibrator.java
+++ b/core/java/android/os/NullVibrator.java
@@ -44,8 +44,8 @@
}
@Override
- public void vibrate(int uid, String opPkg,
- VibrationEffect effect, AudioAttributes attributes) {
+ public void vibrate(int uid, String opPkg, VibrationEffect effect,
+ String reason, AudioAttributes attributes) {
}
@Override
diff --git a/core/java/android/os/SELinux.java b/core/java/android/os/SELinux.java
index 2773da5..94441ca 100644
--- a/core/java/android/os/SELinux.java
+++ b/core/java/android/os/SELinux.java
@@ -18,9 +18,9 @@
import android.util.Slog;
-import java.io.IOException;
import java.io.File;
import java.io.FileDescriptor;
+import java.io.IOException;
/**
* This class provides access to the centralized jni bindings for
@@ -79,6 +79,13 @@
public static final native String getPeerContext(FileDescriptor fd);
/**
+ * Get the security context of a file descriptor of a file.
+ * @param fd FileDescriptor of a file.
+ * @return a String representing the file descriptor security context.
+ */
+ public static final native String getFileContext(FileDescriptor fd);
+
+ /**
* Gets the security context of the current process.
* @return a String representing the security context of the current process.
*/
diff --git a/core/java/android/os/SystemVibrator.java b/core/java/android/os/SystemVibrator.java
index f776c17..c989197 100644
--- a/core/java/android/os/SystemVibrator.java
+++ b/core/java/android/os/SystemVibrator.java
@@ -67,14 +67,14 @@
}
@Override
- public void vibrate(int uid, String opPkg,
- VibrationEffect effect, AudioAttributes attributes) {
+ public void vibrate(int uid, String opPkg, VibrationEffect effect,
+ String reason, AudioAttributes attributes) {
if (mService == null) {
Log.w(TAG, "Failed to vibrate; no vibrator service.");
return;
}
try {
- mService.vibrate(uid, opPkg, effect, usageForAttributes(attributes), mToken);
+ mService.vibrate(uid, opPkg, effect, usageForAttributes(attributes), reason, mToken);
} catch (RemoteException e) {
Log.w(TAG, "Failed to vibrate.", e);
}
diff --git a/core/java/android/os/Vibrator.java b/core/java/android/os/Vibrator.java
index d2d8f1e..b5aeba0 100644
--- a/core/java/android/os/Vibrator.java
+++ b/core/java/android/os/Vibrator.java
@@ -248,17 +248,17 @@
@RequiresPermission(android.Manifest.permission.VIBRATE)
public void vibrate(VibrationEffect vibe, AudioAttributes attributes) {
- vibrate(Process.myUid(), mPackageName, vibe, attributes);
+ vibrate(Process.myUid(), mPackageName, vibe, null, attributes);
}
/**
- * Like {@link #vibrate(VibrationEffect, AudioAttributes)}, but allowing the caller to specify
- * that the vibration is owned by someone else.
+ * Like {@link #vibrate(int, String, VibrationEffect, AudioAttributes)}, but allows the
+ * caller to specify the vibration is owned by someone else and set reason for vibration.
* @hide
*/
@RequiresPermission(android.Manifest.permission.VIBRATE)
- public abstract void vibrate(int uid, String opPkg,
- VibrationEffect vibe, AudioAttributes attributes);
+ public abstract void vibrate(int uid, String opPkg, VibrationEffect vibe,
+ String reason, AudioAttributes attributes);
/**
* Turn the vibrator off.
diff --git a/core/java/android/provider/ContactsContract.java b/core/java/android/provider/ContactsContract.java
index f7409d0..14a4509 100644
--- a/core/java/android/provider/ContactsContract.java
+++ b/core/java/android/provider/ContactsContract.java
@@ -187,8 +187,7 @@
/**
* A boolean parameter for {@link Contacts#CONTENT_STREQUENT_URI} and
* {@link Contacts#CONTENT_STREQUENT_FILTER_URI}, which requires the ContactsProvider to
- * return only phone-related results. For example, frequently contacted person list should
- * include persons contacted via phone (not email, sms, etc.)
+ * return only phone-related results.
*/
public static final String STREQUENT_PHONE_ONLY = "strequent_phone_only";
@@ -870,13 +869,23 @@
/**
* The number of times a contact has been contacted
* <P>Type: INTEGER</P>
+ *
+ * @deprecated Contacts affinity information is no longer supported as of
+ * Android version {@link android.os.Build.VERSION_CODES#Q}. This column
+ * always contains 0.
*/
+ @Deprecated
public static final String TIMES_CONTACTED = "times_contacted";
/**
* The last time a contact was contacted.
* <P>Type: INTEGER</P>
+ *
+ * @deprecated Contacts affinity information is no longer supported as of
+ * Android version {@link android.os.Build.VERSION_CODES#Q}. This column
+ * always contains 0.
*/
+ @Deprecated
public static final String LAST_TIME_CONTACTED = "last_time_contacted";
/** @hide Raw value. */
@@ -1313,8 +1322,7 @@
* of the newly inserted raw contact.</dd>
* <dt><b>Update</b></dt>
* <dd>Only certain columns of Contact are modifiable:
- * {@link #TIMES_CONTACTED}, {@link #LAST_TIME_CONTACTED}, {@link #STARRED},
- * {@link #CUSTOM_RINGTONE}, {@link #SEND_TO_VOICEMAIL}. Changing any of
+ * {@link #STARRED}, {@link #CUSTOM_RINGTONE}, {@link #SEND_TO_VOICEMAIL}. Changing any of
* these columns on the Contact also changes them on all constituent raw
* contacts.</dd>
* <dt><b>Delete</b></dt>
@@ -1415,27 +1423,6 @@
* </tr>
* <tr>
* <td>int</td>
- * <td>{@link #TIMES_CONTACTED}</td>
- * <td>read/write</td>
- * <td>The number of times the contact has been contacted. See
- * {@link #markAsContacted}. When raw contacts are aggregated, this field is
- * computed automatically as the maximum number of times contacted among all
- * constituent raw contacts. Setting this field automatically changes the
- * corresponding field on all constituent raw contacts.</td>
- * </tr>
- * <tr>
- * <td>long</td>
- * <td>{@link #LAST_TIME_CONTACTED}</td>
- * <td>read/write</td>
- * <td>The timestamp of the last time the contact was contacted. See
- * {@link #markAsContacted}. Setting this field also automatically
- * increments {@link #TIMES_CONTACTED}. When raw contacts are aggregated,
- * this field is computed automatically as the latest time contacted of all
- * constituent raw contacts. Setting this field automatically changes the
- * corresponding field on all constituent raw contacts.</td>
- * </tr>
- * <tr>
- * <td>int</td>
* <td>{@link #STARRED}</td>
* <td>read/write</td>
* <td>An indicator for favorite contacts: '1' if favorite, '0' otherwise.
@@ -1696,16 +1683,12 @@
* @param resolver the ContentResolver to use
* @param contactId the person who was contacted
*
- * @deprecated The class DataUsageStatUpdater of the Android support library should
- * be used instead.
+ * @deprecated Contacts affinity information is no longer supported as of
+ * Android version {@link android.os.Build.VERSION_CODES#Q}. This method
+ * is no-op.
*/
@Deprecated
public static void markAsContacted(ContentResolver resolver, long contactId) {
- Uri uri = ContentUris.withAppendedId(CONTENT_URI, contactId);
- ContentValues values = new ContentValues();
- // TIMES_CONTACTED will be incremented when LAST_TIME_CONTACTED is modified.
- values.put(LR_LAST_TIME_CONTACTED, System.currentTimeMillis());
- resolver.update(uri, values, null, null);
}
/**
@@ -1727,15 +1710,21 @@
/**
* The content:// style URI for this table joined with useful data from
- * {@link ContactsContract.Data}, filtered to include only starred contacts
- * and the most frequently contacted contacts.
+ * {@link ContactsContract.Data}, filtered to include only starred contacts.
+ * Frequent contacts are no longer included in the result as of
+ * Android version {@link android.os.Build.VERSION_CODES#Q}.
*/
public static final Uri CONTENT_STREQUENT_URI = Uri.withAppendedPath(
CONTENT_URI, "strequent");
/**
* The content:// style URI for showing a list of frequently contacted people.
+ *
+ * @deprecated Frequent contacts are no longer supported as of
+ * Android version {@link android.os.Build.VERSION_CODES#Q}.
+ * This URI always returns an empty cursor.
*/
+ @Deprecated
public static final Uri CONTENT_FREQUENT_URI = Uri.withAppendedPath(
CONTENT_URI, "frequent");
@@ -2631,27 +2620,6 @@
* </tr>
* <tr>
* <td>int</td>
- * <td>{@link #TIMES_CONTACTED}</td>
- * <td>read/write</td>
- * <td>The number of times the contact has been contacted. To have an effect
- * on the corresponding value of the aggregate contact, this field
- * should be set at the time the raw contact is inserted.
- * After that, this value is typically updated via
- * {@link ContactsContract.Contacts#markAsContacted}.</td>
- * </tr>
- * <tr>
- * <td>long</td>
- * <td>{@link #LAST_TIME_CONTACTED}</td>
- * <td>read/write</td>
- * <td>The timestamp of the last time the contact was contacted. To have an effect
- * on the corresponding value of the aggregate contact, this field
- * should be set at the time the raw contact is inserted.
- * After that, this value is typically updated via
- * {@link ContactsContract.Contacts#markAsContacted}.
- * </td>
- * </tr>
- * <tr>
- * <td>int</td>
* <td>{@link #STARRED}</td>
* <td>read/write</td>
* <td>An indicator for favorite contacts: '1' if favorite, '0' otherwise.
@@ -4286,10 +4254,22 @@
* Columns in the Data_Usage_Stat table
*/
protected interface DataUsageStatColumns {
- /** The last time (in milliseconds) this {@link Data} was used. */
+ /**
+ * The last time (in milliseconds) this {@link Data} was used.
+ * @deprecated Contacts affinity information is no longer supported as of
+ * Android version {@link android.os.Build.VERSION_CODES#Q}.
+ * This column always contains 0.
+ */
+ @Deprecated
public static final String LAST_TIME_USED = "last_time_used";
- /** The number of times the referenced {@link Data} has been used. */
+ /**
+ * The number of times the referenced {@link Data} has been used.
+ * @deprecated Contacts affinity information is no longer supported as of
+ * Android version {@link android.os.Build.VERSION_CODES#Q}.
+ * This column always contains 0.
+ */
+ @Deprecated
public static final String TIMES_USED = "times_used";
/** @hide Raw value. */
@@ -4765,18 +4745,6 @@
* </tr>
* <tr>
* <td>int</td>
- * <td>{@link #TIMES_CONTACTED}</td>
- * <td>read-only</td>
- * <td>See {@link ContactsContract.Contacts}.</td>
- * </tr>
- * <tr>
- * <td>long</td>
- * <td>{@link #LAST_TIME_CONTACTED}</td>
- * <td>read-only</td>
- * <td>See {@link ContactsContract.Contacts}.</td>
- * </tr>
- * <tr>
- * <td>int</td>
* <td>{@link #STARRED}</td>
* <td>read-only</td>
* <td>See {@link ContactsContract.Contacts}.</td>
@@ -5221,18 +5189,6 @@
* </tr>
* <tr>
* <td>int</td>
- * <td>{@link #TIMES_CONTACTED}</td>
- * <td>read-only</td>
- * <td>See {@link ContactsContract.Contacts}.</td>
- * </tr>
- * <tr>
- * <td>long</td>
- * <td>{@link #LAST_TIME_CONTACTED}</td>
- * <td>read-only</td>
- * <td>See {@link ContactsContract.Contacts}.</td>
- * </tr>
- * <tr>
- * <td>int</td>
* <td>{@link #STARRED}</td>
* <td>read-only</td>
* <td>See {@link ContactsContract.Contacts}.</td>
@@ -8305,7 +8261,12 @@
* boolean successful = resolver.delete(DataUsageFeedback.DELETE_USAGE_URI, null, null) > 0;
* </pre>
* </p>
+ *
+ * @deprecated Contacts affinity information is no longer supported as of
+ * Android version {@link android.os.Build.VERSION_CODES#Q}.
+ * Both update and delete calls are always ignored.
*/
+ @Deprecated
public static final class DataUsageFeedback {
/**
@@ -8925,10 +8886,6 @@
* +<phone>", etc. If you must show the prefix text in the Contacts App, please use a
* different DATA# column, and update your contacts.xml to point to this new column. </em>
* </li>
- * <li>Everytime the user sends a message to a contact, your app may choose to update the
- * {@link ContactOptionsColumns#TIMES_CONTACTED} entry through DataUsageFeedback class.
- * Doing this will allow Voice Assistant to bias speech recognition to contacts frequently
- * contacted, this is particularly useful for contact names that are hard to pronounce.</li>
* </ul>
* If the app chooses not to integrate with the Contacts Provider (in particular, when
* either METADATA_ACCOUNT_TYPE or METADATA_MIMETYPE field is missing), Voice Assistant
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 788579f..350602c 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -10659,6 +10659,15 @@
public static final String ACTIVITY_MANAGER_CONSTANTS = "activity_manager_constants";
/**
+ * Feature flag to enable or disable the activity starts logging feature.
+ * Type: int (0 for false, 1 for true)
+ * Default: 0
+ * @hide
+ */
+ public static final String ACTIVITY_STARTS_LOGGING_ENABLED
+ = "activity_starts_logging_enabled";
+
+ /**
* App ops specific settings.
* This is encoded as a key=value list, separated by commas. Ex:
*
diff --git a/core/java/android/service/autofill/SaveInfo.java b/core/java/android/service/autofill/SaveInfo.java
index 4943fc8..b845250 100644
--- a/core/java/android/service/autofill/SaveInfo.java
+++ b/core/java/android/service/autofill/SaveInfo.java
@@ -119,7 +119,8 @@
*
* <p>But it is only triggered when all conditions below are met:
* <ul>
- * <li>The {@link SaveInfo} associated with the {@link FillResponse} is not {@code null}.
+ * <li>The {@link SaveInfo} associated with the {@link FillResponse} is not {@code null} neither
+ * has the {@link #FLAG_DELAY_SAVE} flag.
* <li>The {@link AutofillValue}s of all required views (as set by the {@code requiredIds} passed
* to the {@link SaveInfo.Builder} constructor are not empty.
* <li>The {@link AutofillValue} of at least one view (be it required or optional) has changed
@@ -234,10 +235,26 @@
*/
public static final int FLAG_DONT_SAVE_ON_FINISH = 0x2;
+ /**
+ * Don't trigger the autofill save UI when the autofill context associated with the response
+ * associated with this {@link SaveInfo} is {@link AutofillManager#commit() committed},
+ * but keep its {@link FillContext} so it's delivered in a future
+ * {@link AutofillService#onSaveRequest(SaveRequest, SaveCallback) save request} of an
+ * activity belonging to the same task.
+ *
+ * <p>This flag should be used when the service detects that the application uses
+ * multiple screens to implement an autofillable workflow (for example, one screen for the
+ * username field, another for password).
+ */
+ // TODO(b/112051762): improve documentation: add example, document relationship with other
+ // flagss, etc...
+ public static final int FLAG_DELAY_SAVE = 0x4;
+
/** @hide */
@IntDef(flag = true, prefix = { "FLAG_" }, value = {
FLAG_SAVE_ON_ALL_VIEWS_INVISIBLE,
- FLAG_DONT_SAVE_ON_FINISH
+ FLAG_DONT_SAVE_ON_FINISH,
+ FLAG_DELAY_SAVE
})
@Retention(RetentionPolicy.SOURCE)
@interface SaveInfoFlags{}
@@ -410,14 +427,15 @@
* Sets flags changing the save behavior.
*
* @param flags {@link #FLAG_SAVE_ON_ALL_VIEWS_INVISIBLE},
- * {@link #FLAG_DONT_SAVE_ON_FINISH}, or {@code 0}.
+ * {@link #FLAG_DONT_SAVE_ON_FINISH}, {@link #FLAG_DELAY_SAVE}, or {@code 0}.
* @return This builder.
*/
public @NonNull Builder setFlags(@SaveInfoFlags int flags) {
throwIfDestroyed();
mFlags = Preconditions.checkFlagsArgument(flags,
- FLAG_SAVE_ON_ALL_VIEWS_INVISIBLE | FLAG_DONT_SAVE_ON_FINISH);
+ FLAG_SAVE_ON_ALL_VIEWS_INVISIBLE | FLAG_DONT_SAVE_ON_FINISH
+ | FLAG_DELAY_SAVE);
return this;
}
@@ -663,14 +681,16 @@
* Builds a new {@link SaveInfo} instance.
*
* @throws IllegalStateException if no
- * {@link #SaveInfo.Builder(int, AutofillId[]) required ids}
- * or {@link #setOptionalIds(AutofillId[]) optional ids} were set
+ * {@link #SaveInfo.Builder(int, AutofillId[]) required ids},
+ * or {@link #setOptionalIds(AutofillId[]) optional ids}, or {@link #FLAG_DELAY_SAVE}
+ * were set
*/
public SaveInfo build() {
throwIfDestroyed();
Preconditions.checkState(
- !ArrayUtils.isEmpty(mRequiredIds) || !ArrayUtils.isEmpty(mOptionalIds),
- "must have at least one required or optional id");
+ !ArrayUtils.isEmpty(mRequiredIds) || !ArrayUtils.isEmpty(mOptionalIds)
+ || (mFlags & FLAG_DELAY_SAVE) != 0,
+ "must have at least one required or optional id or FLAG_DELAYED_SAVE");
mDestroyed = true;
return new SaveInfo(this);
}
diff --git a/core/java/android/service/autofill/SaveRequest.java b/core/java/android/service/autofill/SaveRequest.java
index 4f85e6b..c9b5b55 100644
--- a/core/java/android/service/autofill/SaveRequest.java
+++ b/core/java/android/service/autofill/SaveRequest.java
@@ -52,6 +52,12 @@
}
/**
+ * Gets the contexts associated with each previous fill request.
+ *
+ * <p><b>Note:</b> Starting on Android {@link android.os.Build.VERSION_CODES#Q}, it could also
+ * include contexts from requests whose {@link SaveInfo} had the
+ * {@link SaveInfo#FLAG_DELAY_SAVE} flag.
+ *
* @return The contexts associated with each previous fill request.
*/
public @NonNull List<FillContext> getFillContexts() {
diff --git a/core/java/android/speech/tts/TextToSpeech.java b/core/java/android/speech/tts/TextToSpeech.java
index 6f1bd78..83f14d1 100644
--- a/core/java/android/speech/tts/TextToSpeech.java
+++ b/core/java/android/speech/tts/TextToSpeech.java
@@ -20,6 +20,7 @@
import android.annotation.RawRes;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
+import android.annotation.UnsupportedAppUsage;
import android.content.ComponentName;
import android.content.ContentResolver;
import android.content.Context;
@@ -668,8 +669,10 @@
}
private final Context mContext;
+ @UnsupportedAppUsage
private Connection mConnectingServiceConnection;
private Connection mServiceConnection;
+ @UnsupportedAppUsage
private OnInitListener mInitListener;
// Written from an unspecified application thread, read from
// a binder thread.
@@ -686,6 +689,7 @@
private final Map<CharSequence, Uri> mUtterances;
private final Bundle mParams = new Bundle();
private final TtsEngines mEnginesHelper;
+ @UnsupportedAppUsage
private volatile String mCurrentEngine = null;
/**
@@ -1425,6 +1429,7 @@
* @return the engine currently in use by this TextToSpeech instance.
* @hide
*/
+ @UnsupportedAppUsage
public String getCurrentEngine() {
return mCurrentEngine;
}
diff --git a/core/java/android/speech/tts/TtsEngines.java b/core/java/android/speech/tts/TtsEngines.java
index a8c3453..a7b280b 100644
--- a/core/java/android/speech/tts/TtsEngines.java
+++ b/core/java/android/speech/tts/TtsEngines.java
@@ -30,6 +30,7 @@
import static android.provider.Settings.Secure.getString;
+import android.annotation.UnsupportedAppUsage;
import android.provider.Settings;
import android.speech.tts.TextToSpeech.Engine;
import android.speech.tts.TextToSpeech.EngineInfo;
@@ -101,6 +102,7 @@
sNormalizeCountry = Collections.unmodifiableMap(normalizeCountry);
}
+ @UnsupportedAppUsage
public TtsEngines(Context ctx) {
mContext = ctx;
}
@@ -155,6 +157,7 @@
*
* @return A list of engine info objects. The list can be empty, but never {@code null}.
*/
+ @UnsupportedAppUsage
public List<EngineInfo> getEngines() {
PackageManager pm = mContext.getPackageManager();
Intent intent = new Intent(Engine.INTENT_ACTION_TTS_SERVICE);
@@ -194,6 +197,7 @@
/**
* @return an intent that can launch the settings activity for a given tts engine.
*/
+ @UnsupportedAppUsage
public Intent getSettingsIntent(String engine) {
PackageManager pm = mContext.getPackageManager();
Intent intent = new Intent(Engine.INTENT_ACTION_TTS_SERVICE);
@@ -327,6 +331,7 @@
* @param engineName the engine to return the locale for.
* @return the locale preference for this engine. Will be non null.
*/
+ @UnsupportedAppUsage
public Locale getLocalePrefForEngine(String engineName) {
return getLocalePrefForEngine(engineName,
getString(mContext.getContentResolver(), Settings.Secure.TTS_DEFAULT_LOCALE));
@@ -376,6 +381,7 @@
* country codes ({@link Locale#getISO3Language()} and {@link Locale#getISO3Country()}),
* if it fails to do so, we return null.
*/
+ @UnsupportedAppUsage
public Locale parseLocaleString(String localeString) {
String language = "", country = "", variant = "";
if (!TextUtils.isEmpty(localeString)) {
@@ -436,6 +442,7 @@
* This method tries to convert three-letter language and country codes into their two-letter
* equivalents. If it fails to do so, it keeps the value from the TTS locale.
*/
+ @UnsupportedAppUsage
public static Locale normalizeTTSLocale(Locale ttsLocale) {
String language = ttsLocale.getLanguage();
if (!TextUtils.isEmpty(language)) {
@@ -514,6 +521,7 @@
* the passed locale is null, an empty string will be serialized; that empty string, when
* read back, will evaluate to {@link Locale#getDefault()}.
*/
+ @UnsupportedAppUsage
public synchronized void updateLocalePrefForEngine(String engineName, Locale newLocale) {
final String prefList = Settings.Secure.getString(mContext.getContentResolver(),
Settings.Secure.TTS_DEFAULT_LOCALE);
diff --git a/core/java/android/text/StaticLayout.java b/core/java/android/text/StaticLayout.java
index 6dad238..cc2869f 100644
--- a/core/java/android/text/StaticLayout.java
+++ b/core/java/android/text/StaticLayout.java
@@ -313,10 +313,17 @@
/**
* Set break strategy, useful for selecting high quality or balanced paragraph
* layout options. The default is {@link Layout#BREAK_STRATEGY_SIMPLE}.
+ * <p/>
+ * Enabling hyphenation with either using {@link Layout#HYPHENATION_FREQUENCY_NORMAL} or
+ * {@link Layout#HYPHENATION_FREQUENCY_FULL} while line breaking is set to one of
+ * {@link Layout#BREAK_STRATEGY_BALANCED}, {@link Layout#BREAK_STRATEGY_HIGH_QUALITY}
+ * improves the structure of text layout however has performance impact and requires more
+ * time to do the text layout.
*
* @param breakStrategy break strategy for paragraph layout
* @return this builder, useful for chaining
* @see android.widget.TextView#setBreakStrategy
+ * @see #setHyphenationFrequency(int)
*/
@NonNull
public Builder setBreakStrategy(@BreakStrategy int breakStrategy) {
@@ -329,10 +336,17 @@
* possible values are defined in {@link Layout}, by constants named with the pattern
* {@code HYPHENATION_FREQUENCY_*}. The default is
* {@link Layout#HYPHENATION_FREQUENCY_NONE}.
+ * <p/>
+ * Enabling hyphenation with either using {@link Layout#HYPHENATION_FREQUENCY_NORMAL} or
+ * {@link Layout#HYPHENATION_FREQUENCY_FULL} while line breaking is set to one of
+ * {@link Layout#BREAK_STRATEGY_BALANCED}, {@link Layout#BREAK_STRATEGY_HIGH_QUALITY}
+ * improves the structure of text layout however has performance impact and requires more
+ * time to do the text layout.
*
* @param hyphenationFrequency hyphenation frequency for the paragraph
* @return this builder, useful for chaining
* @see android.widget.TextView#setHyphenationFrequency
+ * @see #setBreakStrategy(int)
*/
@NonNull
public Builder setHyphenationFrequency(@HyphenationFrequency int hyphenationFrequency) {
diff --git a/core/java/android/view/KeyEvent.java b/core/java/android/view/KeyEvent.java
index 2c00391..0115d26 100644
--- a/core/java/android/view/KeyEvent.java
+++ b/core/java/android/view/KeyEvent.java
@@ -2920,6 +2920,9 @@
* such as "KEYCODE_A", "KEYCODE_DPAD_UP", or an equivalent numeric constant
* such as "1001" if unknown.
*
+ * This function is intended to be used mostly for debugging, logging, and testing. It is not
+ * locale-specific and is not intended to be used in a user-facing manner.
+ *
* @param keyCode The key code.
* @return The symbolic name of the specified keycode.
*
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index ea54696..5cadbe4 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -4106,9 +4106,16 @@
* TextView is {@link Layout#BREAK_STRATEGY_HIGH_QUALITY}, and the default value for
* EditText is {@link Layout#BREAK_STRATEGY_SIMPLE}, the latter to avoid the
* text "dancing" when being edited.
+ * <p/>
+ * Enabling hyphenation with either using {@link Layout#HYPHENATION_FREQUENCY_NORMAL} or
+ * {@link Layout#HYPHENATION_FREQUENCY_FULL} while line breaking is set to one of
+ * {@link Layout#BREAK_STRATEGY_BALANCED}, {@link Layout#BREAK_STRATEGY_HIGH_QUALITY}
+ * improves the structure of text layout however has performance impact and requires more time
+ * to do the text layout.
*
* @attr ref android.R.styleable#TextView_breakStrategy
* @see #getBreakStrategy()
+ * @see #setHyphenationFrequency(int)
*/
public void setBreakStrategy(@Layout.BreakStrategy int breakStrategy) {
mBreakStrategy = breakStrategy;
@@ -4134,12 +4141,26 @@
/**
* Sets the frequency of automatic hyphenation to use when determining word breaks.
* The default value for both TextView and {@link EditText} is
- * {@link Layout#HYPHENATION_FREQUENCY_NORMAL}.
- * Note that the default hyphenation frequency value is set from the theme.
+ * {@link Layout#HYPHENATION_FREQUENCY_NONE}. Note that the default hyphenation frequency value
+ * is set from the theme.
+ * <p/>
+ * Enabling hyphenation with either using {@link Layout#HYPHENATION_FREQUENCY_NORMAL} or
+ * {@link Layout#HYPHENATION_FREQUENCY_FULL} while line breaking is set to one of
+ * {@link Layout#BREAK_STRATEGY_BALANCED}, {@link Layout#BREAK_STRATEGY_HIGH_QUALITY}
+ * improves the structure of text layout however has performance impact and requires more time
+ * to do the text layout.
+ * <p/>
+ * Note: Before Android Q, in the theme hyphenation frequency is set to
+ * {@link Layout#HYPHENATION_FREQUENCY_NORMAL}. The default value is changed into
+ * {@link Layout#HYPHENATION_FREQUENCY_NONE} on Q.
*
- * @param hyphenationFrequency The hyphenation frequency to use.
+ * @param hyphenationFrequency the hyphenation frequency to use, one of
+ * {@link Layout#HYPHENATION_FREQUENCY_NONE},
+ * {@link Layout#HYPHENATION_FREQUENCY_NORMAL},
+ * {@link Layout#HYPHENATION_FREQUENCY_FULL}
* @attr ref android.R.styleable#TextView_hyphenationFrequency
* @see #getHyphenationFrequency()
+ * @see #getBreakStrategy()
*/
public void setHyphenationFrequency(@Layout.HyphenationFrequency int hyphenationFrequency) {
mHyphenationFrequency = hyphenationFrequency;
diff --git a/core/java/com/android/internal/app/IntentForwarderActivity.java b/core/java/com/android/internal/app/IntentForwarderActivity.java
index abb9321..ae9c5c4 100644
--- a/core/java/com/android/internal/app/IntentForwarderActivity.java
+++ b/core/java/com/android/internal/app/IntentForwarderActivity.java
@@ -16,6 +16,10 @@
package com.android.internal.app;
+import static android.content.pm.PackageManager.MATCH_DEFAULT_ONLY;
+
+import android.annotation.Nullable;
+import android.annotation.StringRes;
import android.app.Activity;
import android.app.ActivityManager;
import android.app.ActivityTaskManager;
@@ -23,8 +27,11 @@
import android.app.AppGlobals;
import android.app.admin.DevicePolicyManager;
import android.content.Intent;
+import android.content.pm.ActivityInfo;
+import android.content.pm.ApplicationInfo;
import android.content.pm.IPackageManager;
import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
import android.content.pm.UserInfo;
import android.os.Bundle;
import android.os.RemoteException;
@@ -32,12 +39,11 @@
import android.os.UserManager;
import android.util.Slog;
import android.widget.Toast;
-
import com.android.internal.annotations.VisibleForTesting;
-
+import java.util.Arrays;
+import java.util.HashSet;
import java.util.List;
-
-import static android.content.pm.PackageManager.MATCH_DEFAULT_ONLY;
+import java.util.Set;
/**
* This is used in conjunction with
@@ -45,7 +51,6 @@
* be passed in and out of a managed profile.
*/
public class IntentForwarderActivity extends Activity {
-
public static String TAG = "IntentForwarderActivity";
public static String FORWARD_INTENT_TO_PARENT
@@ -54,6 +59,9 @@
public static String FORWARD_INTENT_TO_MANAGED_PROFILE
= "com.android.internal.app.ForwardIntentToManagedProfile";
+ private static final Set<String> ALLOWED_TEXT_MESSAGE_SCHEME
+ = new HashSet<>(Arrays.asList("sms", "smsto", "mms", "mmsto"));
+
private Injector mInjector;
@Override
@@ -94,19 +102,8 @@
newIntent.prepareToLeaveUser(callingUserId);
}
- final android.content.pm.ResolveInfo ri =
- mInjector.getPackageManager().resolveActivityAsUser(
- newIntent,
- MATCH_DEFAULT_ONLY,
- targetUserId);
-
- // Don't show the disclosure if next activity is ResolverActivity or ChooserActivity
- // as those will already have shown work / personal as neccesary etc.
- final boolean shouldShowDisclosure = ri == null || ri.activityInfo == null ||
- !"android".equals(ri.activityInfo.packageName) ||
- !(ResolverActivity.class.getName().equals(ri.activityInfo.name)
- || ChooserActivity.class.getName().equals(ri.activityInfo.name));
-
+ final ResolveInfo ri = mInjector.resolveActivityAsUser(newIntent, MATCH_DEFAULT_ONLY,
+ targetUserId);
try {
startActivityAsCaller(newIntent, null, false, targetUserId);
} catch (RuntimeException e) {
@@ -125,8 +122,8 @@
+ ActivityThread.currentProcessName(), e);
}
- if (shouldShowDisclosure) {
- Toast.makeText(this, getString(userMessageId), Toast.LENGTH_LONG).show();
+ if (shouldShowDisclosure(ri, intentReceived)) {
+ mInjector.showToast(userMessageId, Toast.LENGTH_LONG);
}
} else {
Slog.wtf(TAG, "the intent: " + intentReceived + " cannot be forwarded from user "
@@ -135,6 +132,35 @@
finish();
}
+ private boolean shouldShowDisclosure(@Nullable ResolveInfo ri, Intent intent) {
+ if (ri == null || ri.activityInfo == null) {
+ return true;
+ }
+ if (ri.activityInfo.applicationInfo.isSystemApp()
+ && (isDialerIntent(intent) || isTextMessageIntent(intent))) {
+ return false;
+ }
+ return !isTargetResolverOrChooserActivity(ri.activityInfo);
+ }
+
+ private boolean isTextMessageIntent(Intent intent) {
+ return Intent.ACTION_SENDTO.equals(intent.getAction()) && intent.getData() != null
+ && ALLOWED_TEXT_MESSAGE_SCHEME.contains(intent.getData().getScheme());
+ }
+
+ private boolean isDialerIntent(Intent intent) {
+ return Intent.ACTION_DIAL.equals(intent.getAction())
+ || Intent.ACTION_CALL.equals(intent.getAction());
+ }
+
+ private boolean isTargetResolverOrChooserActivity(ActivityInfo activityInfo) {
+ if (!"android".equals(activityInfo.packageName)) {
+ return false;
+ }
+ return ResolverActivity.class.getName().equals(activityInfo.name)
+ || ChooserActivity.class.getName().equals(activityInfo.name);
+ }
+
/**
* Check whether the intent can be forwarded to target user. Return the intent used for
* forwarding if it can be forwarded, {@code null} otherwise.
@@ -242,6 +268,16 @@
public PackageManager getPackageManager() {
return IntentForwarderActivity.this.getPackageManager();
}
+
+ @Override
+ public ResolveInfo resolveActivityAsUser(Intent intent, int flags, int userId) {
+ return getPackageManager().resolveActivityAsUser(intent, flags, userId);
+ }
+
+ @Override
+ public void showToast(int messageId, int duration) {
+ Toast.makeText(IntentForwarderActivity.this, getString(messageId), duration).show();
+ }
}
public interface Injector {
@@ -250,5 +286,9 @@
UserManager getUserManager();
PackageManager getPackageManager();
+
+ ResolveInfo resolveActivityAsUser(Intent intent, int flags, int userId);
+
+ void showToast(@StringRes int messageId, int duration);
}
}
diff --git a/core/java/com/android/internal/net/OWNERS b/core/java/com/android/internal/net/OWNERS
index ef44ef7..050cb5c 100644
--- a/core/java/com/android/internal/net/OWNERS
+++ b/core/java/com/android/internal/net/OWNERS
@@ -1,7 +1,9 @@
set noparent
+codewiz@google.com
ek@google.com
jchalard@google.com
jsharkey@android.com
lorenzo@google.com
+reminv@google.com
satk@google.com
diff --git a/core/java/com/android/internal/net/VpnConfig.java b/core/java/com/android/internal/net/VpnConfig.java
index 921f1fe..5ce5bcd 100644
--- a/core/java/com/android/internal/net/VpnConfig.java
+++ b/core/java/com/android/internal/net/VpnConfig.java
@@ -35,6 +35,7 @@
import java.net.Inet4Address;
import java.net.InetAddress;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;
/**
@@ -195,4 +196,37 @@
return new VpnConfig[size];
}
};
+
+ @Override
+ public String toString() {
+ return new StringBuilder()
+ .append("VpnConfig")
+ .append("{ user=").append(user)
+ .append(", interface=").append(interfaze)
+ .append(", session=").append(session)
+ .append(", mtu=").append(mtu)
+ .append(", addresses=").append(toString(addresses))
+ .append(", routes=").append(toString(routes))
+ .append(", dns=").append(toString(dnsServers))
+ .append(", searchDomains=").append(toString(searchDomains))
+ .append(", allowedApps=").append(toString(allowedApplications))
+ .append(", disallowedApps=").append(toString(disallowedApplications))
+ .append(", configureIntent=").append(configureIntent)
+ .append(", startTime=").append(startTime)
+ .append(", legacy=").append(legacy)
+ .append(", blocking=").append(blocking)
+ .append(", allowBypass=").append(allowBypass)
+ .append(", allowIPv4=").append(allowIPv4)
+ .append(", allowIPv6=").append(allowIPv6)
+ .append(", underlyingNetworks=").append(Arrays.toString(underlyingNetworks))
+ .append("}")
+ .toString();
+ }
+
+ static <T> String toString(List<T> ls) {
+ if (ls == null) {
+ return "null";
+ }
+ return Arrays.toString(ls.toArray());
+ }
}
diff --git a/core/java/com/android/internal/os/BatteryStatsHelper.java b/core/java/com/android/internal/os/BatteryStatsHelper.java
index a6b29c5..061011b 100644
--- a/core/java/com/android/internal/os/BatteryStatsHelper.java
+++ b/core/java/com/android/internal/os/BatteryStatsHelper.java
@@ -31,6 +31,7 @@
import android.os.ParcelFileDescriptor;
import android.os.Process;
import android.os.RemoteException;
+import android.os.SELinux;
import android.os.ServiceManager;
import android.os.SystemClock;
import android.os.UserHandle;
@@ -1031,6 +1032,10 @@
try {
ParcelFileDescriptor pfd = service.getStatisticsStream();
if (pfd != null) {
+ if (false) {
+ Log.d(TAG, "selinux context: "
+ + SELinux.getFileContext(pfd.getFileDescriptor()));
+ }
try (FileInputStream fis = new ParcelFileDescriptor.AutoCloseInputStream(pfd)) {
byte[] data = readFully(fis, MemoryFile.getSize(pfd.getFileDescriptor()));
Parcel parcel = Parcel.obtain();
diff --git a/core/java/com/android/internal/os/BatteryStatsImpl.java b/core/java/com/android/internal/os/BatteryStatsImpl.java
index bc0d51f..f314872 100644
--- a/core/java/com/android/internal/os/BatteryStatsImpl.java
+++ b/core/java/com/android/internal/os/BatteryStatsImpl.java
@@ -1064,9 +1064,9 @@
/**
* Reset the observer's state, returns true if the timer/counter is inactive
- * so can be completely dropped.
+ * so it can be destroyed.
* @param detachIfReset detach if true, no-op if false.
- * @return Returns true if the timer/counter is inactive.
+ * @return Returns true if the timer/counter is inactive and can be destroyed.
*/
boolean reset(boolean detachIfReset);
/**
@@ -1128,11 +1128,7 @@
* If false, use ArrayList for mObservers list.
*/
public TimeBase(boolean isLongList) {
- if (isLongList) {
- mObservers = new HashSet<TimeBaseObs>();
- } else {
- mObservers = new ArrayList<TimeBaseObs>();
- }
+ mObservers = isLongList ? new HashSet<>() : new ArrayList<>();
}
public TimeBase() {
@@ -1229,11 +1225,6 @@
return mRunning;
}
- /**
- * Normally we do not use Iterator in framework code to avoid alloc/dealloc
- * Iterator object, here is an exception because mObservers' type is Collection
- * instead of list.
- */
public boolean setRunning(boolean running, long uptime, long realtime) {
if (mRunning != running) {
mRunning = running;
@@ -1242,6 +1233,9 @@
mRealtimeStart = realtime;
long batteryUptime = mUnpluggedUptime = getUptime(uptime);
long batteryRealtime = mUnpluggedRealtime = getRealtime(realtime);
+ // Normally we do not use Iterator in framework code to avoid alloc/dealloc
+ // Iterator object, here is an exception because mObservers' type is Collection
+ // instead of list.
final Iterator<TimeBaseObs> iter = mObservers.iterator();
while (iter.hasNext()) {
iter.next().onTimeStarted(realtime, batteryUptime, batteryRealtime);
@@ -1251,6 +1245,9 @@
mPastRealtime += realtime - mRealtimeStart;
long batteryUptime = getUptime(uptime);
long batteryRealtime = getRealtime(realtime);
+ // Normally we do not use Iterator in framework code to avoid alloc/dealloc
+ // Iterator object, here is an exception because mObservers' type is Collection
+ // instead of list.
final Iterator<TimeBaseObs> iter = mObservers.iterator();
while (iter.hasNext()) {
iter.next().onTimeStopped(realtime, batteryUptime, batteryRealtime);
@@ -6624,8 +6621,8 @@
return true;
}
-
- private static boolean resetIfNotNull(ControllerActivityCounterImpl counter, boolean detachIfReset) {
+ private static boolean resetIfNotNull(ControllerActivityCounterImpl counter,
+ boolean detachIfReset) {
if (counter != null) {
counter.reset(detachIfReset);
}
@@ -6981,6 +6978,7 @@
}
if (mProcStateTimeMs[procState] == null
|| mProcStateTimeMs[procState].getSize() != cpuTimesMs.length) {
+ detachIfNotNull(mProcStateTimeMs[procState]);
mProcStateTimeMs[procState] = new LongSamplingCounterArray(
mBsi.mOnBatteryTimeBase);
}
@@ -7675,6 +7673,7 @@
void initUserActivityLocked() {
+ detachIfNotNull(mUserActivityCounters);
mUserActivityCounters = new Counter[NUM_USER_ACTIVITY_TYPES];
for (int i=0; i<NUM_USER_ACTIVITY_TYPES; i++) {
mUserActivityCounters[i] = new Counter(mBsi.mOnBatteryTimeBase);
@@ -9887,7 +9886,6 @@
}
t = new DualTimer(mBsi.mClocks, this, BatteryStats.SENSOR, timers,
mBsi.mOnBatteryTimeBase, mOnBatteryBackgroundTimeBase);
- detachIfNotNull(se.mTimer);
se.mTimer = t;
return t;
}
@@ -14187,8 +14185,8 @@
}
for (int ip = 0; ip < NP; ip++) {
String pkgName = in.readString();
+ detachIfNotNull(u.mPackageStats.get(pkgName));
Uid.Pkg p = u.getPackageStatsLocked(pkgName);
- p.detach();
final int NWA = in.readInt();
if (NWA > 10000) {
throw new ParcelFormatException("File corrupt: too many wakeup alarms " + NWA);
diff --git a/core/java/com/android/internal/os/BinderCallsStats.java b/core/java/com/android/internal/os/BinderCallsStats.java
index eb369e1..4aa30f6 100644
--- a/core/java/com/android/internal/os/BinderCallsStats.java
+++ b/core/java/com/android/internal/os/BinderCallsStats.java
@@ -37,7 +37,6 @@
import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.os.BinderInternal.CallSession;
-import com.android.internal.util.Preconditions;
import com.android.server.LocalServices;
import java.io.PrintWriter;
@@ -45,15 +44,12 @@
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collection;
-import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.Queue;
import java.util.Random;
-import java.util.Set;
import java.util.concurrent.ConcurrentLinkedQueue;
-import java.util.function.Function;
import java.util.function.ToDoubleFunction;
/**
@@ -63,7 +59,7 @@
public class BinderCallsStats implements BinderInternal.Observer {
public static final boolean ENABLED_DEFAULT = false;
public static final boolean DETAILED_TRACKING_DEFAULT = true;
- public static final int PERIODIC_SAMPLING_INTERVAL_DEFAULT = 10;
+ public static final int PERIODIC_SAMPLING_INTERVAL_DEFAULT = 100;
private static final String TAG = "BinderCallsStats";
private static final int CALL_SESSIONS_POOL_SIZE = 100;
@@ -71,7 +67,10 @@
private static final int MAX_EXCEPTION_COUNT_SIZE = 50;
private static final String EXCEPTION_COUNT_OVERFLOW_NAME = "overflow";
+ // Whether to collect all the data: cpu + exceptions + reply/request sizes.
private boolean mDetailedTracking = DETAILED_TRACKING_DEFAULT;
+ // Sampling period to control how often to track CPU usage. 1 means all calls, 100 means ~1 out
+ // of 100 requests.
private int mPeriodicSamplingInterval = PERIODIC_SAMPLING_INTERVAL_DEFAULT;
@GuardedBy("mLock")
private final SparseArray<UidEntry> mUidEntries = new SparseArray<>();
@@ -181,7 +180,7 @@
s.exceptionThrown = false;
s.cpuTimeStarted = -1;
s.timeStarted = -1;
- if (mDetailedTracking || shouldRecordDetailedData()) {
+ if (shouldRecordDetailedData()) {
s.cpuTimeStarted = getThreadTimeMicro();
s.timeStarted = getElapsedRealtimeMicro();
}
@@ -228,14 +227,14 @@
final UidEntry uidEntry = getUidEntry(callingUid);
uidEntry.callCount++;
- final CallStat callStat = uidEntry.getOrCreate(
- s.binderClass, s.transactionCode, mScreenInteractive);
- callStat.callCount++;
if (recordCall) {
uidEntry.cpuTimeMicros += duration;
uidEntry.recordedCallCount++;
+ final CallStat callStat = uidEntry.getOrCreate(
+ s.binderClass, s.transactionCode, mScreenInteractive);
+ callStat.callCount++;
callStat.recordedCallCount++;
callStat.cpuTimeMicros += duration;
callStat.maxCpuTimeMicros = Math.max(callStat.maxCpuTimeMicros, duration);
@@ -249,6 +248,14 @@
callStat.maxReplySizeBytes =
Math.max(callStat.maxReplySizeBytes, parcelReplySize);
}
+ } else {
+ // Only record the total call count if we already track data for this key.
+ // It helps to keep the memory usage down when sampling is enabled.
+ final CallStat callStat = uidEntry.get(
+ s.binderClass, s.transactionCode, mScreenInteractive);
+ if (callStat != null) {
+ callStat.callCount++;
+ }
}
}
}
@@ -463,7 +470,7 @@
pw.println(String.format(" %6d %s", entry.second, entry.first));
}
- if (!mDetailedTracking && mPeriodicSamplingInterval != 1) {
+ if (mPeriodicSamplingInterval != 1) {
pw.println("");
pw.println("/!\\ Displayed data is sampled. See sampling interval at the top.");
}
@@ -492,6 +499,9 @@
return mRandom.nextInt() % mPeriodicSamplingInterval == 0;
}
+ /**
+ * Sets to true to collect all the data.
+ */
public void setDetailedTracking(boolean enabled) {
synchronized (mLock) {
if (enabled != mDetailedTracking) {
@@ -550,7 +560,8 @@
// Number of calls for which we collected data for. We do not record data for all the calls
// when sampling is on.
public long recordedCallCount;
- // Real number of total calls.
+ // Roughly the real number of total calls. We only track only track the API call count once
+ // at least one non-sampled count happened.
public long callCount;
// Total CPU of all for all the recorded calls.
// Approximate total CPU usage can be computed by
@@ -624,13 +635,19 @@
private Map<CallStatKey, CallStat> mCallStats = new ArrayMap<>();
private CallStatKey mTempKey = new CallStatKey();
- CallStat getOrCreate(Class<? extends Binder> binderClass, int transactionCode,
+ @Nullable
+ CallStat get(Class<? extends Binder> binderClass, int transactionCode,
boolean screenInteractive) {
// Use a global temporary key to avoid creating new objects for every lookup.
mTempKey.binderClass = binderClass;
mTempKey.transactionCode = transactionCode;
mTempKey.screenInteractive = screenInteractive;
- CallStat mapCallStat = mCallStats.get(mTempKey);
+ return mCallStats.get(mTempKey);
+ }
+
+ CallStat getOrCreate(Class<? extends Binder> binderClass, int transactionCode,
+ boolean screenInteractive) {
+ CallStat mapCallStat = get(binderClass, transactionCode, screenInteractive);
// Only create CallStat if it's a new entry, otherwise update existing instance
if (mapCallStat == null) {
mapCallStat = new CallStat(binderClass, transactionCode, screenInteractive);
diff --git a/core/java/com/android/server/net/OWNERS b/core/java/com/android/server/net/OWNERS
index ce50558..7311eee 100644
--- a/core/java/com/android/server/net/OWNERS
+++ b/core/java/com/android/server/net/OWNERS
@@ -1,6 +1,8 @@
set noparent
+codewiz@google.com
ek@google.com
jchalard@google.com
lorenzo@google.com
+reminv@google.com
satk@google.com
diff --git a/core/jni/android/graphics/Bitmap.cpp b/core/jni/android/graphics/Bitmap.cpp
index e5aea97..02076bd 100755
--- a/core/jni/android/graphics/Bitmap.cpp
+++ b/core/jni/android/graphics/Bitmap.cpp
@@ -437,6 +437,10 @@
return NULL;
}
+static bool IsColorSpaceSRGB(SkColorSpace* colorSpace) {
+ return colorSpace == nullptr || colorSpace->isSRGB();
+}
+
bool GraphicsJNI::SetPixels(JNIEnv* env, jintArray srcColors, int srcOffset, int srcStride,
int x, int y, int width, int height, const SkBitmap& dstBitmap) {
void* dst = dstBitmap.getPixels();
@@ -453,8 +457,7 @@
dst = dstBitmap.getAddr(x, y);
SkColorSpace* colorSpace = dstBitmap.colorSpace();
- if (dstBitmap.colorType() == kRGBA_F16_SkColorType ||
- GraphicsJNI::isColorSpaceSRGB(colorSpace)) {
+ if (dstBitmap.colorType() == kRGBA_F16_SkColorType || IsColorSpaceSRGB(colorSpace)) {
// now copy/convert each scanline
for (int y = 0; y < height; y++) {
proc(dst, src, width, x, y);
@@ -673,8 +676,8 @@
SkBitmap bitmap;
sk_sp<SkColorSpace> colorSpace;
- if (colorType != kN32_SkColorType || xyzD50 == nullptr || transferParameters == nullptr) {
- colorSpace = GraphicsJNI::colorSpaceForType(colorType);
+ if (xyzD50 == nullptr || transferParameters == nullptr) {
+ colorSpace = SkColorSpace::MakeSRGB();
} else {
SkColorSpaceTransferFn p = GraphicsJNI::getNativeTransferParameters(env, transferParameters);
SkMatrix44 xyzMatrix = GraphicsJNI::getNativeXYZMatrix(env, xyzD50);
@@ -1268,7 +1271,7 @@
if (!bitmapHolder.valid()) return JNI_TRUE;
SkColorSpace* colorSpace = bitmapHolder->info().colorSpace();
- return GraphicsJNI::isColorSpaceSRGB(colorSpace);
+ return IsColorSpaceSRGB(colorSpace);
}
static jboolean Bitmap_isSRGBLinear(JNIEnv* env, jobject, jlong bitmapHandle) {
@@ -1340,8 +1343,7 @@
proc(dst, src, 1);
SkColorSpace* colorSpace = bitmap.colorSpace();
- if (bitmap.colorType() != kRGBA_F16_SkColorType &&
- !GraphicsJNI::isColorSpaceSRGB(colorSpace)) {
+ if (bitmap.colorType() != kRGBA_F16_SkColorType && !IsColorSpaceSRGB(colorSpace)) {
auto sRGB = SkColorSpace::MakeSRGB();
auto xform = SkColorSpaceXform::New(colorSpace, sRGB.get());
xform->apply(SkColorSpaceXform::kBGRA_8888_ColorFormat, &dst[0],
@@ -1371,8 +1373,7 @@
SkColor* d = (SkColor*)dst + offset;
SkColorSpace* colorSpace = bitmap.colorSpace();
- if (bitmap.colorType() == kRGBA_F16_SkColorType ||
- GraphicsJNI::isColorSpaceSRGB(colorSpace)) {
+ if (bitmap.colorType() == kRGBA_F16_SkColorType || IsColorSpaceSRGB(colorSpace)) {
while (--height >= 0) {
proc(d, src, width);
d += stride;
@@ -1414,8 +1415,7 @@
}
SkColorSpace* colorSpace = bitmap.colorSpace();
- if (bitmap.colorType() != kRGBA_F16_SkColorType &&
- !GraphicsJNI::isColorSpaceSRGB(colorSpace)) {
+ if (bitmap.colorType() != kRGBA_F16_SkColorType && !IsColorSpaceSRGB(colorSpace)) {
auto sRGB = SkColorSpace::MakeSRGB();
auto xform = SkColorSpaceXform::New(sRGB.get(), colorSpace);
xform->apply(SkColorSpaceXform::kBGRA_8888_ColorFormat, &color,
diff --git a/core/jni/android/graphics/BitmapFactory.cpp b/core/jni/android/graphics/BitmapFactory.cpp
index 685fcaf..9ae05f4 100644
--- a/core/jni/android/graphics/BitmapFactory.cpp
+++ b/core/jni/android/graphics/BitmapFactory.cpp
@@ -360,7 +360,7 @@
// use the default.
SkImageInfo bitmapInfo = decodeInfo;
if (decodeInfo.colorSpace() && decodeInfo.colorSpace()->isSRGB()) {
- bitmapInfo = bitmapInfo.makeColorSpace(GraphicsJNI::colorSpaceForType(decodeColorType));
+ bitmapInfo = bitmapInfo.makeColorSpace(decodeInfo.refColorSpace());
}
if (decodeColorType == kGray_8_SkColorType) {
diff --git a/core/jni/android/graphics/GraphicBuffer.cpp b/core/jni/android/graphics/GraphicBuffer.cpp
index ae6fd38..344e22c 100644
--- a/core/jni/android/graphics/GraphicBuffer.cpp
+++ b/core/jni/android/graphics/GraphicBuffer.cpp
@@ -196,8 +196,7 @@
SkBitmap bitmap;
bitmap.setInfo(SkImageInfo::Make(buffer->getWidth(), buffer->getHeight(),
convertPixelFormat(buffer->getPixelFormat()),
- kPremul_SkAlphaType,
- GraphicsJNI::defaultColorSpace()),
+ kPremul_SkAlphaType),
bytesCount);
if (buffer->getWidth() > 0 && buffer->getHeight() > 0) {
diff --git a/core/jni/android/graphics/Graphics.cpp b/core/jni/android/graphics/Graphics.cpp
index 5d65aee..26af15e 100644
--- a/core/jni/android/graphics/Graphics.cpp
+++ b/core/jni/android/graphics/Graphics.cpp
@@ -454,31 +454,6 @@
return wrapper;
}
-sk_sp<SkColorSpace> GraphicsJNI::defaultColorSpace() {
-#ifdef ANDROID_ENABLE_LINEAR_BLENDING
- return SkColorSpace::MakeSRGB();
-#else
- return nullptr;
-#endif
-}
-
-sk_sp<SkColorSpace> GraphicsJNI::linearColorSpace() {
- return SkColorSpace::MakeSRGBLinear();
-}
-
-sk_sp<SkColorSpace> GraphicsJNI::colorSpaceForType(SkColorType type) {
- switch (type) {
- case kRGBA_F16_SkColorType:
- return linearColorSpace();
- default:
- return defaultColorSpace();
- }
-}
-
-bool GraphicsJNI::isColorSpaceSRGB(SkColorSpace* colorSpace) {
- return colorSpace == nullptr || colorSpace->isSRGB();
-}
-
SkColorSpaceTransferFn GraphicsJNI::getNativeTransferParameters(JNIEnv* env, jobject transferParams) {
SkColorSpaceTransferFn p;
p.fA = (float) env->GetDoubleField(transferParams, gTransferParams_aFieldID);
diff --git a/core/jni/android/graphics/GraphicsJNI.h b/core/jni/android/graphics/GraphicsJNI.h
index 7825f1d..9d85cc2 100644
--- a/core/jni/android/graphics/GraphicsJNI.h
+++ b/core/jni/android/graphics/GraphicsJNI.h
@@ -104,11 +104,6 @@
int srcStride, int x, int y, int width, int height,
const SkBitmap& dstBitmap);
- static sk_sp<SkColorSpace> defaultColorSpace();
- static sk_sp<SkColorSpace> linearColorSpace();
- static sk_sp<SkColorSpace> colorSpaceForType(SkColorType type);
- static bool isColorSpaceSRGB(SkColorSpace* colorSpace);
-
static SkColorSpaceTransferFn getNativeTransferParameters(JNIEnv* env, jobject transferParams);
static SkMatrix44 getNativeXYZMatrix(JNIEnv* env, jfloatArray xyzD50);
static sk_sp<SkColorSpace> getNativeColorSpace(JNIEnv* env, jobject colorSpace);
diff --git a/core/jni/android_os_HwBinder.cpp b/core/jni/android_os_HwBinder.cpp
index 08d9527..163b86b 100644
--- a/core/jni/android_os_HwBinder.cpp
+++ b/core/jni/android_os_HwBinder.cpp
@@ -33,6 +33,7 @@
#include <hidl/ServiceManagement.h>
#include <hidl/Status.h>
#include <hidl/HidlTransportSupport.h>
+#include <hwbinder/IPCThreadState.h>
#include <hwbinder/ProcessState.h>
#include <nativehelper/ScopedLocalRef.h>
#include <nativehelper/ScopedUtfChars.h>
diff --git a/core/jni/android_os_SELinux.cpp b/core/jni/android_os_SELinux.cpp
index 6778b29..8cb1078 100644
--- a/core/jni/android_os_SELinux.cpp
+++ b/core/jni/android_os_SELinux.cpp
@@ -60,6 +60,41 @@
return (security_getenforce() == 1) ? true : false;
}
+static jstring getFdConInner(JNIEnv *env, jobject fileDescriptor, bool isSocket) {
+ if (isSELinuxDisabled) {
+ return NULL;
+ }
+
+ if (fileDescriptor == NULL) {
+ jniThrowNullPointerException(env,
+ "Trying to check security context of a null FileDescriptor.");
+ return NULL;
+ }
+
+ int fd = jniGetFDFromFileDescriptor(env, fileDescriptor);
+ if (env->ExceptionCheck()) {
+ ALOGE("getFdCon => getFD for %p failed", fileDescriptor);
+ return NULL;
+ }
+
+ security_context_t tmp = NULL;
+ int ret;
+ if (isSocket) {
+ ret = getpeercon(fd, &tmp);
+ } else{
+ ret = fgetfilecon(fd, &tmp);
+ }
+ Unique_SecurityContext context(tmp);
+
+ ScopedLocalRef<jstring> contextStr(env, NULL);
+ if (ret != -1) {
+ contextStr.reset(env->NewStringUTF(context.get()));
+ }
+
+ ALOGV("getFdCon(%d) => %s", fd, context.get());
+ return contextStr.release();
+}
+
/*
* Function: getPeerCon
* Purpose: retrieves security context of peer socket
@@ -69,33 +104,19 @@
* Exceptions: NullPointerException if fileDescriptor object is NULL
*/
static jstring getPeerCon(JNIEnv *env, jobject, jobject fileDescriptor) {
- if (isSELinuxDisabled) {
- return NULL;
- }
+ return getFdConInner(env, fileDescriptor, true);
+}
- if (fileDescriptor == NULL) {
- jniThrowNullPointerException(env,
- "Trying to check security context of a null peer socket.");
- return NULL;
- }
-
- int fd = jniGetFDFromFileDescriptor(env, fileDescriptor);
- if (env->ExceptionCheck()) {
- ALOGE("getPeerCon => getFD for %p failed", fileDescriptor);
- return NULL;
- }
-
- security_context_t tmp = NULL;
- int ret = getpeercon(fd, &tmp);
- Unique_SecurityContext context(tmp);
-
- ScopedLocalRef<jstring> contextStr(env, NULL);
- if (ret != -1) {
- contextStr.reset(env->NewStringUTF(context.get()));
- }
-
- ALOGV("getPeerCon(%d) => %s", fd, context.get());
- return contextStr.release();
+/*
+ * Function: getFdCon
+ * Purpose: retrieves security context of a file descriptor.
+ * Parameters:
+ * fileDescriptor: a FileDescriptor object
+ * Returns: jstring representing the security_context of socket or NULL if error
+ * Exceptions: NullPointerException if fileDescriptor object is NULL
+ */
+static jstring getFdCon(JNIEnv *env, jobject, jobject fileDescriptor) {
+ return getFdConInner(env, fileDescriptor, false);
}
/*
@@ -326,6 +347,7 @@
{ "getContext" , "()Ljava/lang/String;" , (void*)getCon },
{ "getFileContext" , "(Ljava/lang/String;)Ljava/lang/String;" , (void*)getFileCon },
{ "getPeerContext" , "(Ljava/io/FileDescriptor;)Ljava/lang/String;" , (void*)getPeerCon },
+ { "getFileContext" , "(Ljava/io/FileDescriptor;)Ljava/lang/String;" , (void*)getFdCon },
{ "getPidContext" , "(I)Ljava/lang/String;" , (void*)getPidCon },
{ "isSELinuxEnforced" , "()Z" , (void*)isSELinuxEnforced},
{ "isSELinuxEnabled" , "()Z" , (void*)isSELinuxEnabled },
diff --git a/core/jni/android_view_Surface.cpp b/core/jni/android_view_Surface.cpp
index f70cf07..f512ce4 100644
--- a/core/jni/android_view_Surface.cpp
+++ b/core/jni/android_view_Surface.cpp
@@ -332,8 +332,7 @@
SkImageInfo info = SkImageInfo::Make(outBuffer.width, outBuffer.height,
convertPixelFormat(outBuffer.format),
outBuffer.format == PIXEL_FORMAT_RGBX_8888
- ? kOpaque_SkAlphaType : kPremul_SkAlphaType,
- GraphicsJNI::defaultColorSpace());
+ ? kOpaque_SkAlphaType : kPremul_SkAlphaType);
SkBitmap bitmap;
ssize_t bpr = outBuffer.stride * bytesPerPixel(outBuffer.format);
diff --git a/core/jni/android_view_TextureView.cpp b/core/jni/android_view_TextureView.cpp
index 2921b37..15319ad 100644
--- a/core/jni/android_view_TextureView.cpp
+++ b/core/jni/android_view_TextureView.cpp
@@ -94,8 +94,7 @@
default:
break;
}
- return SkImageInfo::Make(buffer.width, buffer.height, colorType, alphaType,
- GraphicsJNI::defaultColorSpace());
+ return SkImageInfo::Make(buffer.width, buffer.height, colorType, alphaType);
}
/**
diff --git a/core/jni/com_android_internal_os_Zygote.cpp b/core/jni/com_android_internal_os_Zygote.cpp
index 7380692..19691e2 100644
--- a/core/jni/com_android_internal_os_Zygote.cpp
+++ b/core/jni/com_android_internal_os_Zygote.cpp
@@ -386,7 +386,7 @@
// Create /mnt/user/0/package/<package-name>
userid_t user_id = multiuser_get_user_id(uid);
StringAppendF(&pkg_sandbox_dir, "/%d", user_id);
- if (fs_prepare_dir(pkg_sandbox_dir.c_str(), 0700, AID_ROOT, AID_ROOT) != 0) {
+ if (fs_prepare_dir(pkg_sandbox_dir.c_str(), 0751, AID_ROOT, AID_ROOT) != 0) {
*error_msg = CREATE_ERROR("fs_prepare_dir failed on %s", pkg_sandbox_dir.c_str());
return false;
}
diff --git a/core/proto/android/server/windowmanagerservice.proto b/core/proto/android/server/windowmanagerservice.proto
index b0ea5e0..3db7f9d 100644
--- a/core/proto/android/server/windowmanagerservice.proto
+++ b/core/proto/android/server/windowmanagerservice.proto
@@ -24,6 +24,7 @@
import "frameworks/base/core/proto/android/server/surfaceanimator.proto";
import "frameworks/base/core/proto/android/view/displaycutout.proto";
import "frameworks/base/core/proto/android/view/displayinfo.proto";
+import "frameworks/base/core/proto/android/view/enums.proto";
import "frameworks/base/core/proto/android/view/surface.proto";
import "frameworks/base/core/proto/android/view/windowlayoutparams.proto";
import "frameworks/base/libs/incident/proto/android/privacy.proto";
@@ -134,32 +135,8 @@
APP_STATE_TIMEOUT = 3;
}
optional AppState app_transition_state = 1;
- /* definitions for constants found in {@link com.android.server.wm.AppTransition} */
- enum TransitionType {
- TRANSIT_NONE = 0;
- TRANSIT_UNSET = -1;
- TRANSIT_ACTIVITY_OPEN = 6;
- TRANSIT_ACTIVITY_CLOSE = 7;
- TRANSIT_TASK_OPEN = 8;
- TRANSIT_TASK_CLOSE = 9;
- TRANSIT_TASK_TO_FRONT = 10;
- TRANSIT_TASK_TO_BACK = 11;
- TRANSIT_WALLPAPER_CLOSE = 12;
- TRANSIT_WALLPAPER_OPEN = 13;
- TRANSIT_WALLPAPER_INTRA_OPEN = 14;
- TRANSIT_WALLPAPER_INTRA_CLOSE = 15;
- TRANSIT_TASK_OPEN_BEHIND = 16;
- TRANSIT_TASK_IN_PLACE = 17;
- TRANSIT_ACTIVITY_RELAUNCH = 18;
- TRANSIT_DOCK_TASK_FROM_RECENTS = 19;
- TRANSIT_KEYGUARD_GOING_AWAY = 20;
- TRANSIT_KEYGUARD_GOING_AWAY_ON_WALLPAPER = 21;
- TRANSIT_KEYGUARD_OCCLUDE = 22;
- TRANSIT_KEYGUARD_UNOCCLUDE = 23;
- TRANSIT_TRANSLUCENT_ACTIVITY_OPEN = 24;
- TRANSIT_TRANSLUCENT_ACTIVITY_CLOSE = 25;
- }
- optional TransitionType last_used_app_transition = 2;
+
+ optional .android.view.TransitionTypeEnum last_used_app_transition = 2;
}
/* represents DisplayContent */
@@ -288,11 +265,10 @@
optional int32 stack_id = 4;
optional .android.view.WindowLayoutParamsProto attributes = 5;
optional .android.graphics.RectProto given_content_insets = 6;
- reserved 7 to 10;
-// optional .android.graphics.RectProto frame = 7;
-// optional .android.graphics.RectProto containing_frame = 8;
-// optional .android.graphics.RectProto parent_frame = 9;
-// optional .android.graphics.RectProto content_frame = 10;
+ optional .android.graphics.RectProto frame = 7 [deprecated=true];
+ optional .android.graphics.RectProto containing_frame = 8 [deprecated=true];
+ optional .android.graphics.RectProto parent_frame = 9 [deprecated=true];
+ optional .android.graphics.RectProto content_frame = 10 [deprecated=true];
optional .android.graphics.RectProto content_insets = 11;
optional .android.graphics.RectProto surface_insets = 12;
optional WindowStateAnimatorProto animator = 13;
@@ -305,18 +281,16 @@
optional int32 system_ui_visibility = 21;
optional bool has_surface = 22;
optional bool is_ready_for_display = 23;
- reserved 24 to 28;
-// optional .android.graphics.RectProto display_frame = 24;
-// optional .android.graphics.RectProto overscan_frame = 25;
-// optional .android.graphics.RectProto visible_frame = 26;
-// optional .android.graphics.RectProto decor_frame = 27;
-// optional .android.graphics.RectProto outset_frame = 28;
+ optional .android.graphics.RectProto display_frame = 24 [deprecated=true];
+ optional .android.graphics.RectProto overscan_frame = 25 [deprecated=true];
+ optional .android.graphics.RectProto visible_frame = 26 [deprecated=true];
+ optional .android.graphics.RectProto decor_frame = 27 [deprecated=true];
+ optional .android.graphics.RectProto outset_frame = 28 [deprecated=true];
optional .android.graphics.RectProto overscan_insets = 29;
optional .android.graphics.RectProto visible_insets = 30;
optional .android.graphics.RectProto stable_insets = 31;
optional .android.graphics.RectProto outsets = 32;
- reserved 33;
-// optional .android.view.DisplayCutoutProto cutout = 33;
+ optional .android.view.DisplayCutoutProto cutout = 33 [deprecated=true];
optional bool remove_on_exit = 34;
optional bool destroying = 35;
optional bool removed = 36;
diff --git a/core/proto/android/view/enums.proto b/core/proto/android/view/enums.proto
index 10785ce..0172e78 100644
--- a/core/proto/android/view/enums.proto
+++ b/core/proto/android/view/enums.proto
@@ -42,3 +42,30 @@
// CPU is not updating it.
DISPLAY_STATE_ON_SUSPEND = 6;
}
+
+// Constants found in android.view.WindowManager.
+enum TransitionTypeEnum {
+ TRANSIT_NONE = 0;
+ TRANSIT_UNSET = -1;
+ TRANSIT_ACTIVITY_OPEN = 6;
+ TRANSIT_ACTIVITY_CLOSE = 7;
+ TRANSIT_TASK_OPEN = 8;
+ TRANSIT_TASK_CLOSE = 9;
+ TRANSIT_TASK_TO_FRONT = 10;
+ TRANSIT_TASK_TO_BACK = 11;
+ TRANSIT_WALLPAPER_CLOSE = 12;
+ TRANSIT_WALLPAPER_OPEN = 13;
+ TRANSIT_WALLPAPER_INTRA_OPEN = 14;
+ TRANSIT_WALLPAPER_INTRA_CLOSE = 15;
+ TRANSIT_TASK_OPEN_BEHIND = 16;
+ TRANSIT_TASK_IN_PLACE = 17;
+ TRANSIT_ACTIVITY_RELAUNCH = 18;
+ TRANSIT_DOCK_TASK_FROM_RECENTS = 19;
+ TRANSIT_KEYGUARD_GOING_AWAY = 20;
+ TRANSIT_KEYGUARD_GOING_AWAY_ON_WALLPAPER = 21;
+ TRANSIT_KEYGUARD_OCCLUDE = 22;
+ TRANSIT_KEYGUARD_UNOCCLUDE = 23;
+ TRANSIT_TRANSLUCENT_ACTIVITY_OPEN = 24;
+ TRANSIT_TRANSLUCENT_ACTIVITY_CLOSE = 25;
+ TRANSIT_CRASHING_ACTIVITY_CLOSE = 26;
+}
diff --git a/core/res/res/values-bs/strings.xml b/core/res/res/values-bs/strings.xml
index 6a88c30..ccf8aa6 100644
--- a/core/res/res/values-bs/strings.xml
+++ b/core/res/res/values-bs/strings.xml
@@ -34,7 +34,7 @@
<string name="defaultMsisdnAlphaTag" msgid="2850889754919584674">"MSISDN1"</string>
<string name="mmiError" msgid="5154499457739052907">"Problem sa povezivanjem ili nevažeći MMI kôd."</string>
<string name="mmiFdnError" msgid="5224398216385316471">"Operacija je ograničena samo na brojeve fiksnog biranja."</string>
- <string name="mmiErrorWhileRoaming" msgid="762488890299284230">"Nije moguće promijeniti postavke za preusmjeravanje poziva s vašeg telefona dok ste u romingu."</string>
+ <string name="mmiErrorWhileRoaming" msgid="762488890299284230">"Nije moguće promijeniti postavke prosljeđivanja poziva s vašeg telefona dok ste u romingu."</string>
<string name="serviceEnabled" msgid="8147278346414714315">"Usluga je omogućena."</string>
<string name="serviceEnabledFor" msgid="6856228140453471041">"Usluga je omogućena za:"</string>
<string name="serviceDisabled" msgid="1937553226592516411">"Usluga je onemogućena."</string>
@@ -61,7 +61,7 @@
<string name="ClirMmi" msgid="7784673673446833091">"ID odlaznog poziva"</string>
<string name="ColpMmi" msgid="3065121483740183974">"Identifikacija povezane linije"</string>
<string name="ColrMmi" msgid="4996540314421889589">"Ograničenje identifikacije povezane linije"</string>
- <string name="CfMmi" msgid="5123218989141573515">"Preusmjeravanje poziva"</string>
+ <string name="CfMmi" msgid="5123218989141573515">"Prosljeđivanje poziva"</string>
<string name="CwMmi" msgid="9129678056795016867">"Poziv na čekanju"</string>
<string name="BaMmi" msgid="455193067926770581">"Zabrana poziva"</string>
<string name="PwdMmi" msgid="7043715687905254199">"Promjena lozinke"</string>
@@ -89,17 +89,17 @@
<string name="EmergencyCallWarningTitle" msgid="813380189532491336">"Hitni pozivi su nedostupni"</string>
<string name="EmergencyCallWarningSummary" msgid="1899692069750260619">"Nije moguće uspostaviti hitne pozive putem Wi‑Fi mreže"</string>
<string name="notification_channel_network_alert" msgid="4427736684338074967">"Upozorenja"</string>
- <string name="notification_channel_call_forward" msgid="2419697808481833249">"Preusmjeravanje poziva"</string>
+ <string name="notification_channel_call_forward" msgid="2419697808481833249">"Prosljeđivanje poziva"</string>
<string name="notification_channel_emergency_callback" msgid="6686166232265733921">"Način rada za hitni povratni poziv"</string>
<string name="notification_channel_mobile_data_status" msgid="4575131690860945836">"Status prijenosa podataka na mobilnoj mreži"</string>
<string name="notification_channel_sms" msgid="3441746047346135073">"SMS poruke"</string>
<string name="notification_channel_voice_mail" msgid="3954099424160511919">"Poruke govorne pošte"</string>
- <string name="notification_channel_wfc" msgid="2130802501654254801">"WiFi pozivanje"</string>
+ <string name="notification_channel_wfc" msgid="2130802501654254801">"Pozivanje putem WiFi-ja"</string>
<string name="notification_channel_sim" msgid="4052095493875188564">"Status SIM-a"</string>
- <string name="peerTtyModeFull" msgid="6165351790010341421">"Ravnopravni uređaj zatražio TTY PUNI način rada"</string>
- <string name="peerTtyModeHco" msgid="5728602160669216784">"Ravnopravni uređaj zatražio TTY HCO način rada"</string>
- <string name="peerTtyModeVco" msgid="1742404978686538049">"Ravnopravni uređaj zatražio TTY VCO način rada"</string>
- <string name="peerTtyModeOff" msgid="3280819717850602205">"Ravnopravni uređaj zatražio TTY ISKLJUČENI način rada"</string>
+ <string name="peerTtyModeFull" msgid="6165351790010341421">"Ravnopravni uređaj zatražio načina rada TTY FULL"</string>
+ <string name="peerTtyModeHco" msgid="5728602160669216784">"Ravnopravni uređaj zatražio načina rada TTY HCO"</string>
+ <string name="peerTtyModeVco" msgid="1742404978686538049">"Ravnopravni uređaj zatražio načina rada TTY VCO"</string>
+ <string name="peerTtyModeOff" msgid="3280819717850602205">"Ravnopravni uređaj zatražio načina rada TTY OFF"</string>
<string name="serviceClassVoice" msgid="1258393812335258019">"Govorna"</string>
<string name="serviceClassData" msgid="872456782077937893">"Podatke"</string>
<string name="serviceClassFAX" msgid="5566624998840486475">"Faks"</string>
@@ -122,16 +122,16 @@
<string name="roamingText11" msgid="4154476854426920970">"Oznaka da je uređaj u roamingu uključena"</string>
<string name="roamingText12" msgid="1189071119992726320">"Oznaka da je uređaj u roamingu ugašena"</string>
<string name="roamingTextSearching" msgid="8360141885972279963">"Traženje usluge"</string>
- <string name="wfcRegErrorTitle" msgid="3855061241207182194">"Nije moguće postaviti WiFi pozivanje"</string>
+ <string name="wfcRegErrorTitle" msgid="3855061241207182194">"Nije moguće postaviti pozivanje putem WiFi-ja"</string>
<string-array name="wfcOperatorErrorAlertMessages">
- <item msgid="3910386316304772394">"Da biste pozivali i slali poruke koristeći WiFi mrežu, prvo zatražite od operatera da postavi tu uslugu. Zatim ponovo uključite WiFi pozivanje u Postavkama. (Kôd greške: <xliff:g id="CODE">%1$s</xliff:g>)"</item>
+ <item msgid="3910386316304772394">"Da biste pozivali i slali poruke koristeći WiFi mrežu, prvo zatražite od operatera da postavi tu uslugu. Zatim ponovo uključite pozivanje putem WiFi-ja u Postavkama. (Kôd greške: <xliff:g id="CODE">%1$s</xliff:g>)"</item>
</string-array>
<string-array name="wfcOperatorErrorNotificationMessages">
<item msgid="7372514042696663278">"Došlo je do problema prilikom registracije pozivanja putem WiFi mreže kod vašeg operatera: <xliff:g id="CODE">%1$s</xliff:g>"</item>
</string-array>
<string-array name="wfcSpnFormats">
<item msgid="6830082633573257149">"%s"</item>
- <item msgid="4397097370387921767">"WiFi pozivanje preko operatera %s"</item>
+ <item msgid="4397097370387921767">"Pozivanje putem WiFi-ja preko operatera %s"</item>
</string-array>
<string name="wifi_calling_off_summary" msgid="8720659586041656098">"Isključeno"</string>
<string name="wfc_mode_wifi_preferred_summary" msgid="1994113411286935263">"Preferira se WiFi"</string>
@@ -521,7 +521,7 @@
</string-array>
<string name="fingerprint_icon_content_description" msgid="2340202869968465936">"Ikona za otisak prsta"</string>
<string name="permlab_manageFace" msgid="2137540986007309781">"upravljanje hardverom za autentifikaciju licem"</string>
- <string name="permdesc_manageFace" msgid="8919637120670185330">"Omogućava aplikaciji da koristi metode za dodavanje i brisanje šablona lica za upotrebu."</string>
+ <string name="permdesc_manageFace" msgid="8919637120670185330">"Omogućava aplikaciji korištenje metoda za dodavanje i brisanje šablona lica za upotrebu."</string>
<string name="permlab_useFaceAuthentication" msgid="8996134460546804535">"upotreba hardvera za autentifikaciju licem"</string>
<string name="permdesc_useFaceAuthentication" msgid="5011118722951833089">"Omogućava aplikaciji da za autentifikaciju koristi hardver za autentifikaciju licem"</string>
<string name="face_acquired_insufficient" msgid="5901287247766106330">"Obrada lica nije uspjela. Pokušajte ponovo."</string>
diff --git a/core/res/res/values-cs/strings.xml b/core/res/res/values-cs/strings.xml
index 289e49e..40b5e29 100644
--- a/core/res/res/values-cs/strings.xml
+++ b/core/res/res/values-cs/strings.xml
@@ -58,8 +58,8 @@
</plurals>
<string name="imei" msgid="2625429890869005782">"IMEI"</string>
<string name="meid" msgid="4841221237681254195">"MEID"</string>
- <string name="ClipMmi" msgid="6952821216480289285">"Příchozí identifikace volajícího"</string>
- <string name="ClirMmi" msgid="7784673673446833091">"Odchozí identifikace volajícího"</string>
+ <string name="ClipMmi" msgid="6952821216480289285">"Příchozí ID volajícího"</string>
+ <string name="ClirMmi" msgid="7784673673446833091">"Odchozí ID volajícího"</string>
<string name="ColpMmi" msgid="3065121483740183974">"ID připojené linky"</string>
<string name="ColrMmi" msgid="4996540314421889589">"Omezení ID připojené linky"</string>
<string name="CfMmi" msgid="5123218989141573515">"Přesměrování hovorů"</string>
@@ -73,12 +73,12 @@
<string name="RuacMmi" msgid="7827887459138308886">"Odmítnutí nevyžádaných obtěžujících hovorů"</string>
<string name="CndMmi" msgid="3116446237081575808">"Doručení volaného čísla"</string>
<string name="DndMmi" msgid="1265478932418334331">"Nerušit"</string>
- <string name="CLIRDefaultOnNextCallOn" msgid="429415409145781923">"Ve výchozím nastavení je identifikace volajícího omezena. Příští hovor: Omezeno"</string>
- <string name="CLIRDefaultOnNextCallOff" msgid="3092918006077864624">"Ve výchozím nastavení je identifikace volajícího omezena. Příští hovor: Neomezeno"</string>
- <string name="CLIRDefaultOffNextCallOn" msgid="6179425182856418465">"Ve výchozím nastavení není identifikace volajícího omezena. Příští hovor: Omezeno"</string>
- <string name="CLIRDefaultOffNextCallOff" msgid="2567998633124408552">"Ve výchozím nastavení není identifikace volajícího omezena. Příští hovor: Neomezeno"</string>
+ <string name="CLIRDefaultOnNextCallOn" msgid="429415409145781923">"Ve výchozím nastavení je funkce ID volajícího omezena. Příští hovor: Omezeno"</string>
+ <string name="CLIRDefaultOnNextCallOff" msgid="3092918006077864624">"Ve výchozím nastavení je funkce ID volajícího omezena. Příští hovor: Neomezeno"</string>
+ <string name="CLIRDefaultOffNextCallOn" msgid="6179425182856418465">"Ve výchozím nastavení není funkce ID volajícího omezena. Příští hovor: Omezeno"</string>
+ <string name="CLIRDefaultOffNextCallOff" msgid="2567998633124408552">"Ve výchozím nastavení není funkce ID volajícího omezena. Příští hovor: Neomezeno"</string>
<string name="serviceNotProvisioned" msgid="8614830180508686666">"Služba není zřízena."</string>
- <string name="CLIRPermanent" msgid="3377371145926835671">"Nastavení identifikace volajícího nesmíte měnit."</string>
+ <string name="CLIRPermanent" msgid="3377371145926835671">"Nastavení ID volajícího nesmíte měnit."</string>
<string name="RestrictedOnDataTitle" msgid="5221736429761078014">"Není k dispozici žádná mobilní datová služba"</string>
<string name="RestrictedOnEmergencyTitle" msgid="6855466023161191166">"Tísňová volání jsou nedostupná"</string>
<string name="RestrictedOnNormalTitle" msgid="3179574012752700984">"Hlasová volání nejsou k dispozici"</string>
diff --git a/core/res/res/values-da/strings.xml b/core/res/res/values-da/strings.xml
index 8c86ac8..947754f 100644
--- a/core/res/res/values-da/strings.xml
+++ b/core/res/res/values-da/strings.xml
@@ -267,7 +267,7 @@
<string name="android_system_label" msgid="6577375335728551336">"Android-system"</string>
<string name="user_owner_label" msgid="8836124313744349203">"Skift til personlig profil"</string>
<string name="managed_profile_label" msgid="8947929265267690522">"Skift til arbejdsprofil"</string>
- <string name="permgrouplab_contacts" msgid="3657758145679177612">"Kontaktpersoner"</string>
+ <string name="permgrouplab_contacts" msgid="3657758145679177612">"Kontakter"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"have adgang til dine kontaktpersoner"</string>
<string name="permgrouprequest_contacts" msgid="6032805601881764300">"Vil du give <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> adgang til dine kontaktpersoner?"</string>
<string name="permgrouplab_location" msgid="7275582855722310164">"Placering"</string>
diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml
index 33053d2..e69584b 100644
--- a/core/res/res/values-fr/strings.xml
+++ b/core/res/res/values-fr/strings.xml
@@ -1894,7 +1894,7 @@
<string name="mmcc_illegal_ms_msim_template" msgid="5994323296399913454">"Carte SIM <xliff:g id="SIMNUMBER">%d</xliff:g> non autorisée"</string>
<string name="mmcc_illegal_me_msim_template" msgid="5550259730350571826">"Carte SIM <xliff:g id="SIMNUMBER">%d</xliff:g> non autorisée"</string>
<string name="popup_window_default_title" msgid="4874318849712115433">"Fenêtre pop-up"</string>
- <string name="slice_more_content" msgid="8504342889413274608">"<xliff:g id="NUMBER">%1$d</xliff:g> autres"</string>
+ <string name="slice_more_content" msgid="8504342889413274608">"+ <xliff:g id="NUMBER">%1$d</xliff:g>"</string>
<string name="shortcut_restored_on_lower_version" msgid="4860853725206702336">"La version de l\'application est revenue à une version antérieure ou n\'est pas compatible avec cet raccourci"</string>
<string name="shortcut_restore_not_supported" msgid="5028808567940014190">"Le raccourci ne peut pas être restauré car l\'application n\'accepte pas la sauvegarde et la restauration"</string>
<string name="shortcut_restore_signature_mismatch" msgid="2406209324521327518">"Le raccourci ne peut pas être restauré car la signature de l\'application est différente"</string>
diff --git a/core/res/res/values-it/strings.xml b/core/res/res/values-it/strings.xml
index 445f3a7..de0b528 100644
--- a/core/res/res/values-it/strings.xml
+++ b/core/res/res/values-it/strings.xml
@@ -134,7 +134,7 @@
</string-array>
<string name="wifi_calling_off_summary" msgid="8720659586041656098">"Non attiva"</string>
<string name="wfc_mode_wifi_preferred_summary" msgid="1994113411286935263">"Rete preferita: Wi-Fi"</string>
- <string name="wfc_mode_cellular_preferred_summary" msgid="1988279625335345908">"Modalità preferita: dati mobili"</string>
+ <string name="wfc_mode_cellular_preferred_summary" msgid="1988279625335345908">"Rete preferita: dati mobili"</string>
<string name="wfc_mode_wifi_only_summary" msgid="2379919155237869320">"Solo Wi-Fi"</string>
<string name="cfTemplateNotForwarded" msgid="1683685883841272560">"<xliff:g id="BEARER_SERVICE_CODE">{0}</xliff:g>: inoltro non effettuato"</string>
<string name="cfTemplateForwarded" msgid="1302922117498590521">"<xliff:g id="BEARER_SERVICE_CODE">{0}</xliff:g>: <xliff:g id="DIALING_NUMBER">{1}</xliff:g>"</string>
diff --git a/core/res/res/values-ky/strings.xml b/core/res/res/values-ky/strings.xml
index 7557cfa..a75a00c 100644
--- a/core/res/res/values-ky/strings.xml
+++ b/core/res/res/values-ky/strings.xml
@@ -60,7 +60,7 @@
<string name="ClirMmi" msgid="7784673673446833091">"Чыгуучу номурду аныктоо"</string>
<string name="ColpMmi" msgid="3065121483740183974">"Туташкан линия ID-си"</string>
<string name="ColrMmi" msgid="4996540314421889589">"Туташкан линия ID-син Чектөө"</string>
- <string name="CfMmi" msgid="5123218989141573515">"Чалууну багыттоо"</string>
+ <string name="CfMmi" msgid="5123218989141573515">"Башка номерге багыттоо"</string>
<string name="CwMmi" msgid="9129678056795016867">"Чалууну кармап туруу"</string>
<string name="BaMmi" msgid="455193067926770581">"Чалууга тыюу салуу"</string>
<string name="PwdMmi" msgid="7043715687905254199">"Сырсөздү өзгөртүү"</string>
diff --git a/core/res/res/values-mcc214/config.xml b/core/res/res/values-mcc214/config.xml
new file mode 100644
index 0000000..9410848
--- /dev/null
+++ b/core/res/res/values-mcc214/config.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2018, 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 my 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- String array containing numbers that shouldn't be logged
+ 016 present here for Spain's gender violence number -->
+ <string-array translatable="false" name="unloggable_phone_numbers">
+ <item>016</item>
+ </string-array>
+</resources>
diff --git a/core/res/res/values-mcc313-mnc100-as/strings.xml b/core/res/res/values-mcc313-mnc100-as/strings.xml
deleted file mode 100644
index 350757c..0000000
--- a/core/res/res/values-mcc313-mnc100-as/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_illegal_me" msgid="7320955531336937252">"ফ\'নৰ অনুমতি নাই MM#6"</string>
-</resources>
diff --git a/core/res/res/values-mcc313-mnc100-az/strings.xml b/core/res/res/values-mcc313-mnc100-az/strings.xml
deleted file mode 100644
index 44796df..0000000
--- a/core/res/res/values-mcc313-mnc100-az/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_illegal_me" msgid="7320955531336937252">"MM#6 telefonu dəstəklənmir"</string>
-</resources>
diff --git a/core/res/res/values-mcc313-mnc100-b+sr+Latn/strings.xml b/core/res/res/values-mcc313-mnc100-b+sr+Latn/strings.xml
deleted file mode 100644
index d5bf39e..0000000
--- a/core/res/res/values-mcc313-mnc100-b+sr+Latn/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_illegal_me" msgid="7320955531336937252">"Telefon nije dozvoljen MM#6"</string>
-</resources>
diff --git a/core/res/res/values-mcc313-mnc100-be/strings.xml b/core/res/res/values-mcc313-mnc100-be/strings.xml
deleted file mode 100644
index c9f4633..0000000
--- a/core/res/res/values-mcc313-mnc100-be/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_illegal_me" msgid="7320955531336937252">"Тэлефон не дапускаецца MM#6"</string>
-</resources>
diff --git a/core/res/res/values-mcc313-mnc100-bn/strings.xml b/core/res/res/values-mcc313-mnc100-bn/strings.xml
deleted file mode 100644
index 5292241..0000000
--- a/core/res/res/values-mcc313-mnc100-bn/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_illegal_me" msgid="7320955531336937252">"ফোন অনুমোদিত নয় MM#6"</string>
-</resources>
diff --git a/core/res/res/values-mcc313-mnc100-bs/strings.xml b/core/res/res/values-mcc313-mnc100-bs/strings.xml
deleted file mode 100644
index d5bf39e..0000000
--- a/core/res/res/values-mcc313-mnc100-bs/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_illegal_me" msgid="7320955531336937252">"Telefon nije dozvoljen MM#6"</string>
-</resources>
diff --git a/core/res/res/values-mcc313-mnc100-en-rAU/strings.xml b/core/res/res/values-mcc313-mnc100-en-rAU/strings.xml
deleted file mode 100644
index f1a3611..0000000
--- a/core/res/res/values-mcc313-mnc100-en-rAU/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_illegal_me" msgid="7320955531336937252">"Phone not allowed MM#6"</string>
-</resources>
diff --git a/core/res/res/values-mcc313-mnc100-en-rCA/strings.xml b/core/res/res/values-mcc313-mnc100-en-rCA/strings.xml
deleted file mode 100644
index f1a3611..0000000
--- a/core/res/res/values-mcc313-mnc100-en-rCA/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_illegal_me" msgid="7320955531336937252">"Phone not allowed MM#6"</string>
-</resources>
diff --git a/core/res/res/values-mcc313-mnc100-en-rIN/strings.xml b/core/res/res/values-mcc313-mnc100-en-rIN/strings.xml
deleted file mode 100644
index f1a3611..0000000
--- a/core/res/res/values-mcc313-mnc100-en-rIN/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_illegal_me" msgid="7320955531336937252">"Phone not allowed MM#6"</string>
-</resources>
diff --git a/core/res/res/values-mcc313-mnc100-en-rXC/strings.xml b/core/res/res/values-mcc313-mnc100-en-rXC/strings.xml
deleted file mode 100644
index 8a8bf7e..0000000
--- a/core/res/res/values-mcc313-mnc100-en-rXC/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_illegal_me" msgid="7320955531336937252">"Phone not allowed MM#6"</string>
-</resources>
diff --git a/core/res/res/values-mcc313-mnc100-et/strings.xml b/core/res/res/values-mcc313-mnc100-et/strings.xml
deleted file mode 100644
index 83cfbaf..0000000
--- a/core/res/res/values-mcc313-mnc100-et/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_illegal_me" msgid="7320955531336937252">"Telefon pole lubatud MM#6"</string>
-</resources>
diff --git a/core/res/res/values-mcc313-mnc100-eu/strings.xml b/core/res/res/values-mcc313-mnc100-eu/strings.xml
deleted file mode 100644
index 028ca37..0000000
--- a/core/res/res/values-mcc313-mnc100-eu/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_illegal_me" msgid="7320955531336937252">"Telefonoa ez da onartzen MM#6"</string>
-</resources>
diff --git a/core/res/res/values-mcc313-mnc100-fr-rCA/strings.xml b/core/res/res/values-mcc313-mnc100-fr-rCA/strings.xml
deleted file mode 100644
index 89c50ea..0000000
--- a/core/res/res/values-mcc313-mnc100-fr-rCA/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_illegal_me" msgid="7320955531336937252">"Téléphone non autorisé MM#6"</string>
-</resources>
diff --git a/core/res/res/values-mcc313-mnc100-gl/strings.xml b/core/res/res/values-mcc313-mnc100-gl/strings.xml
deleted file mode 100644
index 04390a0..0000000
--- a/core/res/res/values-mcc313-mnc100-gl/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_illegal_me" msgid="7320955531336937252">"Non se admite o teléfono MM#6"</string>
-</resources>
diff --git a/core/res/res/values-mcc313-mnc100-gu/strings.xml b/core/res/res/values-mcc313-mnc100-gu/strings.xml
deleted file mode 100644
index 6291d57..0000000
--- a/core/res/res/values-mcc313-mnc100-gu/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_illegal_me" msgid="7320955531336937252">"MM#6 ફોનની મંજૂરી નથી"</string>
-</resources>
diff --git a/core/res/res/values-mcc313-mnc100-hy/strings.xml b/core/res/res/values-mcc313-mnc100-hy/strings.xml
deleted file mode 100644
index 62acde3..0000000
--- a/core/res/res/values-mcc313-mnc100-hy/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_illegal_me" msgid="7320955531336937252">"Հեռախոսի օգտագործումն արգելված է (MM#6)"</string>
-</resources>
diff --git a/core/res/res/values-mcc313-mnc100-is/strings.xml b/core/res/res/values-mcc313-mnc100-is/strings.xml
deleted file mode 100644
index 3ad7b3c..0000000
--- a/core/res/res/values-mcc313-mnc100-is/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_illegal_me" msgid="7320955531336937252">"Sími ekki leyfður MM#6"</string>
-</resources>
diff --git a/core/res/res/values-mcc313-mnc100-ka/strings.xml b/core/res/res/values-mcc313-mnc100-ka/strings.xml
deleted file mode 100644
index a063fc4..0000000
--- a/core/res/res/values-mcc313-mnc100-ka/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_illegal_me" msgid="7320955531336937252">"ტელეფონი დაუშვებელია MM#6"</string>
-</resources>
diff --git a/core/res/res/values-mcc313-mnc100-kk/strings.xml b/core/res/res/values-mcc313-mnc100-kk/strings.xml
deleted file mode 100644
index 0562a2f..0000000
--- a/core/res/res/values-mcc313-mnc100-kk/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_illegal_me" msgid="7320955531336937252">"Телефон пайдалануға болмайды MM#6"</string>
-</resources>
diff --git a/core/res/res/values-mcc313-mnc100-km/strings.xml b/core/res/res/values-mcc313-mnc100-km/strings.xml
deleted file mode 100644
index 74e607b..0000000
--- a/core/res/res/values-mcc313-mnc100-km/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_illegal_me" msgid="7320955531336937252">"មិនអនុញ្ញាតចំពោះទូរសព្ទទេ MM#6"</string>
-</resources>
diff --git a/core/res/res/values-mcc313-mnc100-kn/strings.xml b/core/res/res/values-mcc313-mnc100-kn/strings.xml
deleted file mode 100644
index e287270..0000000
--- a/core/res/res/values-mcc313-mnc100-kn/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_illegal_me" msgid="7320955531336937252">"ಫೋನ್ MM#6 ಅನ್ನು ಅನುಮತಿಸುವುದಿಲ್ಲ"</string>
-</resources>
diff --git a/core/res/res/values-mcc313-mnc100-ky/strings.xml b/core/res/res/values-mcc313-mnc100-ky/strings.xml
deleted file mode 100644
index 8c08c4f..0000000
--- a/core/res/res/values-mcc313-mnc100-ky/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_illegal_me" msgid="7320955531336937252">"Телефонду колдонууга тыюу салынган MM#6"</string>
-</resources>
diff --git a/core/res/res/values-mcc313-mnc100-lo/strings.xml b/core/res/res/values-mcc313-mnc100-lo/strings.xml
deleted file mode 100644
index 793b87b..0000000
--- a/core/res/res/values-mcc313-mnc100-lo/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_illegal_me" msgid="7320955531336937252">"ບໍ່ອະນຸຍາດໃຫ້ໃຊ້ໂທລະສັບ MM#6"</string>
-</resources>
diff --git a/core/res/res/values-mcc313-mnc100-mk/strings.xml b/core/res/res/values-mcc313-mnc100-mk/strings.xml
deleted file mode 100644
index 0b403e9..0000000
--- a/core/res/res/values-mcc313-mnc100-mk/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_illegal_me" msgid="7320955531336937252">"Телефонот не е дозволен MM#6"</string>
-</resources>
diff --git a/core/res/res/values-mcc313-mnc100-ml/strings.xml b/core/res/res/values-mcc313-mnc100-ml/strings.xml
deleted file mode 100644
index 1adc455..0000000
--- a/core/res/res/values-mcc313-mnc100-ml/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_illegal_me" msgid="7320955531336937252">"ഫോൺ അനുവദനീയമല്ല MM#6"</string>
-</resources>
diff --git a/core/res/res/values-mcc313-mnc100-mn/strings.xml b/core/res/res/values-mcc313-mnc100-mn/strings.xml
deleted file mode 100644
index 5d5fbff..0000000
--- a/core/res/res/values-mcc313-mnc100-mn/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_illegal_me" msgid="7320955531336937252">"Утсыг зөвшөөрөөгүй MM#6"</string>
-</resources>
diff --git a/core/res/res/values-mcc313-mnc100-mr/strings.xml b/core/res/res/values-mcc313-mnc100-mr/strings.xml
deleted file mode 100644
index 32c6946..0000000
--- a/core/res/res/values-mcc313-mnc100-mr/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_illegal_me" msgid="7320955531336937252">"फोन MM#6 ला अनुमती देत नाही"</string>
-</resources>
diff --git a/core/res/res/values-mcc313-mnc100-my/strings.xml b/core/res/res/values-mcc313-mnc100-my/strings.xml
deleted file mode 100644
index 7de66f7..0000000
--- a/core/res/res/values-mcc313-mnc100-my/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_illegal_me" msgid="7320955531336937252">"ဖုန်းကို ခွင့်မပြုပါ MM#6"</string>
-</resources>
diff --git a/core/res/res/values-mcc313-mnc100-ne/strings.xml b/core/res/res/values-mcc313-mnc100-ne/strings.xml
deleted file mode 100644
index 0fb9d64..0000000
--- a/core/res/res/values-mcc313-mnc100-ne/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_illegal_me" msgid="7320955531336937252">"फोनलाई अनुमति छैन MM#6"</string>
-</resources>
diff --git a/core/res/res/values-mcc313-mnc100-or/strings.xml b/core/res/res/values-mcc313-mnc100-or/strings.xml
deleted file mode 100644
index a64ee94..0000000
--- a/core/res/res/values-mcc313-mnc100-or/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_illegal_me" msgid="7320955531336937252">"ଫୋନ୍ର ଅନୁମତି ନାହିଁ MM#6"</string>
-</resources>
diff --git a/core/res/res/values-mcc313-mnc100-pa/strings.xml b/core/res/res/values-mcc313-mnc100-pa/strings.xml
deleted file mode 100644
index 87b2e47..0000000
--- a/core/res/res/values-mcc313-mnc100-pa/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_illegal_me" msgid="7320955531336937252">"ਫ਼ੋਨ ਨੂੰ ਇਜਾਜ਼ਤ ਨਹੀਂ ਹੈ MM#6"</string>
-</resources>
diff --git a/core/res/res/values-mcc313-mnc100-pt-rBR/strings.xml b/core/res/res/values-mcc313-mnc100-pt-rBR/strings.xml
deleted file mode 100644
index f80f618..0000000
--- a/core/res/res/values-mcc313-mnc100-pt-rBR/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_illegal_me" msgid="7320955531336937252">"Smartphone não permitido MM#6"</string>
-</resources>
diff --git a/core/res/res/values-mcc313-mnc100-si/strings.xml b/core/res/res/values-mcc313-mnc100-si/strings.xml
deleted file mode 100644
index 9493af0b..0000000
--- a/core/res/res/values-mcc313-mnc100-si/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_illegal_me" msgid="7320955531336937252">"දුරකථනය MM#6 ඉඩ නොදේ"</string>
-</resources>
diff --git a/core/res/res/values-mcc313-mnc100-sq/strings.xml b/core/res/res/values-mcc313-mnc100-sq/strings.xml
deleted file mode 100644
index 237a4a4..0000000
--- a/core/res/res/values-mcc313-mnc100-sq/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_illegal_me" msgid="7320955531336937252">"Telefoni nuk lejohet MM#6"</string>
-</resources>
diff --git a/core/res/res/values-mcc313-mnc100-sw/strings.xml b/core/res/res/values-mcc313-mnc100-sw/strings.xml
deleted file mode 100644
index a7574fb..0000000
--- a/core/res/res/values-mcc313-mnc100-sw/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_illegal_me" msgid="7320955531336937252">"Simu hairuhusiwi MM#6"</string>
-</resources>
diff --git a/core/res/res/values-mcc313-mnc100-ta/strings.xml b/core/res/res/values-mcc313-mnc100-ta/strings.xml
deleted file mode 100644
index 7ef5ea9..0000000
--- a/core/res/res/values-mcc313-mnc100-ta/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_illegal_me" msgid="7320955531336937252">"ஃபோன் அனுமதிக்கப்படவில்லை MM#6"</string>
-</resources>
diff --git a/core/res/res/values-mcc313-mnc100-te/strings.xml b/core/res/res/values-mcc313-mnc100-te/strings.xml
deleted file mode 100644
index 8908fb7..0000000
--- a/core/res/res/values-mcc313-mnc100-te/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_illegal_me" msgid="7320955531336937252">"ఫోన్ అనుమతించబడదు MM#6"</string>
-</resources>
diff --git a/core/res/res/values-mcc313-mnc100-ur/strings.xml b/core/res/res/values-mcc313-mnc100-ur/strings.xml
deleted file mode 100644
index d670d0e..0000000
--- a/core/res/res/values-mcc313-mnc100-ur/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_illegal_me" msgid="7320955531336937252">"فون کی اجازت نہیں ہے MM#6"</string>
-</resources>
diff --git a/core/res/res/values-mcc313-mnc100-uz/strings.xml b/core/res/res/values-mcc313-mnc100-uz/strings.xml
deleted file mode 100644
index 202a30c..0000000
--- a/core/res/res/values-mcc313-mnc100-uz/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_illegal_me" msgid="7320955531336937252">"Chaqiruvlar taqiqlangan (MM#6)"</string>
-</resources>
diff --git a/core/res/res/values-mcc313-mnc100-zh-rHK/strings.xml b/core/res/res/values-mcc313-mnc100-zh-rHK/strings.xml
deleted file mode 100644
index db85730..0000000
--- a/core/res/res/values-mcc313-mnc100-zh-rHK/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_illegal_me" msgid="7320955531336937252">"不允許手機 MM#6"</string>
-</resources>
diff --git a/core/res/res/values-mn/strings.xml b/core/res/res/values-mn/strings.xml
index 2a30fcb..e1b9670 100644
--- a/core/res/res/values-mn/strings.xml
+++ b/core/res/res/values-mn/strings.xml
@@ -133,8 +133,8 @@
<item msgid="4397097370387921767">"%s Wi-Fi Дуудлага"</item>
</string-array>
<string name="wifi_calling_off_summary" msgid="8720659586041656098">"Идэвхгүй"</string>
- <string name="wfc_mode_wifi_preferred_summary" msgid="1994113411286935263">"Wi-Fi илүү эрхэмлэдэг"</string>
- <string name="wfc_mode_cellular_preferred_summary" msgid="1988279625335345908">"Давуу эрхтэй мобайл"</string>
+ <string name="wfc_mode_wifi_preferred_summary" msgid="1994113411286935263">"Wi-Fi давуу эрхтэй"</string>
+ <string name="wfc_mode_cellular_preferred_summary" msgid="1988279625335345908">"Мобайл давуу эрхтэй"</string>
<string name="wfc_mode_wifi_only_summary" msgid="2379919155237869320">"Зөвхөн Wi-Fi"</string>
<string name="cfTemplateNotForwarded" msgid="1683685883841272560">"<xliff:g id="BEARER_SERVICE_CODE">{0}</xliff:g>: дамжуулагдаагүй"</string>
<string name="cfTemplateForwarded" msgid="1302922117498590521">"<xliff:g id="BEARER_SERVICE_CODE">{0}</xliff:g>: <xliff:g id="DIALING_NUMBER">{1}</xliff:g>"</string>
@@ -762,7 +762,7 @@
<string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Тайлах PIN-г оруулна уу"</string>
<string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Буруу PIN код."</string>
<string name="keyguard_label_text" msgid="861796461028298424">"Тайлах бол Цэсийг дараад 0."</string>
- <string name="emergency_call_dialog_number_for_display" msgid="696192103195090970">"Яаралтай дугаар"</string>
+ <string name="emergency_call_dialog_number_for_display" msgid="696192103195090970">"Яаралтай тусламжийн дугаар"</string>
<string name="lockscreen_carrier_default" msgid="6169005837238288522">"Үйлчилгээ байхгүй"</string>
<string name="lockscreen_screen_locked" msgid="7288443074806832904">"Дэлгэц түгжигдсэн."</string>
<string name="lockscreen_instructions_when_pattern_enabled" msgid="46154051614126049">"Яаралтай дуудлага хийх буюу эсвэл түгжээг тайлах бол цэсийг дарна уу."</string>
@@ -1161,7 +1161,7 @@
<string name="dump_heap_text" msgid="4809417337240334941">"Энэ үйл явц <xliff:g id="PROC">%1$s</xliff:g> нь үйл ажиллагааны санах ойн хязгаар болох <xliff:g id="SIZE">%2$s</xliff:g> хэмжээг давсан байна. Та хэт их хуримтлагдсан мэдээллийг тэдгээрийн өөрсдийнх нь хөгжүүлэгчтэй хуваалцах боломжтой. Болгоомжтой байгаарай: энэхүү хэт их хуримтлагдсан мэдээлэлд аппликейшнаас нэвтрэх боломжтой таны хувийн мэдээлэл агуулагдсан байж болно."</string>
<string name="sendText" msgid="5209874571959469142">"Текст илгээх үйлдлийг сонгох"</string>
<string name="volume_ringtone" msgid="6885421406845734650">"Хонхны аяны хэмжээ"</string>
- <string name="volume_music" msgid="5421651157138628171">"Медиа дууны хэмжээ"</string>
+ <string name="volume_music" msgid="5421651157138628171">"Медиа дууны түвшин"</string>
<string name="volume_music_hint_playing_through_bluetooth" msgid="9165984379394601533">"Блютүүтээр тоглож байна"</string>
<string name="volume_music_hint_silent_ringtone_selected" msgid="8310739960973156272">"Хонхны дууг чимээгүй болгов"</string>
<string name="volume_call" msgid="3941680041282788711">"Ирсэн дуудлагын дууны хэмжээ"</string>
@@ -1172,7 +1172,7 @@
<string name="volume_icon_description_bluetooth" msgid="6538894177255964340">"Блютүүтын хэмжээ"</string>
<string name="volume_icon_description_ringer" msgid="3326003847006162496">"Хонхны дууны хэмжээ"</string>
<string name="volume_icon_description_incall" msgid="8890073218154543397">"Дуудлагын дууны хэмжээ"</string>
- <string name="volume_icon_description_media" msgid="4217311719665194215">"Медиа дууны хэмжээ"</string>
+ <string name="volume_icon_description_media" msgid="4217311719665194215">"Медиа дууны түвшин"</string>
<string name="volume_icon_description_notification" msgid="7044986546477282274">"Мэдэгдлийн дууны хэмжээ"</string>
<string name="ringtone_default" msgid="3789758980357696936">"Үндсэн хонхны ая"</string>
<string name="ringtone_default_with_actual" msgid="1767304850491060581">"Үндсэн (<xliff:g id="ACTUAL_RINGTONE">%1$s</xliff:g>)"</string>
diff --git a/core/res/res/values-mr/strings.xml b/core/res/res/values-mr/strings.xml
index 27f6477..65c8828 100644
--- a/core/res/res/values-mr/strings.xml
+++ b/core/res/res/values-mr/strings.xml
@@ -1842,7 +1842,7 @@
<string name="demo_starting_message" msgid="5268556852031489931">"डेमो प्रारंभ करत आहे..."</string>
<string name="demo_restarting_message" msgid="952118052531642451">"डिव्हाइस रीसेट करत आहे..."</string>
<string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> अक्षम केले"</string>
- <string name="conference_call" msgid="3751093130790472426">"परिषद कॉल"</string>
+ <string name="conference_call" msgid="3751093130790472426">"कॉन्फरन्स कॉल"</string>
<string name="tooltip_popup_title" msgid="5253721848739260181">"टूलटिप"</string>
<string name="app_category_game" msgid="5431836943981492993">"गेम"</string>
<string name="app_category_audio" msgid="1659853108734301647">"संगीत आणि ऑडिओ"</string>
diff --git a/core/res/res/values-ro/strings.xml b/core/res/res/values-ro/strings.xml
index 05aed44..de01af6 100644
--- a/core/res/res/values-ro/strings.xml
+++ b/core/res/res/values-ro/strings.xml
@@ -242,7 +242,7 @@
<string name="global_action_settings" msgid="1756531602592545966">"Setări"</string>
<string name="global_action_assist" msgid="3892832961594295030">"Asistență"</string>
<string name="global_action_voice_assist" msgid="7751191495200504480">"Asistent vocal"</string>
- <string name="global_action_lockdown" msgid="1099326950891078929">"Blocați"</string>
+ <string name="global_action_lockdown" msgid="1099326950891078929">"Blocare strictă"</string>
<string name="status_bar_notification_info_overflow" msgid="5301981741705354993">"˃999"</string>
<string name="notification_hidden_text" msgid="6351207030447943784">"Notificare nouă"</string>
<string name="notification_channel_virtual_keyboard" msgid="6969925135507955575">"Tastatură virtuală"</string>
diff --git a/core/res/res/values-sk/strings.xml b/core/res/res/values-sk/strings.xml
index 8f29cb7..3f2f46d 100644
--- a/core/res/res/values-sk/strings.xml
+++ b/core/res/res/values-sk/strings.xml
@@ -135,8 +135,8 @@
<item msgid="4397097370387921767">"Volanie siete Wi‑Fi %s"</item>
</string-array>
<string name="wifi_calling_off_summary" msgid="8720659586041656098">"Vypnuté"</string>
- <string name="wfc_mode_wifi_preferred_summary" msgid="1994113411286935263">"Uprednostniť Wi‑Fi"</string>
- <string name="wfc_mode_cellular_preferred_summary" msgid="1988279625335345908">"Preferujem mobilné dáta"</string>
+ <string name="wfc_mode_wifi_preferred_summary" msgid="1994113411286935263">"Preferovať Wi‑Fi"</string>
+ <string name="wfc_mode_cellular_preferred_summary" msgid="1988279625335345908">"Preferovať mobilné spojenie"</string>
<string name="wfc_mode_wifi_only_summary" msgid="2379919155237869320">"Len Wi‑Fi"</string>
<string name="cfTemplateNotForwarded" msgid="1683685883841272560">"<xliff:g id="BEARER_SERVICE_CODE">{0}</xliff:g>: Nepresmerované"</string>
<string name="cfTemplateForwarded" msgid="1302922117498590521">"<xliff:g id="BEARER_SERVICE_CODE">{0}</xliff:g>: <xliff:g id="DIALING_NUMBER">{1}</xliff:g>"</string>
diff --git a/core/res/res/values-sl/strings.xml b/core/res/res/values-sl/strings.xml
index 3e035bf..90ab23b 100644
--- a/core/res/res/values-sl/strings.xml
+++ b/core/res/res/values-sl/strings.xml
@@ -135,7 +135,7 @@
<item msgid="4397097370387921767">"Klicanje prek Wi-Fi-ja (%s)"</item>
</string-array>
<string name="wifi_calling_off_summary" msgid="8720659586041656098">"Izklopljeno"</string>
- <string name="wfc_mode_wifi_preferred_summary" msgid="1994113411286935263">"Prednostno – Wi-Fi"</string>
+ <string name="wfc_mode_wifi_preferred_summary" msgid="1994113411286935263">"Prednostno Wi-Fi"</string>
<string name="wfc_mode_cellular_preferred_summary" msgid="1988279625335345908">"Prednostno mobilno"</string>
<string name="wfc_mode_wifi_only_summary" msgid="2379919155237869320">"Samo Wi-Fi"</string>
<string name="cfTemplateNotForwarded" msgid="1683685883841272560">"<xliff:g id="BEARER_SERVICE_CODE">{0}</xliff:g>: ni posredovano"</string>
diff --git a/core/res/res/values-zh-rHK/strings.xml b/core/res/res/values-zh-rHK/strings.xml
index 18fc2c9..0b75202 100644
--- a/core/res/res/values-zh-rHK/strings.xml
+++ b/core/res/res/values-zh-rHK/strings.xml
@@ -1772,7 +1772,7 @@
<string name="zen_mode_forever_dnd" msgid="3792132696572189081">"直至您關閉「請勿騷擾」功能"</string>
<string name="zen_mode_rule_name_combination" msgid="191109939968076477">"<xliff:g id="FIRST">%1$s</xliff:g>/<xliff:g id="REST">%2$s</xliff:g>"</string>
<string name="toolbar_collapse_description" msgid="2821479483960330739">"收合"</string>
- <string name="zen_mode_feature_name" msgid="5254089399895895004">"請勿干擾"</string>
+ <string name="zen_mode_feature_name" msgid="5254089399895895004">"請勿騷擾"</string>
<string name="zen_mode_downtime_feature_name" msgid="2626974636779860146">"休息時間"</string>
<string name="zen_mode_default_weeknights_name" msgid="3081318299464998143">"平日夜間"</string>
<string name="zen_mode_default_weekends_name" msgid="2786495801019345244">"週末"</string>
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 474c62d..fddb904 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -2729,6 +2729,9 @@
empty string is passed in -->
<string name="config_ims_package"/>
+ <!-- String array containing numbers that shouldn't be logged. Country-specific. -->
+ <string-array name="unloggable_phone_numbers" />
+
<!-- Flag specifying whether or not IMS will use the dynamic ImsResolver -->
<bool name="config_dynamic_bind_ims">false</bool>
diff --git a/core/res/res/values/styles.xml b/core/res/res/values/styles.xml
index 50a6ff3..e1db71f 100644
--- a/core/res/res/values/styles.xml
+++ b/core/res/res/values/styles.xml
@@ -506,13 +506,13 @@
<item name="textEditSuggestionHighlightStyle">?attr/textEditSuggestionHighlightStyle</item>
<item name="textCursorDrawable">?attr/textCursorDrawable</item>
<item name="breakStrategy">high_quality</item>
- <item name="hyphenationFrequency">normal</item>
+ <item name="hyphenationFrequency">none</item>
</style>
<style name="Widget.CheckedTextView">
<item name="textAlignment">viewStart</item>
<item name="breakStrategy">high_quality</item>
- <item name="hyphenationFrequency">normal</item>
+ <item name="hyphenationFrequency">none</item>
</style>
<style name="Widget.TextView.ListSeparator">
@@ -540,7 +540,7 @@
<item name="textColor">?attr/editTextColor</item>
<item name="gravity">center_vertical</item>
<item name="breakStrategy">simple</item>
- <item name="hyphenationFrequency">normal</item>
+ <item name="hyphenationFrequency">none</item>
<item name="defaultFocusHighlightEnabled">false</item>
</style>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index e47ea71..2f45cce 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -2235,6 +2235,7 @@
<java-symbol type="drawable" name="decor_maximize_button_light" />
<java-symbol type="color" name="decor_button_dark_color" />
<java-symbol type="color" name="decor_button_light_color" />
+ <java-symbol type="array" name="unloggable_phone_numbers" />
<!-- From TelephonyProvider -->
<java-symbol type="xml" name="apns" />
diff --git a/core/tests/coretests/src/android/provider/SettingsBackupTest.java b/core/tests/coretests/src/android/provider/SettingsBackupTest.java
index 5542f00..71627ab 100644
--- a/core/tests/coretests/src/android/provider/SettingsBackupTest.java
+++ b/core/tests/coretests/src/android/provider/SettingsBackupTest.java
@@ -97,6 +97,7 @@
private static final Set<String> BACKUP_BLACKLISTED_GLOBAL_SETTINGS =
newHashSet(
Settings.Global.ACTIVITY_MANAGER_CONSTANTS,
+ Settings.Global.ACTIVITY_STARTS_LOGGING_ENABLED,
Settings.Global.ADAPTIVE_BATTERY_MANAGEMENT_ENABLED,
Settings.Global.ADB_ENABLED,
Settings.Global.ADD_USERS_WHEN_LOCKED,
diff --git a/core/tests/coretests/src/com/android/internal/app/IntentForwarderActivityTest.java b/core/tests/coretests/src/com/android/internal/app/IntentForwarderActivityTest.java
index b18fa74..c165b6b 100644
--- a/core/tests/coretests/src/com/android/internal/app/IntentForwarderActivityTest.java
+++ b/core/tests/coretests/src/com/android/internal/app/IntentForwarderActivityTest.java
@@ -16,33 +16,6 @@
package com.android.internal.app;
-import android.annotation.Nullable;
-import android.content.ComponentName;
-import android.content.Context;
-import android.content.Intent;
-import android.content.pm.IPackageManager;
-import android.content.pm.PackageManager;
-import android.content.pm.UserInfo;
-import android.os.Bundle;
-import android.os.UserHandle;
-import android.os.UserManager;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.rule.ActivityTestRule;
-import android.support.test.runner.AndroidJUnit4;
-import android.util.Log;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mock;
-import org.mockito.Mockito;
-import org.mockito.MockitoAnnotations;
-
-import java.util.ArrayList;
-import java.util.List;
-
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertNotNull;
import static junit.framework.Assert.assertNull;
@@ -51,11 +24,42 @@
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.ArgumentMatchers.nullable;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
+import android.annotation.Nullable;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.pm.ActivityInfo;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.IPackageManager;
+import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
+import android.content.pm.UserInfo;
+import android.net.Uri;
+import android.os.Bundle;
+import android.os.RemoteException;
+import android.os.UserHandle;
+import android.os.UserManager;
+import android.support.test.InstrumentationRegistry;
+import android.support.test.rule.ActivityTestRule;
+import android.support.test.runner.AndroidJUnit4;
+import java.util.ArrayList;
+import java.util.List;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.ArgumentCaptor;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
@RunWith(AndroidJUnit4.class)
public class IntentForwarderActivityTest {
+
private static final ComponentName FORWARD_TO_MANAGED_PROFILE_COMPONENT_NAME =
new ComponentName(
"android",
@@ -77,22 +81,26 @@
private static IntentForwarderActivity.Injector sInjector;
private static ComponentName sComponentName;
+ private static String sActivityName;
+ private static String sPackageName;
@Mock private IPackageManager mIPm;
@Mock private PackageManager mPm;
@Mock private UserManager mUserManager;
+ @Mock private ApplicationInfo mApplicationInfo;
@Rule
public ActivityTestRule<IntentForwarderWrapperActivity> mActivityRule =
new ActivityTestRule<>(IntentForwarderWrapperActivity.class, true, false);
private Context mContext;
+ public static final String PHONE_NUMBER = "123-456-789";
@Before
public void setup() {
MockitoAnnotations.initMocks(this);
mContext = InstrumentationRegistry.getTargetContext();
- sInjector = new TestInjector();
+ sInjector = spy(new TestInjector());
}
@Test
@@ -252,6 +260,149 @@
assertEquals(MANAGED_PROFILE_INFO.id, activity.mUserIdActivityLaunchedIn);
}
+ @Test
+ public void shouldSkipDisclosure_notWhitelisted() throws RemoteException {
+ setupShouldSkipDisclosureTest();
+ Intent intent = new Intent(mContext, IntentForwarderWrapperActivity.class)
+ .setAction(Intent.ACTION_SEND)
+ .setType(TYPE_PLAIN_TEXT);
+
+ mActivityRule.launchActivity(intent);
+
+ verify(mIPm).canForwardTo(any(), any(), anyInt(), anyInt());
+ verify(sInjector).showToast(anyInt(), anyInt());
+ }
+
+ @Test
+ public void shouldSkipDisclosure_withResolverActivity() throws RemoteException {
+ setupShouldSkipDisclosureTest();
+ sActivityName = ResolverActivity.class.getName();
+ sPackageName = "android";
+ Intent intent = new Intent(mContext, IntentForwarderWrapperActivity.class)
+ .setAction(Intent.ACTION_SEND)
+ .setType(TYPE_PLAIN_TEXT);
+
+ mActivityRule.launchActivity(intent);
+
+ verify(mIPm).canForwardTo(any(), any(), anyInt(), anyInt());
+ verify(sInjector, never()).showToast(anyInt(), anyInt());
+ }
+
+ @Test
+ public void shouldSkipDisclosure_callIntent_call() throws RemoteException {
+ setupShouldSkipDisclosureTest();
+ Intent intent = new Intent(mContext, IntentForwarderWrapperActivity.class)
+ .setAction(Intent.ACTION_CALL);
+
+ mActivityRule.launchActivity(intent);
+
+ verify(mIPm).canForwardTo(any(), any(), anyInt(), anyInt());
+ verify(sInjector, never()).showToast(anyInt(), anyInt());
+ }
+
+ @Test
+ public void shouldSkipDisclosure_callIntent_dial() throws RemoteException {
+ setupShouldSkipDisclosureTest();
+ Intent intent = new Intent(mContext, IntentForwarderWrapperActivity.class)
+ .setAction(Intent.ACTION_DIAL);
+
+ mActivityRule.launchActivity(intent);
+
+ verify(mIPm).canForwardTo(any(), any(), anyInt(), anyInt());
+ verify(sInjector, never()).showToast(anyInt(), anyInt());
+ }
+
+ @Test
+ public void shouldSkipDisclosure_callIntent_notCallOrDial() throws RemoteException {
+ setupShouldSkipDisclosureTest();
+ Intent intent = new Intent(mContext, IntentForwarderWrapperActivity.class)
+ .setAction(Intent.ACTION_ALARM_CHANGED);
+
+ mActivityRule.launchActivity(intent);
+
+ verify(mIPm).canForwardTo(any(), any(), anyInt(), anyInt());
+ verify(sInjector).showToast(anyInt(), anyInt());
+ }
+
+ @Test
+ public void shouldSkipDisclosure_textMessageIntent_sms() throws RemoteException {
+ setupShouldSkipDisclosureTest();
+ Intent intent = new Intent(mContext, IntentForwarderWrapperActivity.class)
+ .setAction(Intent.ACTION_SENDTO)
+ .setData(Uri.fromParts("sms", PHONE_NUMBER, null));
+
+ mActivityRule.launchActivity(intent);
+
+ verify(mIPm).canForwardTo(any(), any(), anyInt(), anyInt());
+ verify(sInjector, never()).showToast(anyInt(), anyInt());
+ }
+
+ @Test
+ public void shouldSkipDisclosure_textMessageIntent_smsto() throws RemoteException {
+ setupShouldSkipDisclosureTest();
+ Intent intent = new Intent(mContext, IntentForwarderWrapperActivity.class)
+ .setAction(Intent.ACTION_SENDTO)
+ .setData(Uri.fromParts("smsto", PHONE_NUMBER, null));
+
+ mActivityRule.launchActivity(intent);
+
+ verify(mIPm).canForwardTo(any(), any(), anyInt(), anyInt());
+ verify(sInjector, never()).showToast(anyInt(), anyInt());
+ }
+
+ @Test
+ public void shouldSkipDisclosure_textMessageIntent_mms() throws RemoteException {
+ setupShouldSkipDisclosureTest();
+ Intent intent = new Intent(mContext, IntentForwarderWrapperActivity.class)
+ .setAction(Intent.ACTION_SENDTO)
+ .setData(Uri.fromParts("mms", PHONE_NUMBER, null));
+
+ mActivityRule.launchActivity(intent);
+
+ verify(mIPm).canForwardTo(any(), any(), anyInt(), anyInt());
+ verify(sInjector, never()).showToast(anyInt(), anyInt());
+ }
+
+ @Test
+ public void shouldSkipDisclosure_textMessageIntent_mmsto() throws RemoteException {
+ setupShouldSkipDisclosureTest();
+ Intent intent = new Intent(mContext, IntentForwarderWrapperActivity.class)
+ .setAction(Intent.ACTION_SENDTO)
+ .setData(Uri.fromParts("mmsto", PHONE_NUMBER, null));
+
+ mActivityRule.launchActivity(intent);
+
+ verify(mIPm).canForwardTo(any(), any(), anyInt(), anyInt());
+ verify(sInjector, never()).showToast(anyInt(), anyInt());
+ }
+
+ @Test
+ public void shouldSkipDisclosure_textMessageIntent_invalidUri() throws RemoteException {
+ setupShouldSkipDisclosureTest();
+ Intent intent = new Intent(mContext, IntentForwarderWrapperActivity.class)
+ .setAction(Intent.ACTION_SENDTO)
+ .setData(Uri.fromParts("invalid", PHONE_NUMBER, null));
+
+ mActivityRule.launchActivity(intent);
+
+ verify(mIPm).canForwardTo(any(), any(), anyInt(), anyInt());
+ verify(sInjector).showToast(anyInt(), anyInt());
+ }
+
+ private void setupShouldSkipDisclosureTest() throws RemoteException {
+ sComponentName = FORWARD_TO_MANAGED_PROFILE_COMPONENT_NAME;
+ sActivityName = "MyTestActivity";
+ sPackageName = "test.package.name";
+ when(mApplicationInfo.isSystemApp()).thenReturn(true);
+ // Managed profile exists.
+ List<UserInfo> profiles = new ArrayList<>();
+ profiles.add(CURRENT_USER_INFO);
+ profiles.add(MANAGED_PROFILE_INFO);
+ when(mUserManager.getProfiles(anyInt())).thenReturn(profiles);
+ // Intent can be forwarded.
+ when(mIPm.canForwardTo(
+ any(Intent.class), nullable(String.class), anyInt(), anyInt())).thenReturn(true);
+ }
public static class IntentForwarderWrapperActivity extends IntentForwarderActivity {
private Intent mStartActivityIntent;
@@ -276,7 +427,7 @@
}
}
- class TestInjector implements IntentForwarderActivity.Injector {
+ public class TestInjector implements IntentForwarderActivity.Injector {
@Override
public IPackageManager getIPackageManager() {
@@ -292,5 +443,21 @@
public PackageManager getPackageManager() {
return mPm;
}
+
+ @Override
+ public ResolveInfo resolveActivityAsUser(Intent intent, int flags, int userId) {
+ ActivityInfo activityInfo = new ActivityInfo();
+ activityInfo.packageName = sPackageName;
+ activityInfo.name = sActivityName;
+ activityInfo.applicationInfo = mApplicationInfo;
+
+ ResolveInfo resolveInfo = new ResolveInfo();
+ resolveInfo.activityInfo = activityInfo;
+
+ return resolveInfo;
+ }
+
+ @Override
+ public void showToast(int messageId, int duration) {}
}
}
\ No newline at end of file
diff --git a/core/tests/coretests/src/com/android/internal/os/BinderCallsStatsTest.java b/core/tests/coretests/src/com/android/internal/os/BinderCallsStatsTest.java
index 2f83190..ace6b2d 100644
--- a/core/tests/coretests/src/com/android/internal/os/BinderCallsStatsTest.java
+++ b/core/tests/coretests/src/com/android/internal/os/BinderCallsStatsTest.java
@@ -16,7 +16,8 @@
package com.android.internal.os;
-import android.content.Context;
+import static org.junit.Assert.assertEquals;
+
import android.content.Intent;
import android.os.BatteryManager;
import android.os.Binder;
@@ -33,17 +34,15 @@
import org.junit.Test;
import org.junit.runner.RunWith;
+
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
-import java.util.Map;
import java.util.Random;
-import static org.junit.Assert.assertEquals;
-
@SmallTest
@RunWith(AndroidJUnit4.class)
@Presubmit
@@ -91,7 +90,7 @@
assertEquals(1, uidEntry.recordedCallCount);
// Still sampled even for another API.
callStatsList = new ArrayList(uidEntry.getCallStatsList());
- assertEquals(2, callStatsList.size());
+ assertEquals(1, callStatsList.size());
}
@Test
@@ -222,20 +221,13 @@
assertEquals(10, uidEntry.cpuTimeMicros);
List<BinderCallsStats.CallStat> callStatsList = new ArrayList(uidEntry.getCallStatsList());
- assertEquals(2, callStatsList.size());
+ assertEquals(1, callStatsList.size());
BinderCallsStats.CallStat callStats = callStatsList.get(0);
assertEquals(1, callStats.callCount);
assertEquals(1, callStats.recordedCallCount);
assertEquals(10, callStats.cpuTimeMicros);
assertEquals(10, callStats.maxCpuTimeMicros);
-
- // Only call count should is tracked, rest is sampled.
- callStats = callStatsList.get(1);
- assertEquals(1, callStats.callCount);
- assertEquals(0, callStats.recordedCallCount);
- assertEquals(0, callStats.cpuTimeMicros);
- assertEquals(0, callStats.maxCpuTimeMicros);
}
private static class BinderWithGetTransactionName extends Binder {
@@ -587,6 +579,7 @@
};
}
});
+ setSamplingInterval(1);
}
@Override
diff --git a/data/keyboards/Vendor_054c_Product_0268.kl b/data/keyboards/Vendor_054c_Product_0268.kl
index 7c60137..522db3c 100644
--- a/data/keyboards/Vendor_054c_Product_0268.kl
+++ b/data/keyboards/Vendor_054c_Product_0268.kl
@@ -35,7 +35,7 @@
key 0x122 BUTTON_THUMBR
# PS key
-key 0x2d0 HOME
+key 0x2d0 BUTTON_MODE
# Left Analog Stick
axis 0x00 X
diff --git a/native/android/OWNERS b/native/android/OWNERS
index 11d4be4..067cdf8 100644
--- a/native/android/OWNERS
+++ b/native/android/OWNERS
@@ -1,11 +1,15 @@
set noparent
+per-file libandroid_net.map.txt=codewiz@google.com
per-file libandroid_net.map.txt=ek@google.com
per-file libandroid_net.map.txt=jchalard@google.com
per-file libandroid_net.map.txt=lorenzo@google.com
+per-file libandroid_net.map.txt=reminv@google.com
per-file libandroid_net.map.txt=satk@google.com
+per-file net.c=codewiz@google.com
per-file net.c=ek@google.com
per-file net.c=jchalard@google.com
per-file net.c=lorenzo@google.com
+per-file net.c=reminv@google.com
per-file net.c=satk@google.com
diff --git a/packages/CaptivePortalLogin/OWNERS b/packages/CaptivePortalLogin/OWNERS
index ce50558..7311eee 100644
--- a/packages/CaptivePortalLogin/OWNERS
+++ b/packages/CaptivePortalLogin/OWNERS
@@ -1,6 +1,8 @@
set noparent
+codewiz@google.com
ek@google.com
jchalard@google.com
lorenzo@google.com
+reminv@google.com
satk@google.com
diff --git a/packages/SettingsLib/res/values-af/strings.xml b/packages/SettingsLib/res/values-af/strings.xml
index 9bacaf33..0887010 100644
--- a/packages/SettingsLib/res/values-af/strings.xml
+++ b/packages/SettingsLib/res/values-af/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"op <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Tydsduur"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Vra elke keer"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Sopas"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-am/strings.xml b/packages/SettingsLib/res/values-am/strings.xml
index 329e9fe..b69618d 100644
--- a/packages/SettingsLib/res/values-am/strings.xml
+++ b/packages/SettingsLib/res/values-am/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"በ<xliff:g id="WHEN">%1$s</xliff:g> ላይ"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"የቆይታ ጊዜ"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"ሁልጊዜ ጠይቅ"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"ልክ አሁን"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-ar/strings.xml b/packages/SettingsLib/res/values-ar/strings.xml
index 846f5d8..37e8346 100644
--- a/packages/SettingsLib/res/values-ar/strings.xml
+++ b/packages/SettingsLib/res/values-ar/strings.xml
@@ -453,5 +453,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"يوم <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"المدة"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"الطلب في كل مرة"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"للتو"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-as/strings.xml b/packages/SettingsLib/res/values-as/strings.xml
index e3b4bc9..787d4d5 100644
--- a/packages/SettingsLib/res/values-as/strings.xml
+++ b/packages/SettingsLib/res/values-as/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"<xliff:g id="WHEN">%1$s</xliff:g> বজাত"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"সময়সীমা"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"প্ৰতিবাৰতে সোধক"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"এই মাত্ৰ"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-az/strings.xml b/packages/SettingsLib/res/values-az/strings.xml
index 5a49c62..e321126 100644
--- a/packages/SettingsLib/res/values-az/strings.xml
+++ b/packages/SettingsLib/res/values-az/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"<xliff:g id="WHEN">%1$s</xliff:g> olduqda"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Müddət"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Hər dəfə soruşun"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"İndicə"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-b+sr+Latn/strings.xml b/packages/SettingsLib/res/values-b+sr+Latn/strings.xml
index 75999a4..b4ea7b9 100644
--- a/packages/SettingsLib/res/values-b+sr+Latn/strings.xml
+++ b/packages/SettingsLib/res/values-b+sr+Latn/strings.xml
@@ -450,5 +450,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"<xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Trajanje"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Uvek pitaj"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Upravo sada"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-be/strings.xml b/packages/SettingsLib/res/values-be/strings.xml
index 6541383..630d697 100644
--- a/packages/SettingsLib/res/values-be/strings.xml
+++ b/packages/SettingsLib/res/values-be/strings.xml
@@ -451,5 +451,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"у <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Працягласць"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Заўсёды пытацца"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Зараз"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-bg/strings.xml b/packages/SettingsLib/res/values-bg/strings.xml
index 6761140..aa42e0a 100644
--- a/packages/SettingsLib/res/values-bg/strings.xml
+++ b/packages/SettingsLib/res/values-bg/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"в/ъв <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Времетраене"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Да се пита винаги"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Току-що"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-bn/strings.xml b/packages/SettingsLib/res/values-bn/strings.xml
index 66f5c07..c11b58e 100644
--- a/packages/SettingsLib/res/values-bn/strings.xml
+++ b/packages/SettingsLib/res/values-bn/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"তারিখ ও সময় <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"সময়কাল"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"প্রতিবার জিজ্ঞেস করা হবে"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"এখনই"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-bs/strings.xml b/packages/SettingsLib/res/values-bs/strings.xml
index e049f6f..887a74b 100644
--- a/packages/SettingsLib/res/values-bs/strings.xml
+++ b/packages/SettingsLib/res/values-bs/strings.xml
@@ -450,5 +450,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"u <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Trajanje"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Pitaj svaki put"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Upravo"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-ca/strings.xml b/packages/SettingsLib/res/values-ca/strings.xml
index d30be58..7d35095 100644
--- a/packages/SettingsLib/res/values-ca/strings.xml
+++ b/packages/SettingsLib/res/values-ca/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"Data: <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Durada"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Pregunta sempre"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Ara mateix"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-cs/strings.xml b/packages/SettingsLib/res/values-cs/strings.xml
index a90231a..1057ae0 100644
--- a/packages/SettingsLib/res/values-cs/strings.xml
+++ b/packages/SettingsLib/res/values-cs/strings.xml
@@ -451,5 +451,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"v <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Trvání"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Pokaždé se zeptat"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Právě teď"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-da/strings.xml b/packages/SettingsLib/res/values-da/strings.xml
index fbedd90..6cd1855 100644
--- a/packages/SettingsLib/res/values-da/strings.xml
+++ b/packages/SettingsLib/res/values-da/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"på <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Varighed"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Spørg hver gang"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Lige nu"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-de/strings.xml b/packages/SettingsLib/res/values-de/strings.xml
index 6fb0fc9..aaacc29 100644
--- a/packages/SettingsLib/res/values-de/strings.xml
+++ b/packages/SettingsLib/res/values-de/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"am <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Dauer"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Jedes Mal fragen"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Gerade eben"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-el/strings.xml b/packages/SettingsLib/res/values-el/strings.xml
index 336075f..eb8346d 100644
--- a/packages/SettingsLib/res/values-el/strings.xml
+++ b/packages/SettingsLib/res/values-el/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"το/τη(ν) <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Διάρκεια"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Να ερωτώμαι κάθε φορά"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Μόλις τώρα"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-en-rAU/strings.xml b/packages/SettingsLib/res/values-en-rAU/strings.xml
index e028e73..a00f018 100644
--- a/packages/SettingsLib/res/values-en-rAU/strings.xml
+++ b/packages/SettingsLib/res/values-en-rAU/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"on <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Duration"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Ask every time"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Just now"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-en-rCA/strings.xml b/packages/SettingsLib/res/values-en-rCA/strings.xml
index e028e73..a00f018 100644
--- a/packages/SettingsLib/res/values-en-rCA/strings.xml
+++ b/packages/SettingsLib/res/values-en-rCA/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"on <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Duration"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Ask every time"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Just now"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-en-rGB/strings.xml b/packages/SettingsLib/res/values-en-rGB/strings.xml
index e028e73..a00f018 100644
--- a/packages/SettingsLib/res/values-en-rGB/strings.xml
+++ b/packages/SettingsLib/res/values-en-rGB/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"on <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Duration"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Ask every time"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Just now"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-en-rIN/strings.xml b/packages/SettingsLib/res/values-en-rIN/strings.xml
index e028e73..a00f018 100644
--- a/packages/SettingsLib/res/values-en-rIN/strings.xml
+++ b/packages/SettingsLib/res/values-en-rIN/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"on <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Duration"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Ask every time"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Just now"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-en-rXC/strings.xml b/packages/SettingsLib/res/values-en-rXC/strings.xml
index 5e046e0..0b70def 100644
--- a/packages/SettingsLib/res/values-en-rXC/strings.xml
+++ b/packages/SettingsLib/res/values-en-rXC/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"on <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Duration"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Ask every time"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Just now"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-es-rUS/strings.xml b/packages/SettingsLib/res/values-es-rUS/strings.xml
index 6c4f3b0..9085adb 100644
--- a/packages/SettingsLib/res/values-es-rUS/strings.xml
+++ b/packages/SettingsLib/res/values-es-rUS/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"el <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Duración"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Preguntar siempre"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Recién"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-es/strings.xml b/packages/SettingsLib/res/values-es/strings.xml
index f04767b..038dfd4 100644
--- a/packages/SettingsLib/res/values-es/strings.xml
+++ b/packages/SettingsLib/res/values-es/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"Fecha: <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Duración"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Preguntar siempre"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Justo ahora"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-et/strings.xml b/packages/SettingsLib/res/values-et/strings.xml
index 1f50226..d9a93c9 100644
--- a/packages/SettingsLib/res/values-et/strings.xml
+++ b/packages/SettingsLib/res/values-et/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"– <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Kestus"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Küsi iga kord"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Äsja"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-eu/strings.xml b/packages/SettingsLib/res/values-eu/strings.xml
index 0410977..739eaf0 100644
--- a/packages/SettingsLib/res/values-eu/strings.xml
+++ b/packages/SettingsLib/res/values-eu/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"data: <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Iraupena"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Galdetu beti"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Oraintxe"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-fa/strings.xml b/packages/SettingsLib/res/values-fa/strings.xml
index 447ce3c..18fb3e2 100644
--- a/packages/SettingsLib/res/values-fa/strings.xml
+++ b/packages/SettingsLib/res/values-fa/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"روز <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"مدت"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"هربار پرسیده شود"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"هماکنون"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-fi/strings.xml b/packages/SettingsLib/res/values-fi/strings.xml
index 377f8ce..3858486 100644
--- a/packages/SettingsLib/res/values-fi/strings.xml
+++ b/packages/SettingsLib/res/values-fi/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"<xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Kesto"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Kysy aina"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Äsken"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-fr-rCA/strings.xml b/packages/SettingsLib/res/values-fr-rCA/strings.xml
index 67e7779..36efa53 100644
--- a/packages/SettingsLib/res/values-fr-rCA/strings.xml
+++ b/packages/SettingsLib/res/values-fr-rCA/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"le <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Durée"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Toujours demander"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"À l\'instant"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-fr/strings.xml b/packages/SettingsLib/res/values-fr/strings.xml
index e94dd73..9cadd3c 100644
--- a/packages/SettingsLib/res/values-fr/strings.xml
+++ b/packages/SettingsLib/res/values-fr/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"le <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Durée"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Toujours demander"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"À l\'instant"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-gl/strings.xml b/packages/SettingsLib/res/values-gl/strings.xml
index 3e55dc3..82a56e6 100644
--- a/packages/SettingsLib/res/values-gl/strings.xml
+++ b/packages/SettingsLib/res/values-gl/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"na seguinte data: <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Duración"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Preguntar sempre"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Agora mesmo"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-gu/strings.xml b/packages/SettingsLib/res/values-gu/strings.xml
index bccf0e6..2af406d 100644
--- a/packages/SettingsLib/res/values-gu/strings.xml
+++ b/packages/SettingsLib/res/values-gu/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"<xliff:g id="WHEN">%1$s</xliff:g> વાગ્યે"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"અવધિ"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"દર વખતે પૂછો"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"હમણાં જ"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-hi/strings.xml b/packages/SettingsLib/res/values-hi/strings.xml
index c5d662c..4bd79f9 100644
--- a/packages/SettingsLib/res/values-hi/strings.xml
+++ b/packages/SettingsLib/res/values-hi/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"अलार्म <xliff:g id="WHEN">%1$s</xliff:g> को बजेगा"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"अवधि"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"हर बार पूछें"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"अभी-अभी"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-hr/strings.xml b/packages/SettingsLib/res/values-hr/strings.xml
index f269c38..8eb41b5 100644
--- a/packages/SettingsLib/res/values-hr/strings.xml
+++ b/packages/SettingsLib/res/values-hr/strings.xml
@@ -450,5 +450,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"u <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Trajanje"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Pitaj svaki put"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Upravo sad"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-hu/strings.xml b/packages/SettingsLib/res/values-hu/strings.xml
index a09a4ff..5fee933 100644
--- a/packages/SettingsLib/res/values-hu/strings.xml
+++ b/packages/SettingsLib/res/values-hu/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"ezen a napon: <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Időtartam"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Mindig kérdezzen rá"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Az imént"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-hy/strings.xml b/packages/SettingsLib/res/values-hy/strings.xml
index c808fe7..8f68ac7 100644
--- a/packages/SettingsLib/res/values-hy/strings.xml
+++ b/packages/SettingsLib/res/values-hy/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"<xliff:g id="WHEN">%1$s</xliff:g>-ին"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Տևողություն"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Հարցնել ամեն անգամ"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Հենց նոր"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-in/strings.xml b/packages/SettingsLib/res/values-in/strings.xml
index e4b12e4..7c18a83 100644
--- a/packages/SettingsLib/res/values-in/strings.xml
+++ b/packages/SettingsLib/res/values-in/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"pada <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Durasi"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Selalu tanya"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Baru saja"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-is/strings.xml b/packages/SettingsLib/res/values-is/strings.xml
index 61510c2..0f2d55e 100644
--- a/packages/SettingsLib/res/values-is/strings.xml
+++ b/packages/SettingsLib/res/values-is/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"á/í <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Lengd"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Spyrja í hvert skipti"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Rétt í þessu"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-it/strings.xml b/packages/SettingsLib/res/values-it/strings.xml
index 546495b..f44fbb3 100644
--- a/packages/SettingsLib/res/values-it/strings.xml
+++ b/packages/SettingsLib/res/values-it/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"il giorno <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Durata"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Chiedi ogni volta"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Adesso"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-iw/strings.xml b/packages/SettingsLib/res/values-iw/strings.xml
index 015487a..c1d858c 100644
--- a/packages/SettingsLib/res/values-iw/strings.xml
+++ b/packages/SettingsLib/res/values-iw/strings.xml
@@ -451,5 +451,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"ב-<xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"משך"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"שאל בכל פעם"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"הרגע"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-ja/strings.xml b/packages/SettingsLib/res/values-ja/strings.xml
index b2a6bd0..d59c611 100644
--- a/packages/SettingsLib/res/values-ja/strings.xml
+++ b/packages/SettingsLib/res/values-ja/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"<xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"期間"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"毎回確認"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"たった今"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-ka/strings.xml b/packages/SettingsLib/res/values-ka/strings.xml
index bd09bf1..4418bef 100644
--- a/packages/SettingsLib/res/values-ka/strings.xml
+++ b/packages/SettingsLib/res/values-ka/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"<xliff:g id="WHEN">%1$s</xliff:g>-ზე"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"ხანგრძლივობა"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"ყოველთვის მკითხეთ"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"ახლახან"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-kk/strings.xml b/packages/SettingsLib/res/values-kk/strings.xml
index 005ee6d..88669a7 100644
--- a/packages/SettingsLib/res/values-kk/strings.xml
+++ b/packages/SettingsLib/res/values-kk/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"Уақыты: <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Ұзақтығы"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Әрдайым сұрау"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Дәл қазір"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-km/strings.xml b/packages/SettingsLib/res/values-km/strings.xml
index d90a89f..509dafa 100644
--- a/packages/SettingsLib/res/values-km/strings.xml
+++ b/packages/SettingsLib/res/values-km/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"នៅថ្ងៃ <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"រយៈពេល"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"សួរគ្រប់ពេល"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"អម្បាញ់មិញ"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-kn/strings.xml b/packages/SettingsLib/res/values-kn/strings.xml
index af7890e..f01fac7 100644
--- a/packages/SettingsLib/res/values-kn/strings.xml
+++ b/packages/SettingsLib/res/values-kn/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"<xliff:g id="WHEN">%1$s</xliff:g> ಕ್ಕೆ"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"ಅವಧಿ"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"ಪ್ರತಿ ಬಾರಿ ಕೇಳಿ"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"ಇದೀಗ"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-ko/strings.xml b/packages/SettingsLib/res/values-ko/strings.xml
index 14ce137..34fa2ae 100644
--- a/packages/SettingsLib/res/values-ko/strings.xml
+++ b/packages/SettingsLib/res/values-ko/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"일시: <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"지속 시간"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"항상 확인"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"조금 전"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-ky/strings.xml b/packages/SettingsLib/res/values-ky/strings.xml
index 109c47e..0a3bd80 100644
--- a/packages/SettingsLib/res/values-ky/strings.xml
+++ b/packages/SettingsLib/res/values-ky/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"<xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Узактыгы"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Ар дайым суралсын"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Азыр эле"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-lo/strings.xml b/packages/SettingsLib/res/values-lo/strings.xml
index 4034a7e..2853fee 100644
--- a/packages/SettingsLib/res/values-lo/strings.xml
+++ b/packages/SettingsLib/res/values-lo/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"ເວລາ <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"ໄລຍະເວລາ"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"ຖາມທຸກເທື່ອ"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"ຕອນນີ້"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-lt/strings.xml b/packages/SettingsLib/res/values-lt/strings.xml
index c974812..3866922 100644
--- a/packages/SettingsLib/res/values-lt/strings.xml
+++ b/packages/SettingsLib/res/values-lt/strings.xml
@@ -451,5 +451,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"<xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Trukmė"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Klausti kaskart"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Ką tik"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-lv/strings.xml b/packages/SettingsLib/res/values-lv/strings.xml
index 80aa917..6133f7f 100644
--- a/packages/SettingsLib/res/values-lv/strings.xml
+++ b/packages/SettingsLib/res/values-lv/strings.xml
@@ -450,5 +450,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"<xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Ilgums"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Vaicāt katru reizi"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Tikko"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-mk/strings.xml b/packages/SettingsLib/res/values-mk/strings.xml
index 534dc2a..0a27a06 100644
--- a/packages/SettingsLib/res/values-mk/strings.xml
+++ b/packages/SettingsLib/res/values-mk/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"во <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Времетраење"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Секогаш прашувај"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Неодамнешни"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-ml/strings.xml b/packages/SettingsLib/res/values-ml/strings.xml
index 01d7107..8601d97 100644
--- a/packages/SettingsLib/res/values-ml/strings.xml
+++ b/packages/SettingsLib/res/values-ml/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"<xliff:g id="WHEN">%1$s</xliff:g>-ന്"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"ദൈർഘ്യം"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"എപ്പോഴും ചോദിക്കുക"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"ഇപ്പോൾ"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-mn/strings.xml b/packages/SettingsLib/res/values-mn/strings.xml
index 960f3e1..62dd1e9 100644
--- a/packages/SettingsLib/res/values-mn/strings.xml
+++ b/packages/SettingsLib/res/values-mn/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"<xliff:g id="WHEN">%1$s</xliff:g>-д"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Хугацаа"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Тухай бүрт асуух"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Дөнгөж сая"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-mr/strings.xml b/packages/SettingsLib/res/values-mr/strings.xml
index 6e89a84..9428338 100644
--- a/packages/SettingsLib/res/values-mr/strings.xml
+++ b/packages/SettingsLib/res/values-mr/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"<xliff:g id="WHEN">%1$s</xliff:g> रोजी"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"कालावधी"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"प्रत्येक वेळी विचारा"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"आत्ताच"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-ms/strings.xml b/packages/SettingsLib/res/values-ms/strings.xml
index f3f9eb6..47d4cbc 100644
--- a/packages/SettingsLib/res/values-ms/strings.xml
+++ b/packages/SettingsLib/res/values-ms/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"pada <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Tempoh"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Tanya setiap kali"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Sebentar tadi"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-my/strings.xml b/packages/SettingsLib/res/values-my/strings.xml
index adae0d2..40e351a 100644
--- a/packages/SettingsLib/res/values-my/strings.xml
+++ b/packages/SettingsLib/res/values-my/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"<xliff:g id="WHEN">%1$s</xliff:g> တွင်"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"ကြာချိန်"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"အမြဲမေးပါ"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"ယခုလေးတင်"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-nb/strings.xml b/packages/SettingsLib/res/values-nb/strings.xml
index a3293e5..a9637c1 100644
--- a/packages/SettingsLib/res/values-nb/strings.xml
+++ b/packages/SettingsLib/res/values-nb/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"<xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Varighet"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Spør hver gang"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Nå nettopp"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-ne/strings.xml b/packages/SettingsLib/res/values-ne/strings.xml
index ca6fe88..6ae6a22 100644
--- a/packages/SettingsLib/res/values-ne/strings.xml
+++ b/packages/SettingsLib/res/values-ne/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"<xliff:g id="WHEN">%1$s</xliff:g> मा"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"अवधि"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"प्रत्येक पटक सोध्नुहोस्"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"अहिले भर्खरै"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-nl/strings.xml b/packages/SettingsLib/res/values-nl/strings.xml
index a5d68ec..e6a7e0a 100644
--- a/packages/SettingsLib/res/values-nl/strings.xml
+++ b/packages/SettingsLib/res/values-nl/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"op <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Duur"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Altijd vragen"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Zojuist"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-or/strings.xml b/packages/SettingsLib/res/values-or/strings.xml
index 987d075..3532e89 100644
--- a/packages/SettingsLib/res/values-or/strings.xml
+++ b/packages/SettingsLib/res/values-or/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"<xliff:g id="WHEN">%1$s</xliff:g> ବେଳେ"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"ଅବଧି"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"ପ୍ରତ୍ୟେକ ଥର ପଚାରନ୍ତୁ"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"ଏହିକ୍ଷଣି"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-pa/strings.xml b/packages/SettingsLib/res/values-pa/strings.xml
index 995ebfe..ff1f4f3 100644
--- a/packages/SettingsLib/res/values-pa/strings.xml
+++ b/packages/SettingsLib/res/values-pa/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"<xliff:g id="WHEN">%1$s</xliff:g> ਵਜੇ"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"ਮਿਆਦ"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"ਹਰ ਵਾਰ ਪੁੱਛੋ"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"ਹੁਣੇ ਹੀ"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-pl/strings.xml b/packages/SettingsLib/res/values-pl/strings.xml
index e472b15..7ff80c9 100644
--- a/packages/SettingsLib/res/values-pl/strings.xml
+++ b/packages/SettingsLib/res/values-pl/strings.xml
@@ -451,5 +451,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"w: <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Czas"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Zawsze pytaj"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Przed chwilą"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-pt-rBR/strings.xml b/packages/SettingsLib/res/values-pt-rBR/strings.xml
index 98b877be..585aee6 100644
--- a/packages/SettingsLib/res/values-pt-rBR/strings.xml
+++ b/packages/SettingsLib/res/values-pt-rBR/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"<xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Duração"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Perguntar sempre"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Agora"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-pt-rPT/strings.xml b/packages/SettingsLib/res/values-pt-rPT/strings.xml
index ce40198..e41acde 100644
--- a/packages/SettingsLib/res/values-pt-rPT/strings.xml
+++ b/packages/SettingsLib/res/values-pt-rPT/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"no(a) <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Duração"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Perguntar sempre"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Agora mesmo"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-pt/strings.xml b/packages/SettingsLib/res/values-pt/strings.xml
index 98b877be..585aee6 100644
--- a/packages/SettingsLib/res/values-pt/strings.xml
+++ b/packages/SettingsLib/res/values-pt/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"<xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Duração"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Perguntar sempre"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Agora"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-ro/arrays.xml b/packages/SettingsLib/res/values-ro/arrays.xml
index e4a341a..7935a2a 100644
--- a/packages/SettingsLib/res/values-ro/arrays.xml
+++ b/packages/SettingsLib/res/values-ro/arrays.xml
@@ -22,7 +22,7 @@
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string-array name="wifi_status">
<item msgid="1922181315419294640"></item>
- <item msgid="8934131797783724664">"În curs de scanare..."</item>
+ <item msgid="8934131797783724664">"Se caută..."</item>
<item msgid="8513729475867537913">"Se conectează..."</item>
<item msgid="515055375277271756">"În curs de autentificare…"</item>
<item msgid="1943354004029184381">"Se obține adresa IP..."</item>
@@ -36,7 +36,7 @@
</string-array>
<string-array name="wifi_status_with_ssid">
<item msgid="7714855332363650812"></item>
- <item msgid="8878186979715711006">"În curs de scanare..."</item>
+ <item msgid="8878186979715711006">"Se caută..."</item>
<item msgid="355508996603873860">"Se conectează la <xliff:g id="NETWORK_NAME">%1$s</xliff:g>..."</item>
<item msgid="554971459996405634">"Se autentifică cu <xliff:g id="NETWORK_NAME">%1$s</xliff:g>…"</item>
<item msgid="7928343808033020343">"Se obține adresa IP de la <xliff:g id="NETWORK_NAME">%1$s</xliff:g>…"</item>
diff --git a/packages/SettingsLib/res/values-ro/strings.xml b/packages/SettingsLib/res/values-ro/strings.xml
index b53a3e3..8024047 100644
--- a/packages/SettingsLib/res/values-ro/strings.xml
+++ b/packages/SettingsLib/res/values-ro/strings.xml
@@ -450,5 +450,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"<xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Durată"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Întreabă de fiecare dată"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Chiar acum"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-ru/strings.xml b/packages/SettingsLib/res/values-ru/strings.xml
index a421c72..494d107 100644
--- a/packages/SettingsLib/res/values-ru/strings.xml
+++ b/packages/SettingsLib/res/values-ru/strings.xml
@@ -451,5 +451,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"<xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Длительность"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Всегда спрашивать"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Только что"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-si/strings.xml b/packages/SettingsLib/res/values-si/strings.xml
index 6916787..21c96f1 100644
--- a/packages/SettingsLib/res/values-si/strings.xml
+++ b/packages/SettingsLib/res/values-si/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"<xliff:g id="WHEN">%1$s</xliff:g>හිදී"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"කාල සීමාව"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"සෑම විටම ඉල්ලන්න"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"මේ දැන්"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-sk/strings.xml b/packages/SettingsLib/res/values-sk/strings.xml
index fc30b70..4a92357 100644
--- a/packages/SettingsLib/res/values-sk/strings.xml
+++ b/packages/SettingsLib/res/values-sk/strings.xml
@@ -451,5 +451,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"o <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Trvanie"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Vždy sa opýtať"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Teraz"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-sl/strings.xml b/packages/SettingsLib/res/values-sl/strings.xml
index 458f7f1..fb17c17 100644
--- a/packages/SettingsLib/res/values-sl/strings.xml
+++ b/packages/SettingsLib/res/values-sl/strings.xml
@@ -451,5 +451,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"v <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Trajanje"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Vedno vprašaj"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Pravkar"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-sq/strings.xml b/packages/SettingsLib/res/values-sq/strings.xml
index cab1201..a8e9a76 100644
--- a/packages/SettingsLib/res/values-sq/strings.xml
+++ b/packages/SettingsLib/res/values-sq/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"ditën <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Kohëzgjatja"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Pyet çdo herë"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Pikërisht tani"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-sr/strings.xml b/packages/SettingsLib/res/values-sr/strings.xml
index d2ebb18..fe158a0 100644
--- a/packages/SettingsLib/res/values-sr/strings.xml
+++ b/packages/SettingsLib/res/values-sr/strings.xml
@@ -450,5 +450,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"<xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Трајање"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Увек питај"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Управо сада"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-sv/strings.xml b/packages/SettingsLib/res/values-sv/strings.xml
index 0f33159..99e915a 100644
--- a/packages/SettingsLib/res/values-sv/strings.xml
+++ b/packages/SettingsLib/res/values-sv/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"på <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Varaktighet"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Fråga varje gång"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Nyss"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-sw/strings.xml b/packages/SettingsLib/res/values-sw/strings.xml
index 2d752ea..ce06a62 100644
--- a/packages/SettingsLib/res/values-sw/strings.xml
+++ b/packages/SettingsLib/res/values-sw/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"siku ya <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Muda"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Uliza kila wakati"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Sasa hivi"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-ta/strings.xml b/packages/SettingsLib/res/values-ta/strings.xml
index 5f63fee..9c8a2f1 100644
--- a/packages/SettingsLib/res/values-ta/strings.xml
+++ b/packages/SettingsLib/res/values-ta/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"அலாரம்: <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"கால அளவு"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"ஒவ்வொரு முறையும் கேள்"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"சற்றுமுன்"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-te/strings.xml b/packages/SettingsLib/res/values-te/strings.xml
index c30b9cd..cb2403c 100644
--- a/packages/SettingsLib/res/values-te/strings.xml
+++ b/packages/SettingsLib/res/values-te/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"<xliff:g id="WHEN">%1$s</xliff:g>కి"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"వ్యవధి"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"ప్రతిసారి అడుగు"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"ఇప్పుడే"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-th/strings.xml b/packages/SettingsLib/res/values-th/strings.xml
index b937a7d..e89a4d0 100644
--- a/packages/SettingsLib/res/values-th/strings.xml
+++ b/packages/SettingsLib/res/values-th/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"วัน<xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"ระยะเวลา"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"ถามทุกครั้ง"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"เมื่อสักครู่"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-tl/strings.xml b/packages/SettingsLib/res/values-tl/strings.xml
index 2e62dc0..e527eec 100644
--- a/packages/SettingsLib/res/values-tl/strings.xml
+++ b/packages/SettingsLib/res/values-tl/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"sa <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Tagal"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Magtanong palagi"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Ngayon lang"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-tr/strings.xml b/packages/SettingsLib/res/values-tr/strings.xml
index 0995a80..2f7f2f6 100644
--- a/packages/SettingsLib/res/values-tr/strings.xml
+++ b/packages/SettingsLib/res/values-tr/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"zaman: <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Süre"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Her zaman sor"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Az önce"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-uk/strings.xml b/packages/SettingsLib/res/values-uk/strings.xml
index 06fe036..cb99b5d 100644
--- a/packages/SettingsLib/res/values-uk/strings.xml
+++ b/packages/SettingsLib/res/values-uk/strings.xml
@@ -451,5 +451,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"<xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Тривалість"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Запитувати щоразу"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Щойно"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-ur/strings.xml b/packages/SettingsLib/res/values-ur/strings.xml
index 6b33df7..af5e83c 100644
--- a/packages/SettingsLib/res/values-ur/strings.xml
+++ b/packages/SettingsLib/res/values-ur/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"<xliff:g id="WHEN">%1$s</xliff:g> بجے"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"مدت"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"ہر بار پوچھیں"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"ابھی ابھی"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-uz/strings.xml b/packages/SettingsLib/res/values-uz/strings.xml
index fdb6bb6..0072db8 100644
--- a/packages/SettingsLib/res/values-uz/strings.xml
+++ b/packages/SettingsLib/res/values-uz/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"<xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Davomiyligi"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Har safar so‘ralsin"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Hozir"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-vi/strings.xml b/packages/SettingsLib/res/values-vi/strings.xml
index 8872108..b3b5a45 100644
--- a/packages/SettingsLib/res/values-vi/strings.xml
+++ b/packages/SettingsLib/res/values-vi/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"vào <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Thời lượng"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Luôn hỏi"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Vừa xong"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-zh-rCN/strings.xml b/packages/SettingsLib/res/values-zh-rCN/strings.xml
index addad73..cdd069b 100644
--- a/packages/SettingsLib/res/values-zh-rCN/strings.xml
+++ b/packages/SettingsLib/res/values-zh-rCN/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"时间:<xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"持续时间"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"每次都询问"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"刚刚"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-zh-rHK/strings.xml b/packages/SettingsLib/res/values-zh-rHK/strings.xml
index 8054548..f7b6fc1 100644
--- a/packages/SettingsLib/res/values-zh-rHK/strings.xml
+++ b/packages/SettingsLib/res/values-zh-rHK/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"時間:<xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"持續時間"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"每次都詢問"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"剛剛"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-zh-rTW/strings.xml b/packages/SettingsLib/res/values-zh-rTW/strings.xml
index 95d8b5d..6dc0720 100644
--- a/packages/SettingsLib/res/values-zh-rTW/strings.xml
+++ b/packages/SettingsLib/res/values-zh-rTW/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"時間:<xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"時間長度"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"每次都詢問"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"剛剛"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-zu/strings.xml b/packages/SettingsLib/res/values-zu/strings.xml
index 541c588..ae552fc 100644
--- a/packages/SettingsLib/res/values-zu/strings.xml
+++ b/packages/SettingsLib/res/values-zu/strings.xml
@@ -449,5 +449,7 @@
<string name="alarm_template_far" msgid="3779172822607461675">"nge-<xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="zen_mode_duration_settings_title" msgid="229547412251222757">"Ubude besikhathi"</string>
<string name="zen_mode_duration_always_prompt_title" msgid="6478923750878945501">"Buza njalo"</string>
+ <!-- no translation found for zen_mode_forever (2704305038191592967) -->
+ <skip />
<string name="time_unit_just_now" msgid="6363336622778342422">"Khona manje"</string>
</resources>
diff --git a/packages/SettingsLib/res/values/strings.xml b/packages/SettingsLib/res/values/strings.xml
index 04f2411..6bc07c2 100644
--- a/packages/SettingsLib/res/values/strings.xml
+++ b/packages/SettingsLib/res/values/strings.xml
@@ -1117,6 +1117,8 @@
<string name="zen_mode_duration_settings_title">Duration</string>
<!-- Do not disturb: Duration option to always prompt for the duration of dnd -->
<string name="zen_mode_duration_always_prompt_title">Ask every time</string>
+ <!-- Do not disturb: Duration option to always have DND on until it is manually turned off [CHAR LIMIT=60] -->
+ <string name="zen_mode_forever">Until you turn off</string>
<!-- time label for event have that happened very recently [CHAR LIMIT=60] -->
<string name="time_unit_just_now">Just now</string>
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothCallback.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothCallback.java
index c7f8c20..a91c45d 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothCallback.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothCallback.java
@@ -22,14 +22,110 @@
* UI to receive events from {@link BluetoothEventManager}.
*/
public interface BluetoothCallback {
- void onBluetoothStateChanged(int bluetoothState);
- void onScanningStateChanged(boolean started);
- void onDeviceAdded(CachedBluetoothDevice cachedDevice);
- void onDeviceDeleted(CachedBluetoothDevice cachedDevice);
- void onDeviceBondStateChanged(CachedBluetoothDevice cachedDevice, int bondState);
- void onConnectionStateChanged(CachedBluetoothDevice cachedDevice, int state);
- void onActiveDeviceChanged(CachedBluetoothDevice activeDevice, int bluetoothProfile);
- void onAudioModeChanged();
+ /**
+ * It will be called when the state of the local Bluetooth adapter has been changed.
+ * It is listening {@link android.bluetooth.BluetoothAdapter#ACTION_STATE_CHANGED}.
+ * For example, Bluetooth has been turned on or off.
+ *
+ * @param bluetoothState the current Bluetooth state, the possible values are:
+ * {@link android.bluetooth.BluetoothAdapter#STATE_OFF},
+ * {@link android.bluetooth.BluetoothAdapter#STATE_TURNING_ON},
+ * {@link android.bluetooth.BluetoothAdapter#STATE_ON},
+ * {@link android.bluetooth.BluetoothAdapter#STATE_TURNING_OFF}.
+ */
+ default void onBluetoothStateChanged(int bluetoothState) {}
+
+ /**
+ * It will be called when the local Bluetooth adapter has started
+ * or finished the remote device discovery process.
+ * It is listening {@link android.bluetooth.BluetoothAdapter#ACTION_DISCOVERY_STARTED} and
+ * {@link android.bluetooth.BluetoothAdapter#ACTION_DISCOVERY_FINISHED}.
+ *
+ * @param started indicate the current process is started or finished.
+ */
+ default void onScanningStateChanged(boolean started) {}
+
+ /**
+ * It will be called in following situations:
+ * 1. In scanning mode, when a new device has been found.
+ * 2. When a profile service is connected and existing connected devices has been found.
+ * This API only invoked once for each device and all devices will be cached in
+ * {@link CachedBluetoothDeviceManager}.
+ *
+ * @param cachedDevice the Bluetooth device.
+ */
+ default void onDeviceAdded(CachedBluetoothDevice cachedDevice) {}
+
+ /**
+ * It will be called when a remote device that was
+ * found in the last discovery and is not found in the current discovery.
+ * It is listening {@link android.bluetooth.BluetoothDevice#ACTION_DISAPPEARED}
+ *
+ * @param cachedDevice the Bluetooth device.
+ */
+ default void onDeviceDeleted(CachedBluetoothDevice cachedDevice) {}
+
+ /**
+ * It will be called when bond state of a remote device is changed.
+ * It is listening {@link android.bluetooth.BluetoothDevice#ACTION_BOND_STATE_CHANGED}
+ *
+ * @param cachedDevice the Bluetooth device.
+ * @param bondState the Bluetooth device bond state, the possible values are:
+ * {@link android.bluetooth.BluetoothDevice#BOND_NONE},
+ * {@link android.bluetooth.BluetoothDevice#BOND_BONDING},
+ * {@link android.bluetooth.BluetoothDevice#BOND_BONDED}.
+ */
+ default void onDeviceBondStateChanged(CachedBluetoothDevice cachedDevice, int bondState) {}
+
+ /**
+ * It will be called in following situations:
+ * 1. When the adapter is not connected to any profiles of any remote devices
+ * and it attempts a connection to a profile.
+ * 2. When the adapter disconnects from the last profile of the last device.
+ * It is listening {@link android.bluetooth.BluetoothAdapter#ACTION_CONNECTION_STATE_CHANGED}
+ *
+ * @param cachedDevice the Bluetooth device.
+ * @param state the Bluetooth device connection state, the possible values are:
+ * {@link android.bluetooth.BluetoothAdapter#STATE_DISCONNECTED},
+ * {@link android.bluetooth.BluetoothAdapter#STATE_CONNECTING},
+ * {@link android.bluetooth.BluetoothAdapter#STATE_CONNECTED},
+ * {@link android.bluetooth.BluetoothAdapter#STATE_DISCONNECTING}.
+ */
+ default void onConnectionStateChanged(CachedBluetoothDevice cachedDevice, int state) {}
+
+ /**
+ * It will be called when device been set as active for {@code bluetoothProfile}
+ * It is listening in following intent:
+ * {@link android.bluetooth.BluetoothA2dp#ACTION_ACTIVE_DEVICE_CHANGED}
+ * {@link android.bluetooth.BluetoothHeadset#ACTION_ACTIVE_DEVICE_CHANGED}
+ * {@link android.bluetooth.BluetoothHearingAid#ACTION_ACTIVE_DEVICE_CHANGED}
+ *
+ * @param activeDevice the active Bluetooth device.
+ * @param bluetoothProfile the profile of active Bluetooth device.
+ */
+ default void onActiveDeviceChanged(CachedBluetoothDevice activeDevice, int bluetoothProfile) {}
+
+ /**
+ * It will be called in following situations:
+ * 1. When the call state on the device is changed.
+ * 2. When the audio connection state of the A2DP profile is changed.
+ * It is listening in following intent:
+ * {@link android.bluetooth.BluetoothHeadset#ACTION_AUDIO_STATE_CHANGED}
+ * {@link android.telephony.TelephonyManager#ACTION_PHONE_STATE_CHANGED}
+ */
+ default void onAudioModeChanged() {}
+
+ /**
+ * It will be called when one of the bluetooth device profile connection state is changed.
+ *
+ * @param cachedDevice the active Bluetooth device.
+ * @param state the BluetoothProfile connection state, the possible values are:
+ * {@link android.bluetooth.BluetoothProfile#STATE_CONNECTED},
+ * {@link android.bluetooth.BluetoothProfile#STATE_CONNECTING},
+ * {@link android.bluetooth.BluetoothProfile#STATE_DISCONNECTED},
+ * {@link android.bluetooth.BluetoothProfile#STATE_DISCONNECTING}.
+ * @param bluetoothProfile the BluetoothProfile id.
+ */
default void onProfileConnectionStateChanged(CachedBluetoothDevice cachedDevice,
int state, int bluetoothProfile) {
}
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java
index 19af447..3ebbf7e 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java
@@ -37,6 +37,8 @@
import androidx.annotation.VisibleForTesting;
import android.util.Log;
import com.android.internal.R;
+import com.android.internal.util.CollectionUtils;
+
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
@@ -87,12 +89,12 @@
private HfpClientProfile mHfpClientProfile;
private MapProfile mMapProfile;
private MapClientProfile mMapClientProfile;
- private final HidProfile mHidProfile;
+ private HidProfile mHidProfile;
private HidDeviceProfile mHidDeviceProfile;
private OppProfile mOppProfile;
- private final PanProfile mPanProfile;
+ private PanProfile mPanProfile;
private PbapClientProfile mPbapClientProfile;
- private final PbapServerProfile mPbapProfile;
+ private PbapServerProfile mPbapProfile;
private final boolean mUsePbapPce;
private final boolean mUseMapClient;
private HearingAidProfile mHearingAidProfile;
@@ -118,177 +120,106 @@
// pass this reference to adapter and event manager (circular dependency)
mLocalAdapter.setProfileManager(this);
- ParcelUuid[] uuids = adapter.getUuids();
-
- // uuids may be null if Bluetooth is turned off
- if (uuids != null) {
- updateLocalProfiles(uuids);
- }
-
- // Always add HID host, HID device, and PAN profiles
- mHidProfile = new HidProfile(context, mLocalAdapter, mDeviceManager, this);
- addProfile(mHidProfile, HidProfile.NAME,
- BluetoothHidHost.ACTION_CONNECTION_STATE_CHANGED);
-
- mPanProfile = new PanProfile(context, mLocalAdapter);
- addPanProfile(mPanProfile, PanProfile.NAME,
- BluetoothPan.ACTION_CONNECTION_STATE_CHANGED);
-
- mHidDeviceProfile = new HidDeviceProfile(context, mLocalAdapter, mDeviceManager, this);
- addProfile(mHidDeviceProfile, HidDeviceProfile.NAME,
- BluetoothHidDevice.ACTION_CONNECTION_STATE_CHANGED);
-
- if(DEBUG) Log.d(TAG, "Adding local MAP profile");
- if (mUseMapClient) {
- mMapClientProfile = new MapClientProfile(mContext, mLocalAdapter, mDeviceManager, this);
- addProfile(mMapClientProfile, MapClientProfile.NAME,
- BluetoothMapClient.ACTION_CONNECTION_STATE_CHANGED);
- } else {
- mMapProfile = new MapProfile(mContext, mLocalAdapter, mDeviceManager, this);
- addProfile(mMapProfile, MapProfile.NAME,
- BluetoothMap.ACTION_CONNECTION_STATE_CHANGED);
- }
-
- //Create PBAP server profile
- if(DEBUG) Log.d(TAG, "Adding local PBAP profile");
-
- mPbapProfile = new PbapServerProfile(context);
- addProfile(mPbapProfile, PbapServerProfile.NAME,
- BluetoothPbap.ACTION_CONNECTION_STATE_CHANGED);
-
- List<Integer> supportedList = mLocalAdapter.getSupportedProfiles();
- if (supportedList.contains(BluetoothProfile.HEARING_AID)) {
- mHearingAidProfile = new HearingAidProfile(mContext, mLocalAdapter, mDeviceManager,
- this);
- addProfile(mHearingAidProfile, HearingAidProfile.NAME,
- BluetoothHearingAid.ACTION_CONNECTION_STATE_CHANGED);
- }
+ updateLocalProfiles();
if (DEBUG) Log.d(TAG, "LocalBluetoothProfileManager construction complete");
}
/**
- * Initialize or update the local profile objects. If a UUID was previously
- * present but has been removed, we print a warning but don't remove the
- * profile object as it might be referenced elsewhere, or the UUID might
- * come back and we don't want multiple copies of the profile objects.
- * @param uuids
+ * create profile instance according to bluetooth supported profile list
*/
- void updateLocalProfiles(ParcelUuid[] uuids) {
- // A2DP SRC
- if (BluetoothUuid.isUuidPresent(uuids, BluetoothUuid.AudioSource)) {
- if (mA2dpProfile == null) {
- if(DEBUG) Log.d(TAG, "Adding local A2DP SRC profile");
- mA2dpProfile = new A2dpProfile(mContext, mLocalAdapter, mDeviceManager, this);
- addProfile(mA2dpProfile, A2dpProfile.NAME,
- BluetoothA2dp.ACTION_CONNECTION_STATE_CHANGED);
- }
- } else if (mA2dpProfile != null) {
- Log.w(TAG, "Warning: A2DP profile was previously added but the UUID is now missing.");
+ void updateLocalProfiles() {
+ List<Integer> supportedList = mLocalAdapter.getSupportedProfiles();
+ if (CollectionUtils.isEmpty(supportedList)) {
+ if(DEBUG) Log.d(TAG, "supportedList is null");
+ return;
}
-
- // A2DP SINK
- if (BluetoothUuid.isUuidPresent(uuids, BluetoothUuid.AudioSink)) {
- if (mA2dpSinkProfile == null) {
- if(DEBUG) Log.d(TAG, "Adding local A2DP Sink profile");
- mA2dpSinkProfile = new A2dpSinkProfile(mContext, mLocalAdapter, mDeviceManager, this);
- addProfile(mA2dpSinkProfile, A2dpSinkProfile.NAME,
- BluetoothA2dpSink.ACTION_CONNECTION_STATE_CHANGED);
- }
- } else if (mA2dpSinkProfile != null) {
- Log.w(TAG, "Warning: A2DP Sink profile was previously added but the UUID is now missing.");
+ if (mA2dpProfile == null && supportedList.contains(BluetoothProfile.A2DP)) {
+ if(DEBUG) Log.d(TAG, "Adding local A2DP profile");
+ mA2dpProfile = new A2dpProfile(mContext, mLocalAdapter, mDeviceManager, this);
+ addProfile(mA2dpProfile, A2dpProfile.NAME,
+ BluetoothA2dp.ACTION_CONNECTION_STATE_CHANGED);
}
-
- // Headset / Handsfree
- if (BluetoothUuid.isUuidPresent(uuids, BluetoothUuid.Handsfree_AG) ||
- BluetoothUuid.isUuidPresent(uuids, BluetoothUuid.HSP_AG)) {
- if (mHeadsetProfile == null) {
- if (DEBUG) Log.d(TAG, "Adding local HEADSET profile");
- mHeadsetProfile = new HeadsetProfile(mContext, mLocalAdapter,
- mDeviceManager, this);
- addHeadsetProfile(mHeadsetProfile, HeadsetProfile.NAME,
- BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED,
- BluetoothHeadset.ACTION_AUDIO_STATE_CHANGED,
- BluetoothHeadset.STATE_AUDIO_DISCONNECTED);
- }
- } else if (mHeadsetProfile != null) {
- Log.w(TAG, "Warning: HEADSET profile was previously added but the UUID is now missing.");
+ if (mA2dpSinkProfile == null && supportedList.contains(BluetoothProfile.A2DP_SINK)) {
+ if(DEBUG) Log.d(TAG, "Adding local A2DP SINK profile");
+ mA2dpSinkProfile = new A2dpSinkProfile(mContext, mLocalAdapter, mDeviceManager, this);
+ addProfile(mA2dpSinkProfile, A2dpSinkProfile.NAME,
+ BluetoothA2dpSink.ACTION_CONNECTION_STATE_CHANGED);
}
-
- // Headset HF
- if (BluetoothUuid.isUuidPresent(uuids, BluetoothUuid.Handsfree)) {
- if (mHfpClientProfile == null) {
- if(DEBUG) Log.d(TAG, "Adding local HfpClient profile");
- mHfpClientProfile =
- new HfpClientProfile(mContext, mLocalAdapter, mDeviceManager, this);
- addHeadsetProfile(mHfpClientProfile, HfpClientProfile.NAME,
- BluetoothHeadsetClient.ACTION_CONNECTION_STATE_CHANGED,
- BluetoothHeadsetClient.ACTION_AUDIO_STATE_CHANGED,
- BluetoothHeadsetClient.STATE_AUDIO_DISCONNECTED);
- }
- } else if (mHfpClientProfile != null) {
- Log.w(TAG,
- "Warning: Hfp Client profile was previously added but the UUID is now missing.");
- } else {
- Log.d(TAG, "Handsfree Uuid not found.");
+ if (mHeadsetProfile == null && supportedList.contains(BluetoothProfile.HEADSET)) {
+ if (DEBUG) Log.d(TAG, "Adding local HEADSET profile");
+ mHeadsetProfile = new HeadsetProfile(mContext, mLocalAdapter, mDeviceManager, this);
+ addHeadsetProfile(mHeadsetProfile, HeadsetProfile.NAME,
+ BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED,
+ BluetoothHeadset.ACTION_AUDIO_STATE_CHANGED,
+ BluetoothHeadset.STATE_AUDIO_DISCONNECTED);
}
-
- // Message Access Profile Client
- if (BluetoothUuid.isUuidPresent(uuids, BluetoothUuid.MNS)) {
- if (mMapClientProfile == null) {
- if(DEBUG) Log.d(TAG, "Adding local Map Client profile");
+ if (mHfpClientProfile == null && supportedList.contains(BluetoothProfile.HEADSET_CLIENT)) {
+ if(DEBUG) Log.d(TAG, "Adding local HfpClient profile");
+ mHfpClientProfile = new HfpClientProfile(mContext, mLocalAdapter, mDeviceManager, this);
+ addHeadsetProfile(mHfpClientProfile, HfpClientProfile.NAME,
+ BluetoothHeadsetClient.ACTION_CONNECTION_STATE_CHANGED,
+ BluetoothHeadsetClient.ACTION_AUDIO_STATE_CHANGED,
+ BluetoothHeadsetClient.STATE_AUDIO_DISCONNECTED);
+ }
+ if (mUseMapClient) {
+ if (mMapClientProfile == null && supportedList.contains(BluetoothProfile.MAP_CLIENT)) {
+ if(DEBUG) Log.d(TAG, "Adding local MAP CLIENT profile");
mMapClientProfile =
- new MapClientProfile(mContext, mLocalAdapter, mDeviceManager, this);
+ new MapClientProfile(mContext, mLocalAdapter, mDeviceManager,this);
addProfile(mMapClientProfile, MapClientProfile.NAME,
BluetoothMapClient.ACTION_CONNECTION_STATE_CHANGED);
}
- } else if (mMapClientProfile != null) {
- Log.w(TAG,
- "Warning: MAP Client profile was previously added but the UUID is now missing.");
- } else {
- Log.d(TAG, "MAP Client Uuid not found.");
+ } else if (mMapProfile == null && supportedList.contains(BluetoothProfile.MAP)) {
+ if(DEBUG) Log.d(TAG, "Adding local MAP profile");
+ mMapProfile = new MapProfile(mContext, mLocalAdapter, mDeviceManager, this);
+ addProfile(mMapProfile, MapProfile.NAME, BluetoothMap.ACTION_CONNECTION_STATE_CHANGED);
}
-
- // OPP
- if (BluetoothUuid.isUuidPresent(uuids, BluetoothUuid.ObexObjectPush)) {
- if (mOppProfile == null) {
- if(DEBUG) Log.d(TAG, "Adding local OPP profile");
- mOppProfile = new OppProfile();
- // Note: no event handler for OPP, only name map.
- mProfileNameMap.put(OppProfile.NAME, mOppProfile);
- }
- } else if (mOppProfile != null) {
- Log.w(TAG, "Warning: OPP profile was previously added but the UUID is now missing.");
+ if (mOppProfile == null && supportedList.contains(BluetoothProfile.OPP)) {
+ if(DEBUG) Log.d(TAG, "Adding local OPP profile");
+ mOppProfile = new OppProfile();
+ // Note: no event handler for OPP, only name map.
+ mProfileNameMap.put(OppProfile.NAME, mOppProfile);
}
-
- //PBAP Client
- if (mUsePbapPce) {
- if (mPbapClientProfile == null) {
- if(DEBUG) Log.d(TAG, "Adding local PBAP Client profile");
- mPbapClientProfile = new PbapClientProfile(mContext, mLocalAdapter, mDeviceManager,
- this);
- addProfile(mPbapClientProfile, PbapClientProfile.NAME,
- BluetoothPbapClient.ACTION_CONNECTION_STATE_CHANGED);
- }
- } else if (mPbapClientProfile != null) {
- Log.w(TAG,
- "Warning: PBAP Client profile was previously added but the UUID is now missing.");
+ if (mHearingAidProfile == null && supportedList.contains(BluetoothProfile.HEARING_AID)) {
+ if(DEBUG) Log.d(TAG, "Adding local Hearing Aid profile");
+ mHearingAidProfile = new HearingAidProfile(mContext, mLocalAdapter, mDeviceManager,
+ this);
+ addProfile(mHearingAidProfile, HearingAidProfile.NAME,
+ BluetoothHearingAid.ACTION_CONNECTION_STATE_CHANGED);
}
-
- //Hearing Aid Client
- if (BluetoothUuid.isUuidPresent(uuids, BluetoothUuid.HearingAid)) {
- if (mHearingAidProfile == null) {
- if(DEBUG) Log.d(TAG, "Adding local Hearing Aid profile");
- mHearingAidProfile = new HearingAidProfile(mContext, mLocalAdapter, mDeviceManager, this);
- addProfile(mHearingAidProfile, HearingAidProfile.NAME,
- BluetoothHearingAid.ACTION_CONNECTION_STATE_CHANGED);
- }
- } else if (mHearingAidProfile != null) {
- Log.w(TAG, "Warning: Hearing Aid profile was previously added but the UUID is now missing.");
+ if (mHidProfile == null && supportedList.contains(BluetoothProfile.HID_HOST)) {
+ if(DEBUG) Log.d(TAG, "Adding local HID_HOST profile");
+ mHidProfile = new HidProfile(mContext, mLocalAdapter, mDeviceManager, this);
+ addProfile(mHidProfile, HidProfile.NAME,
+ BluetoothHidHost.ACTION_CONNECTION_STATE_CHANGED);
}
-
+ if (mHidDeviceProfile == null && supportedList.contains(BluetoothProfile.HID_DEVICE)) {
+ if(DEBUG) Log.d(TAG, "Adding local HID_DEVICE profile");
+ mHidDeviceProfile = new HidDeviceProfile(mContext, mLocalAdapter, mDeviceManager, this);
+ addProfile(mHidDeviceProfile, HidDeviceProfile.NAME,
+ BluetoothHidDevice.ACTION_CONNECTION_STATE_CHANGED);
+ }
+ if (mPanProfile == null && supportedList.contains(BluetoothProfile.PAN)) {
+ if(DEBUG) Log.d(TAG, "Adding local PAN profile");
+ mPanProfile = new PanProfile(mContext, mLocalAdapter);
+ addPanProfile(mPanProfile, PanProfile.NAME,
+ BluetoothPan.ACTION_CONNECTION_STATE_CHANGED);
+ }
+ if (mPbapProfile == null && supportedList.contains(BluetoothProfile.PBAP)) {
+ if(DEBUG) Log.d(TAG, "Adding local PBAP profile");
+ mPbapProfile = new PbapServerProfile(mContext);
+ addProfile(mPbapProfile, PbapServerProfile.NAME,
+ BluetoothPbap.ACTION_CONNECTION_STATE_CHANGED);
+ }
+ if (mUsePbapPce && mPbapClientProfile == null && supportedList.contains(
+ BluetoothProfile.PBAP_CLIENT)) {
+ if(DEBUG) Log.d(TAG, "Adding local PBAP Client profile");
+ mPbapClientProfile = new PbapClientProfile(mContext, mLocalAdapter, mDeviceManager,
+ this);
+ addProfile(mPbapClientProfile, PbapClientProfile.NAME,
+ BluetoothPbapClient.ACTION_CONNECTION_STATE_CHANGED);
+ }
mEventManager.registerProfileIntentReceiver();
-
- // There is no local SDP record for HID and Settings app doesn't control PBAP Server.
}
private void addHeadsetProfile(LocalBluetoothProfile profile, String profileName,
@@ -322,10 +253,7 @@
// Called from LocalBluetoothAdapter when state changes to ON
void setBluetoothStateOn() {
- ParcelUuid[] uuids = mLocalAdapter.getUuids();
- if (uuids != null) {
- updateLocalProfiles(uuids);
- }
+ updateLocalProfiles();
mEventManager.readPairedDevices();
}
diff --git a/packages/SettingsLib/src/com/android/settingslib/drawer/DashboardCategory.java b/packages/SettingsLib/src/com/android/settingslib/drawer/DashboardCategory.java
index cb21f87..a3dda65 100644
--- a/packages/SettingsLib/src/com/android/settingslib/drawer/DashboardCategory.java
+++ b/packages/SettingsLib/src/com/android/settingslib/drawer/DashboardCategory.java
@@ -94,17 +94,18 @@
* Sort priority value and package name for tiles in this category.
*/
public synchronized void sortTiles(String skipPackageName) {
- // Sort mTiles based on [priority, package within priority]
+ // Sort mTiles based on [order, package within order]
Collections.sort(mTiles, (tile1, tile2) -> {
- final String package1 = tile1.intent.getComponent().getPackageName();
- final String package2 = tile2.intent.getComponent().getPackageName();
- final int packageCompare = CASE_INSENSITIVE_ORDER.compare(package1, package2);
- // First sort by priority
- final int priorityCompare = tile2.priority - tile1.priority;
- if (priorityCompare != 0) {
- return priorityCompare;
+ // First sort by order
+ final int orderCompare = tile2.getOrder() - tile1.getOrder();
+ if (orderCompare != 0) {
+ return orderCompare;
}
+
// Then sort by package name, skip package take precedence
+ final String package1 = tile1.getPackageName();
+ final String package2 = tile2.getPackageName();
+ final int packageCompare = CASE_INSENSITIVE_ORDER.compare(package1, package2);
if (packageCompare != 0) {
if (TextUtils.equals(package1, skipPackageName)) {
return -1;
diff --git a/packages/SettingsLib/src/com/android/settingslib/drawer/Tile.java b/packages/SettingsLib/src/com/android/settingslib/drawer/Tile.java
index 3320433..84c8b21 100644
--- a/packages/SettingsLib/src/com/android/settingslib/drawer/Tile.java
+++ b/packages/SettingsLib/src/com/android/settingslib/drawer/Tile.java
@@ -16,9 +16,11 @@
package com.android.settingslib.drawer;
+import static com.android.settingslib.drawer.TileUtils.META_DATA_KEY_ORDER;
import static com.android.settingslib.drawer.TileUtils.META_DATA_KEY_PROFILE;
import static com.android.settingslib.drawer.TileUtils.META_DATA_PREFERENCE_ICON;
import static com.android.settingslib.drawer.TileUtils.META_DATA_PREFERENCE_ICON_URI;
+import static com.android.settingslib.drawer.TileUtils.META_DATA_PREFERENCE_KEYHINT;
import static com.android.settingslib.drawer.TileUtils.PROFILE_ALL;
import static com.android.settingslib.drawer.TileUtils.PROFILE_PRIMARY;
@@ -60,35 +62,20 @@
public CharSequence summary;
/**
- * Intent to launch when the preference is selected.
- */
- public Intent intent;
-
- /**
* Optional list of user handles which the intent should be launched on.
*/
public ArrayList<UserHandle> userHandle = new ArrayList<>();
- private String mCategory;
-
- /**
- * Priority of the intent filter that created this tile, used for display ordering.
- */
- public int priority;
-
/**
* The metaData from the activity that defines this tile.
*/
- private Bundle mMetaData;
-
- /**
- * Optional key to use for this tile.
- */
- public String key;
-
+ private final Bundle mMetaData;
private final String mActivityPackage;
private final String mActivityName;
+ private final Intent mIntent;
+
private ActivityInfo mActivityInfo;
+ private String mCategory;
public Tile(ActivityInfo activityInfo, String category) {
mActivityInfo = activityInfo;
@@ -96,6 +83,21 @@
mActivityName = mActivityInfo.name;
mMetaData = activityInfo.metaData;
mCategory = category;
+ mIntent = new Intent().setClassName(mActivityPackage, mActivityName);
+ }
+
+ Tile(Parcel in) {
+ mActivityPackage = in.readString();
+ mActivityName = in.readString();
+ mIntent = new Intent().setClassName(mActivityPackage, mActivityName);
+ title = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
+ summary = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
+ final int N = in.readInt();
+ for (int i = 0; i < N; i++) {
+ userHandle.add(UserHandle.CREATOR.createFromParcel(in));
+ }
+ mCategory = in.readString();
+ mMetaData = in.readBundle();
}
@Override
@@ -109,21 +111,24 @@
dest.writeString(mActivityName);
TextUtils.writeToParcel(title, dest, flags);
TextUtils.writeToParcel(summary, dest, flags);
- if (intent != null) {
- dest.writeByte((byte) 1);
- intent.writeToParcel(dest, flags);
- } else {
- dest.writeByte((byte) 0);
- }
final int N = userHandle.size();
dest.writeInt(N);
for (int i = 0; i < N; i++) {
userHandle.get(i).writeToParcel(dest, flags);
}
dest.writeString(mCategory);
- dest.writeInt(priority);
dest.writeBundle(mMetaData);
- dest.writeString(key);
+ }
+
+ public String getPackageName() {
+ return mActivityPackage;
+ }
+
+ /**
+ * Intent to launch when the preference is selected.
+ */
+ public Intent getIntent() {
+ return mIntent;
}
/**
@@ -138,10 +143,19 @@
}
/**
- * Priority of the intent filter that created this tile, used for display ordering.
+ * Priority of this tile, used for display ordering.
*/
- public int getPriority() {
- return 0;
+ public int getOrder() {
+ if (hasOrder()) {
+ return mMetaData.getInt(META_DATA_KEY_ORDER);
+ } else {
+ return 0;
+ }
+ }
+
+ public boolean hasOrder() {
+ return mMetaData.containsKey(META_DATA_KEY_ORDER)
+ && mMetaData.get(META_DATA_KEY_ORDER) instanceof Integer;
}
public Bundle getMetaData() {
@@ -149,6 +163,24 @@
}
/**
+ * Optional key to use for this tile.
+ */
+ public String getKey(Context context) {
+ if (!hasKey()) {
+ return null;
+ }
+ if (mMetaData.get(META_DATA_PREFERENCE_KEYHINT) instanceof Integer) {
+ return context.getResources().getString(mMetaData.getInt(META_DATA_PREFERENCE_KEYHINT));
+ } else {
+ return mMetaData.getString(META_DATA_PREFERENCE_KEYHINT);
+ }
+ }
+
+ public boolean hasKey() {
+ return mMetaData != null && mMetaData.containsKey(META_DATA_PREFERENCE_KEYHINT);
+ }
+
+ /**
* Optional icon to show for this tile.
*
* @attr ref android.R.styleable#PreferenceHeader_icon
@@ -190,24 +222,6 @@
&& !TextUtils.equals(pkgName, activityInfo.packageName);
}
- Tile(Parcel in) {
- mActivityPackage = in.readString();
- mActivityName = in.readString();
- title = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
- summary = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
- if (in.readByte() != 0) {
- intent = Intent.CREATOR.createFromParcel(in);
- }
- final int N = in.readInt();
- for (int i = 0; i < N; i++) {
- userHandle.add(UserHandle.CREATOR.createFromParcel(in));
- }
- mCategory = in.readString();
- priority = in.readInt();
- mMetaData = in.readBundle();
- key = in.readString();
- }
-
private ActivityInfo getActivityInfo(Context context) {
if (mActivityInfo == null) {
final PackageManager pm = context.getApplicationContext().getPackageManager();
@@ -239,5 +253,5 @@
}
public static final Comparator<Tile> TILE_COMPARATOR =
- (lhs, rhs) -> rhs.priority - lhs.priority;
+ (lhs, rhs) -> rhs.getOrder() - lhs.getOrder();
}
diff --git a/packages/SettingsLib/src/com/android/settingslib/drawer/TileUtils.java b/packages/SettingsLib/src/com/android/settingslib/drawer/TileUtils.java
index 7b54fe1..f39b851 100644
--- a/packages/SettingsLib/src/com/android/settingslib/drawer/TileUtils.java
+++ b/packages/SettingsLib/src/com/android/settingslib/drawer/TileUtils.java
@@ -65,20 +65,17 @@
*
* <p>A summary my be defined by meta-data named {@link #META_DATA_PREFERENCE_SUMMARY}
*/
- public static final String EXTRA_SETTINGS_ACTION =
- "com.android.settings.action.EXTRA_SETTINGS";
+ public static final String EXTRA_SETTINGS_ACTION = "com.android.settings.action.EXTRA_SETTINGS";
/**
* @See {@link #EXTRA_SETTINGS_ACTION}.
*/
- private static final String IA_SETTINGS_ACTION =
- "com.android.settings.action.IA_SETTINGS";
+ private static final String IA_SETTINGS_ACTION = "com.android.settings.action.IA_SETTINGS";
/**
* Same as #EXTRA_SETTINGS_ACTION but used for the platform Settings activities.
*/
- private static final String SETTINGS_ACTION =
- "com.android.settings.action.SETTINGS";
+ private static final String SETTINGS_ACTION = "com.android.settings.action.SETTINGS";
private static final String OPERATOR_SETTINGS =
"com.android.settings.OPERATOR_APPLICATION_SETTING";
@@ -112,6 +109,12 @@
public static final String META_DATA_PREFERENCE_KEYHINT = "com.android.settings.keyhint";
/**
+ * Order of the item that should be displayed on screen. Bigger value items displays closer on
+ * top.
+ */
+ public static final String META_DATA_KEY_ORDER = "com.android.settings.order";
+
+ /**
* Name of the meta-data item that should be set in the AndroidManifest.xml
* to specify the icon that should be displayed for the preference.
*/
@@ -303,9 +306,6 @@
Tile tile = addedCache.get(key);
if (tile == null) {
tile = new Tile(activityInfo, categoryKey);
- tile.intent = new Intent().setClassName(
- activityInfo.packageName, activityInfo.name);
- tile.priority = usePriority ? resolved.priority : 0;
updateTileData(context, tile, activityInfo, activityInfo.applicationInfo, pm);
if (DEBUG) Log.d(LOG_TAG, "Adding tile " + tile.title);
addedCache.put(key, tile);
@@ -325,7 +325,6 @@
if (applicationInfo.isSystemApp()) {
CharSequence title = null;
String summary = null;
- String keyHint = null;
// Get the activity's meta-data
try {
@@ -347,13 +346,6 @@
summary = metaData.getString(META_DATA_PREFERENCE_SUMMARY);
}
}
- if (metaData.containsKey(META_DATA_PREFERENCE_KEYHINT)) {
- if (metaData.get(META_DATA_PREFERENCE_KEYHINT) instanceof Integer) {
- keyHint = res.getString(metaData.getInt(META_DATA_PREFERENCE_KEYHINT));
- } else {
- keyHint = metaData.getString(META_DATA_PREFERENCE_KEYHINT);
- }
- }
}
} catch (PackageManager.NameNotFoundException | Resources.NotFoundException e) {
if (DEBUG) Log.d(LOG_TAG, "Couldn't find info", e);
@@ -368,12 +360,6 @@
// Set title and summary for the preference
tile.title = title;
tile.summary = summary;
- // Replace the intent with this specific activity
- tile.intent = new Intent().setClassName(activityInfo.packageName,
- activityInfo.name);
- // Suggest a key for this tile
- tile.key = keyHint;
-
return true;
}
diff --git a/packages/SettingsLib/src/com/android/settingslib/notification/ZenDurationDialog.java b/packages/SettingsLib/src/com/android/settingslib/notification/ZenDurationDialog.java
index fd9d02b..0ef46a1 100644
--- a/packages/SettingsLib/src/com/android/settingslib/notification/ZenDurationDialog.java
+++ b/packages/SettingsLib/src/com/android/settingslib/notification/ZenDurationDialog.java
@@ -17,7 +17,6 @@
package com.android.settingslib.notification;
import android.app.ActivityManager;
-import android.app.AlertDialog;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
@@ -42,6 +41,7 @@
import java.util.Arrays;
import androidx.annotation.VisibleForTesting;
+import androidx.appcompat.app.AlertDialog;
public class ZenDurationDialog {
private static final int[] MINUTE_BUCKETS = ZenModeConfig.MINUTE_BUCKETS;
@@ -67,12 +67,17 @@
}
public Dialog createDialog() {
+ final AlertDialog.Builder builder = new AlertDialog.Builder(mContext);
+ setupDialog(builder);
+ return builder.create();
+ }
+
+ public void setupDialog(AlertDialog.Builder builder) {
int zenDuration = Settings.Secure.getInt(
mContext.getContentResolver(), Settings.Secure.ZEN_DURATION,
Settings.Secure.ZEN_DURATION_FOREVER);
- final AlertDialog.Builder builder = new AlertDialog.Builder(mContext)
- .setTitle(R.string.zen_mode_duration_settings_title)
+ builder.setTitle(R.string.zen_mode_duration_settings_title)
.setNegativeButton(R.string.cancel, null)
.setPositiveButton(R.string.okay,
new DialogInterface.OnClickListener() {
@@ -85,7 +90,6 @@
View contentView = getContentView();
setupRadioButtons(zenDuration);
builder.setView(contentView);
- return builder.create();
}
@VisibleForTesting
@@ -270,8 +274,7 @@
String radioContentText = "";
switch (rowIndex) {
case FOREVER_CONDITION_INDEX:
- radioContentText = mContext.getString(
- com.android.internal.R.string.zen_mode_forever);
+ radioContentText = mContext.getString(R.string.zen_mode_forever);
break;
case COUNTDOWN_CONDITION_INDEX:
Condition condition = ZenModeConfig.toTimeCondition(mContext,
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManagerTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManagerTest.java
index 77fb272..af66f7a 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManagerTest.java
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManagerTest.java
@@ -20,6 +20,7 @@
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.Mockito.never;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
@@ -80,6 +81,10 @@
*/
@Test
public void constructor_initiateHidAndHidDeviceProfile() {
+ when(mAdapter.getSupportedProfiles()).thenReturn(
+ generateList(new int[] {BluetoothProfile.HID_HOST}));
+ when(mAdapter.getSupportedProfiles()).thenReturn(
+ generateList(new int[] {BluetoothProfile.HID_HOST, BluetoothProfile.HID_DEVICE}));
mProfileManager =
new LocalBluetoothProfileManager(mContext, mAdapter, mDeviceManager, mEventManager);
@@ -94,12 +99,12 @@
public void updateLocalProfiles_addA2dpToLocalProfiles() {
mProfileManager =
new LocalBluetoothProfileManager(mContext, mAdapter, mDeviceManager, mEventManager);
- when(mAdapter.getUuids()).thenReturn(new ParcelUuid[]{BluetoothUuid.AudioSource});
assertThat(mProfileManager.getA2dpProfile()).isNull();
assertThat(mProfileManager.getHeadsetProfile()).isNull();
- ParcelUuid[] uuids = mAdapter.getUuids();
- mProfileManager.updateLocalProfiles(uuids);
+ when(mAdapter.getSupportedProfiles()).thenReturn(generateList(
+ new int[] {BluetoothProfile.A2DP}));
+ mProfileManager.updateLocalProfiles();
assertThat(mProfileManager.getA2dpProfile()).isNotNull();
assertThat(mProfileManager.getHeadsetProfile()).isNull();
@@ -110,6 +115,8 @@
*/
@Test
public void updateProfiles_addHidProfileForRemoteDevice() {
+ when(mAdapter.getSupportedProfiles()).thenReturn(generateList(
+ new int[] {BluetoothProfile.HID_HOST}));
mProfileManager =
new LocalBluetoothProfileManager(mContext, mAdapter, mDeviceManager, mEventManager);
ParcelUuid[] uuids = new ParcelUuid[]{BluetoothUuid.Hid};
@@ -131,7 +138,8 @@
*/
@Test
public void stateChangedHandler_receiveA2dpConnectionStateChanged_shouldDispatchCallback() {
- when(mAdapter.getUuids()).thenReturn(new ParcelUuid[]{BluetoothUuid.AudioSource});
+ when(mAdapter.getSupportedProfiles()).thenReturn(generateList(
+ new int[] {BluetoothProfile.A2DP}));
mProfileManager = new LocalBluetoothProfileManager(mContext, mAdapter, mDeviceManager,
mEventManager);
// Refer to BluetoothControllerImpl, it will call setReceiverHandler after
@@ -154,7 +162,8 @@
*/
@Test
public void stateChangedHandler_receiveHeadsetConnectionStateChanged_shouldDispatchCallback() {
- when(mAdapter.getUuids()).thenReturn(new ParcelUuid[]{BluetoothUuid.Handsfree_AG});
+ when(mAdapter.getSupportedProfiles()).thenReturn(generateList(
+ new int[] {BluetoothProfile.HEADSET}));
mProfileManager = new LocalBluetoothProfileManager(mContext, mAdapter, mDeviceManager,
mEventManager);
// Refer to BluetoothControllerImpl, it will call setReceiverHandler after
@@ -203,7 +212,8 @@
*/
@Test
public void stateChangedHandler_receivePanConnectionStateChanged_shouldNotDispatchCallback() {
- when(mAdapter.getUuids()).thenReturn(new ParcelUuid[]{BluetoothUuid.AudioSource});
+ when(mAdapter.getSupportedProfiles()).thenReturn(
+ generateList(new int[] {BluetoothProfile.PAN}));
mProfileManager = new LocalBluetoothProfileManager(mContext, mAdapter, mDeviceManager,
mEventManager);
// Refer to BluetoothControllerImpl, it will call setReceiverHandler after
@@ -225,8 +235,32 @@
* handler and refresh CachedBluetoothDevice
*/
@Test
- public void stateChangedHandler_receivePanConnectionStateChangedWithoutUuid_shouldNotRefresh() {
- when(mAdapter.getUuids()).thenReturn(null);
+ public void stateChangedHandler_receivePanConnectionStateChangedWithoutProfile_shouldNotRefresh
+ () {
+ when(mAdapter.getSupportedProfiles()).thenReturn(null);
+ mProfileManager = new LocalBluetoothProfileManager(mContext, mAdapter, mDeviceManager,
+ mEventManager);
+ // Refer to BluetoothControllerImpl, it will call setReceiverHandler after
+ // LocalBluetoothProfileManager created.
+ mEventManager.setReceiverHandler(null);
+ mIntent = new Intent(BluetoothPan.ACTION_CONNECTION_STATE_CHANGED);
+ mIntent.putExtra(BluetoothDevice.EXTRA_DEVICE, mDevice);
+ mIntent.putExtra(BluetoothProfile.EXTRA_PREVIOUS_STATE, BluetoothProfile.STATE_CONNECTING);
+ mIntent.putExtra(BluetoothProfile.EXTRA_STATE, BluetoothProfile.STATE_CONNECTED);
+
+ mContext.sendBroadcast(mIntent);
+
+ verify(mCachedBluetoothDevice, never()).refresh();
+ }
+
+ /**
+ * Verify BluetoothPan.ACTION_CONNECTION_STATE_CHANGED intent with uuids will dispatch to
+ * handler and refresh CachedBluetoothDevice
+ */
+ @Test
+ public void stateChangedHandler_receivePanConnectionStateChangedWithProfile_shouldRefresh() {
+ when(mAdapter.getSupportedProfiles()).thenReturn(generateList(
+ new int[] {BluetoothProfile.PAN}));
mProfileManager = new LocalBluetoothProfileManager(mContext, mAdapter, mDeviceManager,
mEventManager);
// Refer to BluetoothControllerImpl, it will call setReceiverHandler after
@@ -242,25 +276,14 @@
verify(mCachedBluetoothDevice).refresh();
}
- /**
- * Verify BluetoothPan.ACTION_CONNECTION_STATE_CHANGED intent with uuids will dispatch to
- * handler and refresh CachedBluetoothDevice
- */
- @Test
- public void stateChangedHandler_receivePanConnectionStateChangedWithUuids_shouldRefresh() {
- when(mAdapter.getUuids()).thenReturn(new ParcelUuid[]{BluetoothUuid.AudioSource});
- mProfileManager = new LocalBluetoothProfileManager(mContext, mAdapter, mDeviceManager,
- mEventManager);
- // Refer to BluetoothControllerImpl, it will call setReceiverHandler after
- // LocalBluetoothProfileManager created.
- mEventManager.setReceiverHandler(null);
- mIntent = new Intent(BluetoothPan.ACTION_CONNECTION_STATE_CHANGED);
- mIntent.putExtra(BluetoothDevice.EXTRA_DEVICE, mDevice);
- mIntent.putExtra(BluetoothProfile.EXTRA_PREVIOUS_STATE, BluetoothProfile.STATE_CONNECTING);
- mIntent.putExtra(BluetoothProfile.EXTRA_STATE, BluetoothProfile.STATE_CONNECTED);
-
- mContext.sendBroadcast(mIntent);
-
- verify(mCachedBluetoothDevice).refresh();
+ private List<Integer> generateList(int[] profile) {
+ if (profile == null) {
+ return null;
+ }
+ final List<Integer> profileList = new ArrayList<>(profile.length);
+ for(int i = 0; i < profile.length; i++) {
+ profileList.add(profile[i]);
+ }
+ return profileList;
}
}
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/drawer/TileTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/drawer/TileTest.java
index d959657..a501ffa 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/drawer/TileTest.java
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/drawer/TileTest.java
@@ -1,5 +1,6 @@
package com.android.settingslib.drawer;
+import static com.android.settingslib.drawer.TileUtils.META_DATA_KEY_ORDER;
import static com.android.settingslib.drawer.TileUtils.META_DATA_KEY_PROFILE;
import static com.android.settingslib.drawer.TileUtils.META_DATA_PREFERENCE_ICON;
import static com.android.settingslib.drawer.TileUtils.META_DATA_PREFERENCE_ICON_URI;
@@ -30,6 +31,7 @@
public void setUp() {
mActivityInfo = new ActivityInfo();
mActivityInfo.packageName = RuntimeEnvironment.application.getPackageName();
+ mActivityInfo.name = "abc";
mActivityInfo.icon = R.drawable.ic_plus;
mActivityInfo.metaData = new Bundle();
mTile = new Tile(mActivityInfo, "category");
@@ -60,7 +62,8 @@
@Test
public void getIcon_noContextOrMetadata_returnNull() {
- final Tile tile = new Tile(new ActivityInfo(), "category");
+ mActivityInfo.metaData = null;
+ final Tile tile = new Tile(mActivityInfo, "category");
assertThat(tile.getIcon(null)).isNull();
assertThat(tile.getIcon(RuntimeEnvironment.application)).isNull();
}
@@ -113,8 +116,34 @@
final ActivityInfo activityInfo = new ActivityInfo();
activityInfo.packageName = "blah";
+ activityInfo.name = "abc";
final Tile tile2 = new Tile(activityInfo, "category");
assertThat(tile2.isIconTintable(RuntimeEnvironment.application)).isTrue();
}
+
+ @Test
+ public void getPriority_noMetadata_return0() {
+ final Tile tile = new Tile(mActivityInfo, "category");
+
+ assertThat(tile.getOrder()).isEqualTo(0);
+ }
+
+ @Test
+ public void getPriority_badMetadata_return0() {
+ mActivityInfo.metaData.putString(META_DATA_KEY_ORDER, "1");
+
+ final Tile tile = new Tile(mActivityInfo, "category");
+
+ assertThat(tile.getOrder()).isEqualTo(0);
+ }
+
+ @Test
+ public void getPriority_validMetadata_returnMetadataValue() {
+ mActivityInfo.metaData.putInt(META_DATA_KEY_ORDER, 1);
+
+ final Tile tile = new Tile(mActivityInfo, "category");
+
+ assertThat(tile.getOrder()).isEqualTo(1);
+ }
}
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/drawer/TileUtilsTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/drawer/TileUtilsTest.java
index 9fda8564..9f097d8 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/drawer/TileUtilsTest.java
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/drawer/TileUtilsTest.java
@@ -16,6 +16,12 @@
package com.android.settingslib.drawer;
+import static com.android.settingslib.drawer.TileUtils.META_DATA_PREFERENCE_ICON;
+import static com.android.settingslib.drawer.TileUtils.META_DATA_PREFERENCE_ICON_URI;
+import static com.android.settingslib.drawer.TileUtils.META_DATA_PREFERENCE_KEYHINT;
+import static com.android.settingslib.drawer.TileUtils.META_DATA_PREFERENCE_SUMMARY;
+import static com.android.settingslib.drawer.TileUtils.META_DATA_PREFERENCE_SUMMARY_URI;
+
import static com.google.common.truth.Truth.assertThat;
import static org.mockito.ArgumentMatchers.any;
@@ -47,7 +53,6 @@
import android.os.UserHandle;
import android.os.UserManager;
import android.provider.Settings.Global;
-import android.text.TextUtils;
import android.util.ArrayMap;
import android.util.Pair;
@@ -131,7 +136,7 @@
null /* defaultCategory */, outTiles, false /* usePriority */);
assertThat(outTiles.size()).isEqualTo(1);
- assertThat(outTiles.get(0).key).isEqualTo(keyHint);
+ assertThat(outTiles.get(0).getKey(mContext)).isEqualTo(keyHint);
}
@Test
@@ -361,16 +366,16 @@
info.activityInfo.name = "123";
info.activityInfo.metaData = new Bundle();
info.activityInfo.metaData.putString("com.android.settings.category", category);
- info.activityInfo.metaData.putInt("com.android.settings.icon", 314159);
- info.activityInfo.metaData.putString("com.android.settings.summary", "static-summary");
+ info.activityInfo.metaData.putInt(META_DATA_PREFERENCE_ICON, 314159);
+ info.activityInfo.metaData.putString(META_DATA_PREFERENCE_SUMMARY, "static-summary");
if (keyHint != null) {
- info.activityInfo.metaData.putString("com.android.settings.keyhint", keyHint);
+ info.activityInfo.metaData.putString(META_DATA_PREFERENCE_KEYHINT, keyHint);
}
if (iconUri != null) {
- info.activityInfo.metaData.putString("com.android.settings.icon_uri", iconUri);
+ info.activityInfo.metaData.putString(META_DATA_PREFERENCE_ICON_URI, iconUri);
}
if (summaryUri != null) {
- info.activityInfo.metaData.putString("com.android.settings.summary_uri", summaryUri);
+ info.activityInfo.metaData.putString(META_DATA_PREFERENCE_SUMMARY_URI, summaryUri);
}
if (titleResId != 0) {
info.activityInfo.metaData.putInt(TileUtils.META_DATA_PREFERENCE_TITLE, titleResId);
@@ -383,16 +388,4 @@
}
return info;
}
-
- private void addMetadataToInfo(ResolveInfo info, String key, String value) {
- if (!TextUtils.isEmpty(key)) {
- if (info.activityInfo == null) {
- info.activityInfo = new ActivityInfo();
- }
- if (info.activityInfo.metaData == null) {
- info.activityInfo.metaData = new Bundle();
- }
- info.activityInfo.metaData.putString(key, value);
- }
- }
}
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/notification/ZenDurationDialogTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/notification/ZenDurationDialogTest.java
index c8619d8..f47f41c 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/notification/ZenDurationDialogTest.java
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/notification/ZenDurationDialogTest.java
@@ -26,7 +26,7 @@
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.when;
-import android.app.AlertDialog;
+import android.app.Activity;
import android.app.Fragment;
import android.app.NotificationManager;
import android.content.Context;
@@ -40,6 +40,8 @@
import android.view.View;
import android.widget.Button;
+import androidx.appcompat.app.AlertDialog;
+
import com.android.settingslib.SettingsLibRobolectricTestRunner;
import org.junit.Before;
@@ -47,6 +49,7 @@
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
+import org.robolectric.Robolectric;
import org.robolectric.RuntimeEnvironment;
@RunWith(SettingsLibRobolectricTestRunner.class)
@@ -58,6 +61,7 @@
private Condition mCountdownCondition;
private Condition mAlarmCondition;
private ContentResolver mContentResolver;
+ private AlertDialog.Builder mBuilder;
@Before
public void setup() {
@@ -68,13 +72,14 @@
mController = spy(new ZenDurationDialog(mContext));
mController.mLayoutInflater = mLayoutInflater;
mController.getContentView();
+ mBuilder = new AlertDialog.Builder(mContext);
}
@Test
public void testAlwaysPrompt() {
Settings.Secure.putInt(mContentResolver, Settings.Secure.ZEN_DURATION,
Settings.Global.ZEN_DURATION_PROMPT);
- mController.createDialog();
+ mController.setupDialog(mBuilder);
assertFalse(mController.getConditionTagAt(ZenDurationDialog.FOREVER_CONDITION_INDEX).rb
.isChecked());
@@ -88,7 +93,7 @@
public void testForever() {
Settings.Secure.putInt(mContentResolver, Settings.Secure.ZEN_DURATION,
Settings.Secure.ZEN_DURATION_FOREVER);
- mController.createDialog();
+ mController.setupDialog(mBuilder);
assertTrue(mController.getConditionTagAt(ZenDurationDialog.FOREVER_CONDITION_INDEX).rb
.isChecked());
@@ -101,7 +106,7 @@
@Test
public void testSpecificDuration() {
Settings.Secure.putInt(mContentResolver, Settings.Secure.ZEN_DURATION, 45);
- mController.createDialog();
+ mController.setupDialog(mBuilder);
assertFalse(mController.getConditionTagAt(ZenDurationDialog.FOREVER_CONDITION_INDEX).rb
.isChecked());
@@ -117,7 +122,7 @@
Settings.Secure.putInt(mContentResolver, Settings.Secure.ZEN_DURATION,
Settings.Secure.ZEN_DURATION_FOREVER);
- AlertDialog dialog = (AlertDialog) mController.createDialog();
+ mController.setupDialog(mBuilder);
mController.getConditionTagAt(ZenDurationDialog.ALWAYS_ASK_CONDITION_INDEX).rb.setChecked(
true);
mController.updateZenDuration(Settings.Secure.ZEN_DURATION_FOREVER);
@@ -131,7 +136,7 @@
Settings.Secure.putInt(mContentResolver, Settings.Secure.ZEN_DURATION,
Settings.Secure.ZEN_DURATION_PROMPT);
- AlertDialog dialog = (AlertDialog) mController.createDialog();
+ mController.setupDialog(mBuilder);
mController.getConditionTagAt(ZenDurationDialog.FOREVER_CONDITION_INDEX).rb.setChecked(
true);
mController.updateZenDuration(Settings.Secure.ZEN_DURATION_PROMPT);
@@ -145,7 +150,7 @@
Settings.Secure.putInt(mContentResolver, Settings.Secure.ZEN_DURATION,
Settings.Secure.ZEN_DURATION_PROMPT);
- AlertDialog dialog = (AlertDialog) mController.createDialog();
+ mController.setupDialog(mBuilder);
mController.getConditionTagAt(ZenDurationDialog.COUNTDOWN_CONDITION_INDEX).rb.setChecked(
true);
mController.updateZenDuration(Settings.Secure.ZEN_DURATION_PROMPT);
@@ -160,7 +165,7 @@
Settings.Secure.putInt(mContentResolver, Settings.Secure.ZEN_DURATION,
Settings.Secure.ZEN_DURATION_PROMPT);
- AlertDialog dialog = (AlertDialog) mController.createDialog();
+ mController.setupDialog(mBuilder);
// click time button starts at 60 minutes
// - 1 hour to MAX_BUCKET_MINUTES (12 hours), increments by 1 hour
// - 0-60 minutes increments by 15 minutes
diff --git a/packages/SystemUI/res-keyguard/values/attrs.xml b/packages/SystemUI/res-keyguard/values/attrs.xml
index e2ce210..293b683 100644
--- a/packages/SystemUI/res-keyguard/values/attrs.xml
+++ b/packages/SystemUI/res-keyguard/values/attrs.xml
@@ -38,9 +38,5 @@
<attr name="android:textColor" format="color" />
</declare-styleable>
- <declare-styleable name="CarrierText">
- <attr name="allCaps" format="boolean" />
- </declare-styleable>
-
<attr name="passwordStyle" format="reference" />
</resources>
diff --git a/packages/SystemUI/res/layout/keyguard_status_bar.xml b/packages/SystemUI/res/layout/keyguard_status_bar.xml
index 8e491dc..5b9816d 100644
--- a/packages/SystemUI/res/layout/keyguard_status_bar.xml
+++ b/packages/SystemUI/res/layout/keyguard_status_bar.xml
@@ -18,7 +18,7 @@
<!-- Extends RelativeLayout -->
<com.android.systemui.statusbar.phone.KeyguardStatusBarView
xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui"
+ xmlns:systemui="http://schemas.android.com/apk/res-auto"
android:id="@+id/keyguard_header"
android:layout_width="match_parent"
android:layout_height="@dimen/status_bar_header_height_keyguard"
@@ -73,6 +73,8 @@
android:textDirection="locale"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?attr/wallpaperTextColorSecondary"
- android:singleLine="true" />
+ android:singleLine="true"
+ systemui:showMissingSim="true"
+ systemui:showAirplaneMode="true" />
</com.android.systemui.statusbar.phone.KeyguardStatusBarView>
diff --git a/packages/SystemUI/res/values-af/strings_car.xml b/packages/SystemUI/res/values-af/strings_car.xml
index 407ddcb..3f47062 100644
--- a/packages/SystemUI/res/values-af/strings_car.xml
+++ b/packages/SystemUI/res/values-af/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Gas"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Voeg gebruiker by"</string>
<string name="car_new_user" msgid="8142927244990323906">"Nuwe gebruiker"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Wanneer jy \'n nuwe gebruiker byvoeg, moet daardie persoon hul spasie opstel."</string>
diff --git a/packages/SystemUI/res/values-am/strings_car.xml b/packages/SystemUI/res/values-am/strings_car.xml
index 635c9de..769cb5b 100644
--- a/packages/SystemUI/res/values-am/strings_car.xml
+++ b/packages/SystemUI/res/values-am/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"እንግዳ"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"ተጠቃሚ አክል"</string>
<string name="car_new_user" msgid="8142927244990323906">"አዲስ ተጠቃሚ"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"አዲስ ተጠቃሚ ሲያክሉ ያ ሰው የራሳቸውን ቦታ ማቀናበር አለባቸው።"</string>
diff --git a/packages/SystemUI/res/values-ar/strings.xml b/packages/SystemUI/res/values-ar/strings.xml
index 8f197e8..dcf02d5 100644
--- a/packages/SystemUI/res/values-ar/strings.xml
+++ b/packages/SystemUI/res/values-ar/strings.xml
@@ -799,7 +799,7 @@
<string name="accessibility_quick_settings_open_settings" msgid="7806613775728380737">"فتح إعدادات <xliff:g id="ID_1">%s</xliff:g>."</string>
<string name="accessibility_quick_settings_edit" msgid="7839992848995240393">"تعديل ترتيب الإعدادات."</string>
<string name="accessibility_quick_settings_page" msgid="5032979051755200721">"الصفحة <xliff:g id="ID_1">%1$d</xliff:g> من <xliff:g id="ID_2">%2$d</xliff:g>"</string>
- <string name="tuner_lock_screen" msgid="5755818559638850294">"شاشة التأمين"</string>
+ <string name="tuner_lock_screen" msgid="5755818559638850294">"شاشة القفل"</string>
<string name="pip_phone_expand" msgid="5889780005575693909">"توسيع"</string>
<string name="pip_phone_minimize" msgid="1079119422589131792">"تصغير"</string>
<string name="pip_phone_close" msgid="8416647892889710330">"إغلاق"</string>
diff --git a/packages/SystemUI/res/values-ar/strings_car.xml b/packages/SystemUI/res/values-ar/strings_car.xml
index d6dfa12f..deadaae3 100644
--- a/packages/SystemUI/res/values-ar/strings_car.xml
+++ b/packages/SystemUI/res/values-ar/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"ضيف"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"إضافة المستخدم"</string>
<string name="car_new_user" msgid="8142927244990323906">"مستخدم جديد"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"عند إضافة مستخدم جديد، عليه إعداد مساحته."</string>
diff --git a/packages/SystemUI/res/values-as/strings_car.xml b/packages/SystemUI/res/values-as/strings_car.xml
index 1c4d7944..ce19a03 100644
--- a/packages/SystemUI/res/values-as/strings_car.xml
+++ b/packages/SystemUI/res/values-as/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"অতিথি"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"ব্যৱহাৰকাৰী যোগ কৰক"</string>
<string name="car_new_user" msgid="8142927244990323906">"নতুন ব্যৱহাৰকাৰী"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"আপুনি কোনো নতুন ব্য়ৱহাৰকাৰীক যোগ কৰিলে তেখেতে নিজৰ বাবে খালী ঠাই ছেট আপ কৰিব লাগে।"</string>
diff --git a/packages/SystemUI/res/values-az/strings_car.xml b/packages/SystemUI/res/values-az/strings_car.xml
index 79a946c..02ee177 100644
--- a/packages/SystemUI/res/values-az/strings_car.xml
+++ b/packages/SystemUI/res/values-az/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Qonaq"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"İstifadəçi əlavə edin"</string>
<string name="car_new_user" msgid="8142927244990323906">"Yeni İstifadəçi"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Yeni istifadəçi əlavə etdiyinizdə həmin şəxs öz yerini təyin etməlidir."</string>
diff --git a/packages/SystemUI/res/values-b+sr+Latn/strings_car.xml b/packages/SystemUI/res/values-b+sr+Latn/strings_car.xml
index 381d804..7a2032b 100644
--- a/packages/SystemUI/res/values-b+sr+Latn/strings_car.xml
+++ b/packages/SystemUI/res/values-b+sr+Latn/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Gost"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Dodaj korisnika"</string>
<string name="car_new_user" msgid="8142927244990323906">"Novi korisnik"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Kada dodate novog korisnika, ta osoba treba da podesi svoj prostor."</string>
diff --git a/packages/SystemUI/res/values-be/strings_car.xml b/packages/SystemUI/res/values-be/strings_car.xml
index a56dd84..357aeeb 100644
--- a/packages/SystemUI/res/values-be/strings_car.xml
+++ b/packages/SystemUI/res/values-be/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Госць"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Дадаць карыстальніка"</string>
<string name="car_new_user" msgid="8142927244990323906">"Новы карыстальнік"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Калі вы дадаяце новага карыстальніка, яму трэба наладзіць свой профіль."</string>
diff --git a/packages/SystemUI/res/values-bg/strings_car.xml b/packages/SystemUI/res/values-bg/strings_car.xml
index fe159ea..c117ab4 100644
--- a/packages/SystemUI/res/values-bg/strings_car.xml
+++ b/packages/SystemUI/res/values-bg/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Гост"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Добавяне на потребител"</string>
<string name="car_new_user" msgid="8142927244990323906">"Нов потребител"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Когато добавите нов потребител, той трябва да настрои работното си пространство."</string>
diff --git a/packages/SystemUI/res/values-bn/strings.xml b/packages/SystemUI/res/values-bn/strings.xml
index eacf30c..a6dc54a 100644
--- a/packages/SystemUI/res/values-bn/strings.xml
+++ b/packages/SystemUI/res/values-bn/strings.xml
@@ -47,7 +47,7 @@
<string name="status_bar_settings_settings_button" msgid="3023889916699270224">"সেটিংস"</string>
<string name="status_bar_settings_wifi_button" msgid="1733928151698311923">"ওয়াই-ফাই"</string>
<string name="status_bar_settings_auto_rotation" msgid="3790482541357798421">"অটো-রোটেট স্ক্রিন"</string>
- <string name="status_bar_settings_mute_label" msgid="554682549917429396">"নিঃশব্দ করুন"</string>
+ <string name="status_bar_settings_mute_label" msgid="554682549917429396">"মিউট করুন"</string>
<string name="status_bar_settings_auto_brightness_label" msgid="511453614962324674">"স্বতঃ"</string>
<string name="status_bar_settings_notifications" msgid="397146176280905137">"বিজ্ঞপ্তিগুলি"</string>
<string name="bluetooth_tethered" msgid="7094101612161133267">"ব্লুটুথ টিথার করা হয়েছে"</string>
@@ -538,10 +538,10 @@
<string name="qs_status_phone_vibrate" msgid="204362991135761679">"ফোন ভাইব্রেশন মোডে আছে"</string>
<string name="qs_status_phone_muted" msgid="5437668875879171548">"ফোন মিউট করা আছে"</string>
<string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s। সশব্দ করতে আলতো চাপুন।"</string>
- <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s। কম্পন এ সেট করতে আলতো চাপুন। অ্যাক্সেসযোগ্যতার পরিষেবাগুলিকে নিঃশব্দ করা হতে পারে।"</string>
- <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s। নিঃশব্দ করতে আলতো চাপুন। অ্যাক্সেসযোগ্যতার পরিষেবাগুলিকে নিঃশব্দ করা হতে পারে।"</string>
+ <string name="volume_stream_content_description_vibrate" msgid="1187944970457807498">"%1$s। কম্পন এ সেট করতে আলতো চাপুন। অ্যাক্সেসযোগ্যতার পরিষেবাগুলিকে মিউট করা হতে পারে।"</string>
+ <string name="volume_stream_content_description_mute" msgid="3625049841390467354">"%1$s। মিউট করতে আলতো চাপুন। অ্যাক্সেসযোগ্যতার পরিষেবাগুলিকে মিউট করা হতে পারে।"</string>
<string name="volume_stream_content_description_vibrate_a11y" msgid="6427727603978431301">"%1$s। ভাইব্রেট করতে ট্যাপ করুন।"</string>
- <string name="volume_stream_content_description_mute_a11y" msgid="8995013018414535494">"%1$s। নিঃশব্দ করতে ট্যাপ করুন।"</string>
+ <string name="volume_stream_content_description_mute_a11y" msgid="8995013018414535494">"%1$s। মিউট করতে ট্যাপ করুন।"</string>
<string name="volume_ringer_hint_mute" msgid="9199811307292269601">"মিউট করুন"</string>
<string name="volume_ringer_hint_unmute" msgid="6602880133293060368">"আনমিউট করুন"</string>
<string name="volume_ringer_hint_vibrate" msgid="4036802135666515202">"ভাইব্রেট করান"</string>
diff --git a/packages/SystemUI/res/values-bn/strings_car.xml b/packages/SystemUI/res/values-bn/strings_car.xml
index 121e517..2c6857d 100644
--- a/packages/SystemUI/res/values-bn/strings_car.xml
+++ b/packages/SystemUI/res/values-bn/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"অতিথি"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"ব্যবহারকারীকে যুক্ত করুন"</string>
<string name="car_new_user" msgid="8142927244990323906">"নতুন ব্যবহারকারী"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"আপনি কোনও নতুন ব্যবহারকারীকে যোগ করলে তাকে তার স্পেস সেট-আপ করে নিতে হবে।"</string>
diff --git a/packages/SystemUI/res/values-bs/strings_car.xml b/packages/SystemUI/res/values-bs/strings_car.xml
index 6591880..4d334c5 100644
--- a/packages/SystemUI/res/values-bs/strings_car.xml
+++ b/packages/SystemUI/res/values-bs/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Gost"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Dodaj korisnika"</string>
<string name="car_new_user" msgid="8142927244990323906">"Novi korisnik"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Kada dodate novog korisnika, ta osoba treba postaviti svoj prostor."</string>
diff --git a/packages/SystemUI/res/values-ca/strings_car.xml b/packages/SystemUI/res/values-ca/strings_car.xml
index 47d59dd..8cd7d38 100644
--- a/packages/SystemUI/res/values-ca/strings_car.xml
+++ b/packages/SystemUI/res/values-ca/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Convidat"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Afegeix un usuari"</string>
<string name="car_new_user" msgid="8142927244990323906">"Usuari nou"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Quan s\'afegeix un usuari nou, aquest usuari ha de configurar el seu espai."</string>
diff --git a/packages/SystemUI/res/values-cs/strings_car.xml b/packages/SystemUI/res/values-cs/strings_car.xml
index 7f29118..7356fd9 100644
--- a/packages/SystemUI/res/values-cs/strings_car.xml
+++ b/packages/SystemUI/res/values-cs/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Host"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Přidat uživatele"</string>
<string name="car_new_user" msgid="8142927244990323906">"Nový uživatel"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Každý nově přidaný uživatel si musí nastavit vlastní prostor."</string>
diff --git a/packages/SystemUI/res/values-da/strings.xml b/packages/SystemUI/res/values-da/strings.xml
index fd24f97..8e4f91b 100644
--- a/packages/SystemUI/res/values-da/strings.xml
+++ b/packages/SystemUI/res/values-da/strings.xml
@@ -680,7 +680,7 @@
<string name="keyboard_shortcut_group_applications" msgid="9129465955073449206">"Applikationer"</string>
<string name="keyboard_shortcut_group_applications_assist" msgid="9095441910537146013">"Assistance"</string>
<string name="keyboard_shortcut_group_applications_browser" msgid="6465985474000766533">"Browser"</string>
- <string name="keyboard_shortcut_group_applications_contacts" msgid="2064197111278436375">"Kontaktpersoner"</string>
+ <string name="keyboard_shortcut_group_applications_contacts" msgid="2064197111278436375">"Kontakter"</string>
<string name="keyboard_shortcut_group_applications_email" msgid="6257036897441939004">"E-mail"</string>
<string name="keyboard_shortcut_group_applications_sms" msgid="638701213803242744">"Sms"</string>
<string name="keyboard_shortcut_group_applications_music" msgid="4775559515850922780">"Musik"</string>
diff --git a/packages/SystemUI/res/values-da/strings_car.xml b/packages/SystemUI/res/values-da/strings_car.xml
index 1e7bbbf..4112ad9 100644
--- a/packages/SystemUI/res/values-da/strings_car.xml
+++ b/packages/SystemUI/res/values-da/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Gæst"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Tilføj bruger"</string>
<string name="car_new_user" msgid="8142927244990323906">"Ny bruger"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Når du tilføjer en ny bruger, skal vedkommende konfigurere sit område."</string>
diff --git a/packages/SystemUI/res/values-de/strings_car.xml b/packages/SystemUI/res/values-de/strings_car.xml
index bf03f5d..7dcf6be 100644
--- a/packages/SystemUI/res/values-de/strings_car.xml
+++ b/packages/SystemUI/res/values-de/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Gast"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Nutzer hinzufügen"</string>
<string name="car_new_user" msgid="8142927244990323906">"Neuer Nutzer"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Wenn du einen neuen Nutzer hinzufügst, muss dieser seinen Bereich einrichten."</string>
diff --git a/packages/SystemUI/res/values-el/strings_car.xml b/packages/SystemUI/res/values-el/strings_car.xml
index 37e4e92b..b4157e7 100644
--- a/packages/SystemUI/res/values-el/strings_car.xml
+++ b/packages/SystemUI/res/values-el/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Επισκέπτης"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Προσθήκη χρήστη"</string>
<string name="car_new_user" msgid="8142927244990323906">"Νέος χρήστης"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Όταν προσθέτετε έναν νέο χρήστη, αυτός ο χρήστης θα πρέπει να ρυθμίσει τον χώρο του."</string>
diff --git a/packages/SystemUI/res/values-en-rAU/strings_car.xml b/packages/SystemUI/res/values-en-rAU/strings_car.xml
index e058c5b..4bb06c7 100644
--- a/packages/SystemUI/res/values-en-rAU/strings_car.xml
+++ b/packages/SystemUI/res/values-en-rAU/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Guest"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Add User"</string>
<string name="car_new_user" msgid="8142927244990323906">"New User"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"When you add a new user, that person needs to set up their space."</string>
diff --git a/packages/SystemUI/res/values-en-rCA/strings_car.xml b/packages/SystemUI/res/values-en-rCA/strings_car.xml
index e058c5b..4bb06c7 100644
--- a/packages/SystemUI/res/values-en-rCA/strings_car.xml
+++ b/packages/SystemUI/res/values-en-rCA/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Guest"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Add User"</string>
<string name="car_new_user" msgid="8142927244990323906">"New User"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"When you add a new user, that person needs to set up their space."</string>
diff --git a/packages/SystemUI/res/values-en-rGB/strings_car.xml b/packages/SystemUI/res/values-en-rGB/strings_car.xml
index e058c5b..4bb06c7 100644
--- a/packages/SystemUI/res/values-en-rGB/strings_car.xml
+++ b/packages/SystemUI/res/values-en-rGB/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Guest"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Add User"</string>
<string name="car_new_user" msgid="8142927244990323906">"New User"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"When you add a new user, that person needs to set up their space."</string>
diff --git a/packages/SystemUI/res/values-en-rIN/strings_car.xml b/packages/SystemUI/res/values-en-rIN/strings_car.xml
index e058c5b..4bb06c7 100644
--- a/packages/SystemUI/res/values-en-rIN/strings_car.xml
+++ b/packages/SystemUI/res/values-en-rIN/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Guest"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Add User"</string>
<string name="car_new_user" msgid="8142927244990323906">"New User"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"When you add a new user, that person needs to set up their space."</string>
diff --git a/packages/SystemUI/res/values-en-rXC/strings_car.xml b/packages/SystemUI/res/values-en-rXC/strings_car.xml
index fe91bea..deb7021 100644
--- a/packages/SystemUI/res/values-en-rXC/strings_car.xml
+++ b/packages/SystemUI/res/values-en-rXC/strings_car.xml
@@ -20,6 +20,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Guest"</string>
+ <string name="start_guest_session" msgid="7055742120180595689">"Guest"</string>
<string name="car_add_user" msgid="5245196248349230898">"Add User"</string>
<string name="car_new_user" msgid="8142927244990323906">"New User"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"When you add a new user, that person needs to set up their space."</string>
diff --git a/packages/SystemUI/res/values-es-rUS/strings_car.xml b/packages/SystemUI/res/values-es-rUS/strings_car.xml
index c81573eb8..db6c93e 100644
--- a/packages/SystemUI/res/values-es-rUS/strings_car.xml
+++ b/packages/SystemUI/res/values-es-rUS/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Invitado"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Agregar usuario"</string>
<string name="car_new_user" msgid="8142927244990323906">"Nuevo usuario"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Cuando agregues un usuario nuevo, esa persona deberá configurar su espacio."</string>
diff --git a/packages/SystemUI/res/values-es/strings_car.xml b/packages/SystemUI/res/values-es/strings_car.xml
index 7da21a8..503788c 100644
--- a/packages/SystemUI/res/values-es/strings_car.xml
+++ b/packages/SystemUI/res/values-es/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Invitado"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Añadir usuario"</string>
<string name="car_new_user" msgid="8142927244990323906">"Nuevo usuario"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Al añadir un nuevo usuario, este debe configurar su espacio."</string>
diff --git a/packages/SystemUI/res/values-et/strings_car.xml b/packages/SystemUI/res/values-et/strings_car.xml
index 9ed97aa..ac010fe 100644
--- a/packages/SystemUI/res/values-et/strings_car.xml
+++ b/packages/SystemUI/res/values-et/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Külaline"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Kasutaja lisamine"</string>
<string name="car_new_user" msgid="8142927244990323906">"Uus kasutaja"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Kui lisate uue kasutaja, siis peab ta seadistama oma ruumi."</string>
diff --git a/packages/SystemUI/res/values-eu/strings_car.xml b/packages/SystemUI/res/values-eu/strings_car.xml
index 99c66d2..6375ce0 100644
--- a/packages/SystemUI/res/values-eu/strings_car.xml
+++ b/packages/SystemUI/res/values-eu/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Gonbidatua"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Gehitu erabiltzaile bat"</string>
<string name="car_new_user" msgid="8142927244990323906">"Erabiltzaile berria"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Erabiltzaile bat gehitzen duzunean, bere eremua konfiguratu beharko du."</string>
diff --git a/packages/SystemUI/res/values-fa/strings_car.xml b/packages/SystemUI/res/values-fa/strings_car.xml
index 3328af1..f74c33c 100644
--- a/packages/SystemUI/res/values-fa/strings_car.xml
+++ b/packages/SystemUI/res/values-fa/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"مهمان"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"افزودن کاربر"</string>
<string name="car_new_user" msgid="8142927244990323906">"کاربر جدید"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"وقتی کاربر جدیدی اضافه میکنید، آن فرد باید فضای خود را تنظیم کند."</string>
diff --git a/packages/SystemUI/res/values-fi/strings_car.xml b/packages/SystemUI/res/values-fi/strings_car.xml
index 408eea1..b2501ee 100644
--- a/packages/SystemUI/res/values-fi/strings_car.xml
+++ b/packages/SystemUI/res/values-fi/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Vieras"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Lisää käyttäjä"</string>
<string name="car_new_user" msgid="8142927244990323906">"Uusi käyttäjä"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Kun lisäät uuden käyttäjän, hänen on määritettävä oman tilansa asetukset."</string>
diff --git a/packages/SystemUI/res/values-fr-rCA/strings_car.xml b/packages/SystemUI/res/values-fr-rCA/strings_car.xml
index e1cd5a2..8041e7e 100644
--- a/packages/SystemUI/res/values-fr-rCA/strings_car.xml
+++ b/packages/SystemUI/res/values-fr-rCA/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Invité"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Ajouter un utilisateur"</string>
<string name="car_new_user" msgid="8142927244990323906">"Nouvel utilisateur"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Lorsque vous ajoutez un utilisateur, celui-ci doit configurer son espace."</string>
diff --git a/packages/SystemUI/res/values-fr/strings.xml b/packages/SystemUI/res/values-fr/strings.xml
index e38e83c..532fe50 100644
--- a/packages/SystemUI/res/values-fr/strings.xml
+++ b/packages/SystemUI/res/values-fr/strings.xml
@@ -536,7 +536,7 @@
<string name="ring_toggle_title" msgid="3281244519428819576">"Appels"</string>
<string name="volume_ringer_status_normal" msgid="4273142424125855384">"Sonnerie"</string>
<string name="volume_ringer_status_vibrate" msgid="1825615171021346557">"Vibreur"</string>
- <string name="volume_ringer_status_silent" msgid="6896394161022916369">"Silencieux"</string>
+ <string name="volume_ringer_status_silent" msgid="6896394161022916369">"Couper le son"</string>
<string name="qs_status_phone_vibrate" msgid="204362991135761679">"Mode Vibreur activé"</string>
<string name="qs_status_phone_muted" msgid="5437668875879171548">"Sons du téléphone désactivés"</string>
<string name="volume_stream_content_description_unmute" msgid="4436631538779230857">"%1$s. Appuyez pour ne plus ignorer."</string>
diff --git a/packages/SystemUI/res/values-fr/strings_car.xml b/packages/SystemUI/res/values-fr/strings_car.xml
index f35d2f6..4a6bd70 100644
--- a/packages/SystemUI/res/values-fr/strings_car.xml
+++ b/packages/SystemUI/res/values-fr/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Invité"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Ajouter un utilisateur"</string>
<string name="car_new_user" msgid="8142927244990323906">"Nouvel utilisateur"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Lorsque vous ajoutez un utilisateur, celui-ci doit configurer son espace."</string>
diff --git a/packages/SystemUI/res/values-gl/strings_car.xml b/packages/SystemUI/res/values-gl/strings_car.xml
index e69c302..d897b34 100644
--- a/packages/SystemUI/res/values-gl/strings_car.xml
+++ b/packages/SystemUI/res/values-gl/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Convidado"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Engadir usuario"</string>
<string name="car_new_user" msgid="8142927244990323906">"Novo usuario"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Cando engadas un usuario novo, este deberá configurar o seu espazo."</string>
diff --git a/packages/SystemUI/res/values-gu/strings_car.xml b/packages/SystemUI/res/values-gu/strings_car.xml
index 83ae932..e42c247 100644
--- a/packages/SystemUI/res/values-gu/strings_car.xml
+++ b/packages/SystemUI/res/values-gu/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"અતિથિ"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"વપરાશકર્તા ઉમેરો"</string>
<string name="car_new_user" msgid="8142927244990323906">"નવા વપરાશકર્તા"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"જ્યારે તમે કોઈ નવા વપરાશકર્તાને ઉમેરો છો, ત્યારે તે વ્યક્તિએ તેમની સ્પેસ સેટ કરવાની જરૂર રહે છે."</string>
diff --git a/packages/SystemUI/res/values-hi/strings_car.xml b/packages/SystemUI/res/values-hi/strings_car.xml
index 468fba0..8820046 100644
--- a/packages/SystemUI/res/values-hi/strings_car.xml
+++ b/packages/SystemUI/res/values-hi/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"मेहमान"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"उपयोगकर्ता जोड़ें"</string>
<string name="car_new_user" msgid="8142927244990323906">"नया उपयोगकर्ता"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"जब आप कोई नया उपयोगकर्ता जोड़ते हैं तो, उस व्यक्ति को अपनी जगह सेट करनी होती है."</string>
diff --git a/packages/SystemUI/res/values-hr/strings_car.xml b/packages/SystemUI/res/values-hr/strings_car.xml
index aff0090..a94f235 100644
--- a/packages/SystemUI/res/values-hr/strings_car.xml
+++ b/packages/SystemUI/res/values-hr/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Gost"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Dodajte korisnika"</string>
<string name="car_new_user" msgid="8142927244990323906">"Novi korisnik"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Kada dodate novog korisnika, ta osoba mora postaviti vlastiti prostor."</string>
diff --git a/packages/SystemUI/res/values-hu/strings_car.xml b/packages/SystemUI/res/values-hu/strings_car.xml
index 1eb17ce..223b354 100644
--- a/packages/SystemUI/res/values-hu/strings_car.xml
+++ b/packages/SystemUI/res/values-hu/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Vendég"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Felhasználó hozzáadása"</string>
<string name="car_new_user" msgid="8142927244990323906">"Új felhasználó"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Ha új felhasználót ad hozzá, az illetőnek be kell állítania saját felületét."</string>
diff --git a/packages/SystemUI/res/values-hy/strings_car.xml b/packages/SystemUI/res/values-hy/strings_car.xml
index 555deeb..dd734f0 100644
--- a/packages/SystemUI/res/values-hy/strings_car.xml
+++ b/packages/SystemUI/res/values-hy/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Հյուր"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Ավելացնել օգտատեր"</string>
<string name="car_new_user" msgid="8142927244990323906">"Նոր օգտատեր"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Երբ դուք նոր օգտատեր եք ավելացնում, նա պետք է կարգավորի իր պրոֆիլը:"</string>
diff --git a/packages/SystemUI/res/values-in/strings_car.xml b/packages/SystemUI/res/values-in/strings_car.xml
index f0620d0..de0a1a8 100644
--- a/packages/SystemUI/res/values-in/strings_car.xml
+++ b/packages/SystemUI/res/values-in/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Tamu"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Tambahkan Pengguna"</string>
<string name="car_new_user" msgid="8142927244990323906">"Pengguna Baru"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Saat Anda menambahkan pengguna baru, orang tersebut perlu menyiapkan ruangnya sendiri."</string>
diff --git a/packages/SystemUI/res/values-is/strings_car.xml b/packages/SystemUI/res/values-is/strings_car.xml
index 2a633f4..f962765 100644
--- a/packages/SystemUI/res/values-is/strings_car.xml
+++ b/packages/SystemUI/res/values-is/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Gestur"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Bæta notanda við"</string>
<string name="car_new_user" msgid="8142927244990323906">"Nýr notandi"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Þegar þú bætir nýjum notanda við þarf viðkomandi að setja upp sitt eigið svæði."</string>
diff --git a/packages/SystemUI/res/values-it/strings_car.xml b/packages/SystemUI/res/values-it/strings_car.xml
index 095e5dc..5121eb7 100644
--- a/packages/SystemUI/res/values-it/strings_car.xml
+++ b/packages/SystemUI/res/values-it/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Ospite"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Aggiungi utente"</string>
<string name="car_new_user" msgid="8142927244990323906">"Nuovo utente"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Il nuovo utente, una volta aggiunto, dovrà configurare il proprio spazio."</string>
diff --git a/packages/SystemUI/res/values-iw/strings_car.xml b/packages/SystemUI/res/values-iw/strings_car.xml
index 04a8b9e..8b77940 100644
--- a/packages/SystemUI/res/values-iw/strings_car.xml
+++ b/packages/SystemUI/res/values-iw/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"אורח"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"הוספת משתמש"</string>
<string name="car_new_user" msgid="8142927244990323906">"משתמש חדש"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"בעת הוספת משתמש חדש, על משתמש זה להגדיר את המרחב שלו."</string>
diff --git a/packages/SystemUI/res/values-ja/strings_car.xml b/packages/SystemUI/res/values-ja/strings_car.xml
index 5a2872d..fddd512 100644
--- a/packages/SystemUI/res/values-ja/strings_car.xml
+++ b/packages/SystemUI/res/values-ja/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"ゲスト"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"ユーザーを追加"</string>
<string name="car_new_user" msgid="8142927244990323906">"新しいユーザー"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"新しいユーザーを追加したら、そのユーザーは自分のスペースをセットアップする必要があります。"</string>
diff --git a/packages/SystemUI/res/values-ka/strings_car.xml b/packages/SystemUI/res/values-ka/strings_car.xml
index bb12f6d..b729255 100644
--- a/packages/SystemUI/res/values-ka/strings_car.xml
+++ b/packages/SystemUI/res/values-ka/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"სტუმარი"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"მომხმარებლის დამატება"</string>
<string name="car_new_user" msgid="8142927244990323906">"ახალი მომხმარებელი"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"ახალი მომხმარებლის დამატებისას, ამ მომხმარებელს საკუთარი სივრცის შექმნა მოუწევს."</string>
diff --git a/packages/SystemUI/res/values-kk/strings_car.xml b/packages/SystemUI/res/values-kk/strings_car.xml
index 50aedf3..4d1f9cf 100644
--- a/packages/SystemUI/res/values-kk/strings_car.xml
+++ b/packages/SystemUI/res/values-kk/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Қонақ"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Пайдаланушыны енгізу"</string>
<string name="car_new_user" msgid="8142927244990323906">"Жаңа пайдаланушы"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Енгізілген жаңа пайдаланушы өз профилін реттеуі керек."</string>
diff --git a/packages/SystemUI/res/values-km/strings_car.xml b/packages/SystemUI/res/values-km/strings_car.xml
index 15b462c..a897dba 100644
--- a/packages/SystemUI/res/values-km/strings_car.xml
+++ b/packages/SystemUI/res/values-km/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"ភ្ញៀវ"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"បញ្ចូលអ្នកប្រើប្រាស់"</string>
<string name="car_new_user" msgid="8142927244990323906">"អ្នកប្រើប្រាស់ថ្មី"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"នៅពេលដែលអ្នកបញ្ចូលអ្នកប្រើប្រាស់ថ្មី បុគ្គលនោះត្រូវតែរៀបចំទំហំផ្ទុករបស់គេ។"</string>
diff --git a/packages/SystemUI/res/values-kn/strings_car.xml b/packages/SystemUI/res/values-kn/strings_car.xml
index d06d411..53cdc32 100644
--- a/packages/SystemUI/res/values-kn/strings_car.xml
+++ b/packages/SystemUI/res/values-kn/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"ಅತಿಥಿ"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"ಬಳಕೆದಾರ ಸೇರಿಸು"</string>
<string name="car_new_user" msgid="8142927244990323906">"ಹೊಸ ಬಳಕೆದಾರ"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"ನೀವು ಹೊಸ ಬಳಕೆದಾರರನ್ನು ಸೇರಿಸಿದಾಗ, ಆ ವ್ಯಕ್ತಿಯು ಅವರ ಸ್ಥಳವನ್ನು ಸೆಟಪ್ ಮಾಡಬೇಕಾಗುತ್ತದೆ."</string>
diff --git a/packages/SystemUI/res/values-ko/strings_car.xml b/packages/SystemUI/res/values-ko/strings_car.xml
index 1af18aa..9cfaa7f 100644
--- a/packages/SystemUI/res/values-ko/strings_car.xml
+++ b/packages/SystemUI/res/values-ko/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"게스트"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"사용자 추가"</string>
<string name="car_new_user" msgid="8142927244990323906">"신규 사용자"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"추가된 새로운 사용자는 자신의 공간을 설정해야 합니다."</string>
diff --git a/packages/SystemUI/res/values-ky/strings_car.xml b/packages/SystemUI/res/values-ky/strings_car.xml
index f84e073..67ffdbe 100644
--- a/packages/SystemUI/res/values-ky/strings_car.xml
+++ b/packages/SystemUI/res/values-ky/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Конок"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Колдонуучу кошуу"</string>
<string name="car_new_user" msgid="8142927244990323906">"Жаңы колдонуучу"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Жаңы колдонуучу кошулганда, ал өзүнүн профилин жөндөп алышы керек."</string>
diff --git a/packages/SystemUI/res/values-lo/strings_car.xml b/packages/SystemUI/res/values-lo/strings_car.xml
index 124d6a8..a4170098 100644
--- a/packages/SystemUI/res/values-lo/strings_car.xml
+++ b/packages/SystemUI/res/values-lo/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"ແຂກ"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"ເພີ່ມຜູ້ໃຊ້"</string>
<string name="car_new_user" msgid="8142927244990323906">"ຜູ້ໃຊ້ໃໝ່"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"ເມື່ອທ່ານເພີ່ມຜູ້ໃຊ້ໃໝ່, ບຸກຄົນນັ້ນຈຳເປັນຕ້ອງຕັ້ງຄ່າພື້ນທີ່ຂອງເຂົາເຈົ້າ."</string>
diff --git a/packages/SystemUI/res/values-lt/strings_car.xml b/packages/SystemUI/res/values-lt/strings_car.xml
index 7b7856f..704184c 100644
--- a/packages/SystemUI/res/values-lt/strings_car.xml
+++ b/packages/SystemUI/res/values-lt/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Svečias"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Pridėti naudotoją"</string>
<string name="car_new_user" msgid="8142927244990323906">"Naujas naudotojas"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Kai pridedate naują naudotoją, šis asmuo turi nustatyti savo vietą."</string>
diff --git a/packages/SystemUI/res/values-lv/strings_car.xml b/packages/SystemUI/res/values-lv/strings_car.xml
index d19834b..8f5c283 100644
--- a/packages/SystemUI/res/values-lv/strings_car.xml
+++ b/packages/SystemUI/res/values-lv/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Viesis"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Lietotāja pievienošana"</string>
<string name="car_new_user" msgid="8142927244990323906">"Jauns lietotājs"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Kad pievienosiet jaunu lietotāju, viņam būs jāizveido savs profils."</string>
diff --git a/packages/SystemUI/res/values-mk/strings_car.xml b/packages/SystemUI/res/values-mk/strings_car.xml
index 0ac6cd3..772f8cf 100644
--- a/packages/SystemUI/res/values-mk/strings_car.xml
+++ b/packages/SystemUI/res/values-mk/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Гостин"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Додај корисник"</string>
<string name="car_new_user" msgid="8142927244990323906">"Нов корисник"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Кога додавате нов корисник, тоа лице треба да го постави својот простор."</string>
diff --git a/packages/SystemUI/res/values-ml/strings_car.xml b/packages/SystemUI/res/values-ml/strings_car.xml
index e83baf1..10e28ab 100644
--- a/packages/SystemUI/res/values-ml/strings_car.xml
+++ b/packages/SystemUI/res/values-ml/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"അതിഥി"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"ഉപയോക്താവിനെ ചേര്ക്കുക"</string>
<string name="car_new_user" msgid="8142927244990323906">"പുതിയ ഉപയോക്താവ്"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"നിങ്ങളൊരു പുതിയ ഉപയോക്താവിനെ ചേർക്കുമ്പോൾ, ആ വ്യക്തി സ്വന്തം ഇടം സജ്ജീകരിക്കേണ്ടതുണ്ട്."</string>
diff --git a/packages/SystemUI/res/values-mn/strings_car.xml b/packages/SystemUI/res/values-mn/strings_car.xml
index 01a92e7..0b46d3f 100644
--- a/packages/SystemUI/res/values-mn/strings_car.xml
+++ b/packages/SystemUI/res/values-mn/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Зочин"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Хэрэглэгч нэмэх"</string>
<string name="car_new_user" msgid="8142927244990323906">"Шинэ хэрэглэгч"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Таныг шинэ хэрэглэгч нэмэх үед тухайн хэрэглэгч хувийн орон зайгаа тохируулах шаардлагатай."</string>
diff --git a/packages/SystemUI/res/values-mr/strings_car.xml b/packages/SystemUI/res/values-mr/strings_car.xml
index 52d6260..5e23287 100644
--- a/packages/SystemUI/res/values-mr/strings_car.xml
+++ b/packages/SystemUI/res/values-mr/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"अतिथी"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"वापरकर्ता जोडा"</string>
<string name="car_new_user" msgid="8142927244990323906">"नवीन वापरकर्ता"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"तुम्ही नवीन वापरकर्त्याला जोडल्यावर, त्या व्यक्तीने त्यांचे स्थान सेट करणे आवश्यक असते."</string>
diff --git a/packages/SystemUI/res/values-ms/strings_car.xml b/packages/SystemUI/res/values-ms/strings_car.xml
index 6aaf348..8c002c8 100644
--- a/packages/SystemUI/res/values-ms/strings_car.xml
+++ b/packages/SystemUI/res/values-ms/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Tetamu"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Tambah Pengguna"</string>
<string name="car_new_user" msgid="8142927244990323906">"Pengguna Baharu"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Apabila anda menambahkan pengguna baharu, orang itu perlu menyediakan ruang mereka."</string>
diff --git a/packages/SystemUI/res/values-my/strings_car.xml b/packages/SystemUI/res/values-my/strings_car.xml
index 66ab4af..778a82e 100644
--- a/packages/SystemUI/res/values-my/strings_car.xml
+++ b/packages/SystemUI/res/values-my/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"ဧည့်သည်"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"အသုံးပြုသူ ထည့်ရန်"</string>
<string name="car_new_user" msgid="8142927244990323906">"အသုံးပြုသူ အသစ်"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"အသုံးပြုသူအသစ် ထည့်သည့်အခါ ထိုသူသည် မိမိ၏ နေရာကို စီစဉ်သတ်မှတ်ရပါမည်။"</string>
diff --git a/packages/SystemUI/res/values-nb/strings_car.xml b/packages/SystemUI/res/values-nb/strings_car.xml
index f63db63..9db879d 100644
--- a/packages/SystemUI/res/values-nb/strings_car.xml
+++ b/packages/SystemUI/res/values-nb/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Gjest"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Legg til bruker"</string>
<string name="car_new_user" msgid="8142927244990323906">"Ny bruker"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Når du legger til en ny bruker, må vedkommende konfigurere sitt eget område."</string>
diff --git a/packages/SystemUI/res/values-ne/strings_car.xml b/packages/SystemUI/res/values-ne/strings_car.xml
index 1b92f6e..a435c2f 100644
--- a/packages/SystemUI/res/values-ne/strings_car.xml
+++ b/packages/SystemUI/res/values-ne/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"अतिथि"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"प्रयोगकर्ता थप्नुहोस्"</string>
<string name="car_new_user" msgid="8142927244990323906">"नयाँ प्रयोगकर्ता"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"तपाईंले नयाँ प्रयोगकर्ता थप्दा ती व्यक्तिले आफ्नो स्थान सेटअप गर्नु पर्छ।"</string>
diff --git a/packages/SystemUI/res/values-nl/strings_car.xml b/packages/SystemUI/res/values-nl/strings_car.xml
index 6346037..a3fc561 100644
--- a/packages/SystemUI/res/values-nl/strings_car.xml
+++ b/packages/SystemUI/res/values-nl/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Gast"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Gebruiker toevoegen"</string>
<string name="car_new_user" msgid="8142927244990323906">"Nieuwe gebruiker"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Wanneer je een nieuwe gebruiker toevoegt, moet die persoon zijn eigen profiel instellen."</string>
diff --git a/packages/SystemUI/res/values-or/strings_car.xml b/packages/SystemUI/res/values-or/strings_car.xml
index 2dfa37d..aedec96 100644
--- a/packages/SystemUI/res/values-or/strings_car.xml
+++ b/packages/SystemUI/res/values-or/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"ଅତିଥି"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"ୟୁଜର୍ଙ୍କୁ ଯୋଡ଼ନ୍ତୁ"</string>
<string name="car_new_user" msgid="8142927244990323906">"ନୂଆ ୟୁଜର୍"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"ଯେତେବେଳେ ଆପଣ ଜଣେ ନୂଆ ୟୁଜର୍ଙ୍କୁ ଯୋଡ଼ିବେ, ସେହି ବ୍ୟକ୍ତିଙ୍କୁ ନିଜ ପାଇଁ ସ୍ପେସ୍ ସେଟଅପ୍ କରିବାକୁ ପଡ଼ିବ।"</string>
diff --git a/packages/SystemUI/res/values-pa/strings_car.xml b/packages/SystemUI/res/values-pa/strings_car.xml
index 5da8376..e114144 100644
--- a/packages/SystemUI/res/values-pa/strings_car.xml
+++ b/packages/SystemUI/res/values-pa/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"ਮਹਿਮਾਨ"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"ਵਰਤੋਂਕਾਰ ਸ਼ਾਮਲ ਕਰੋ"</string>
<string name="car_new_user" msgid="8142927244990323906">"ਨਵਾਂ ਵਰਤੋਂਕਾਰ"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"ਜਦੋਂ ਤੁਸੀਂ ਇੱਕ ਨਵਾਂ ਵਰਤੋਂਕਾਰ ਸ਼ਾਮਲ ਕਰਦੇ ਹੋ, ਤਾਂ ਉਸ ਵਿਅਕਤੀ ਨੂੰ ਆਪਣੀ ਜਗ੍ਹਾ ਸੈੱਟਅੱਪ ਕਰਨ ਦੀ ਲੋੜ ਹੁੰਦੀ ਹੈ।"</string>
diff --git a/packages/SystemUI/res/values-pl/strings_car.xml b/packages/SystemUI/res/values-pl/strings_car.xml
index 807eeab..c6f4c4d 100644
--- a/packages/SystemUI/res/values-pl/strings_car.xml
+++ b/packages/SystemUI/res/values-pl/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Gość"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Dodaj użytkownika"</string>
<string name="car_new_user" msgid="8142927244990323906">"Nowy użytkownik"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Gdy dodasz nowego użytkownika, musi on skonfigurować swój profil."</string>
diff --git a/packages/SystemUI/res/values-pt-rBR/strings_car.xml b/packages/SystemUI/res/values-pt-rBR/strings_car.xml
index fa23b58..5e6bab7 100644
--- a/packages/SystemUI/res/values-pt-rBR/strings_car.xml
+++ b/packages/SystemUI/res/values-pt-rBR/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Visitante"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Adicionar usuário"</string>
<string name="car_new_user" msgid="8142927244990323906">"Novo usuário"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Quando você adiciona um usuário novo, essa pessoa precisa configurar o espaço dela."</string>
diff --git a/packages/SystemUI/res/values-pt-rPT/strings_car.xml b/packages/SystemUI/res/values-pt-rPT/strings_car.xml
index 9ea0e7a..5850c50 100644
--- a/packages/SystemUI/res/values-pt-rPT/strings_car.xml
+++ b/packages/SystemUI/res/values-pt-rPT/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Convidado"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Adicionar utilizador"</string>
<string name="car_new_user" msgid="8142927244990323906">"Novo utilizador"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Ao adicionar um novo utilizador, essa pessoa tem de configurar o respetivo espaço."</string>
diff --git a/packages/SystemUI/res/values-pt/strings_car.xml b/packages/SystemUI/res/values-pt/strings_car.xml
index fa23b58..5e6bab7 100644
--- a/packages/SystemUI/res/values-pt/strings_car.xml
+++ b/packages/SystemUI/res/values-pt/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Visitante"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Adicionar usuário"</string>
<string name="car_new_user" msgid="8142927244990323906">"Novo usuário"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Quando você adiciona um usuário novo, essa pessoa precisa configurar o espaço dela."</string>
diff --git a/packages/SystemUI/res/values-ro/strings_car.xml b/packages/SystemUI/res/values-ro/strings_car.xml
index c9f0132..41713d1 100644
--- a/packages/SystemUI/res/values-ro/strings_car.xml
+++ b/packages/SystemUI/res/values-ro/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Invitat"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Adăugați un utilizator"</string>
<string name="car_new_user" msgid="8142927244990323906">"Utilizator nou"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Când adăugați un utilizator nou, acesta trebuie să-și configureze spațiul."</string>
diff --git a/packages/SystemUI/res/values-ru/strings_car.xml b/packages/SystemUI/res/values-ru/strings_car.xml
index 63aefb0..f8418ac 100644
--- a/packages/SystemUI/res/values-ru/strings_car.xml
+++ b/packages/SystemUI/res/values-ru/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Гость"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Добавить пользователя"</string>
<string name="car_new_user" msgid="8142927244990323906">"Новый пользователь"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Когда вы добавите пользователя, ему потребуется настроить профиль."</string>
diff --git a/packages/SystemUI/res/values-si/strings_car.xml b/packages/SystemUI/res/values-si/strings_car.xml
index 24b8e49..656696c 100644
--- a/packages/SystemUI/res/values-si/strings_car.xml
+++ b/packages/SystemUI/res/values-si/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"අමුත්තා"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"පරිශීලක එක් කරන්න"</string>
<string name="car_new_user" msgid="8142927244990323906">"නව පරිශීලක"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"ඔබ අලුත් පරිශීලකයෙක් එක් කරන විට, එම පුද්ගලයාට තමන්ගේ ඉඩ සකසා ගැනීමට අවශ්ය වේ."</string>
diff --git a/packages/SystemUI/res/values-sk/strings_car.xml b/packages/SystemUI/res/values-sk/strings_car.xml
index 550fecd..2d5c2ba 100644
--- a/packages/SystemUI/res/values-sk/strings_car.xml
+++ b/packages/SystemUI/res/values-sk/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Hosť"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Pridať používateľa"</string>
<string name="car_new_user" msgid="8142927244990323906">"Nový používateľ"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Keď pridáte nového používateľa, musí si nastaviť vlastný priestor."</string>
diff --git a/packages/SystemUI/res/values-sl/strings_car.xml b/packages/SystemUI/res/values-sl/strings_car.xml
index c67d11e..bb122b4 100644
--- a/packages/SystemUI/res/values-sl/strings_car.xml
+++ b/packages/SystemUI/res/values-sl/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Gost"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Dodaj uporabnika"</string>
<string name="car_new_user" msgid="8142927244990323906">"Nov uporabnik"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Ko dodate novega uporabnika, mora ta nastaviti svoj prostor."</string>
diff --git a/packages/SystemUI/res/values-sq/strings_car.xml b/packages/SystemUI/res/values-sq/strings_car.xml
index e622e60..7dc7dd5 100644
--- a/packages/SystemUI/res/values-sq/strings_car.xml
+++ b/packages/SystemUI/res/values-sq/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"I ftuar"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Shto përdorues"</string>
<string name="car_new_user" msgid="8142927244990323906">"Përdorues i ri"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Kur shton një përdorues të ri, ai person duhet të konfigurojë hapësirën e vet."</string>
diff --git a/packages/SystemUI/res/values-sr/strings_car.xml b/packages/SystemUI/res/values-sr/strings_car.xml
index d25f0e7..801114d 100644
--- a/packages/SystemUI/res/values-sr/strings_car.xml
+++ b/packages/SystemUI/res/values-sr/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Гост"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Додај корисника"</string>
<string name="car_new_user" msgid="8142927244990323906">"Нови корисник"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Када додате новог корисника, та особа треба да подеси свој простор."</string>
diff --git a/packages/SystemUI/res/values-sv/strings_car.xml b/packages/SystemUI/res/values-sv/strings_car.xml
index c758641..fb801ad 100644
--- a/packages/SystemUI/res/values-sv/strings_car.xml
+++ b/packages/SystemUI/res/values-sv/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Gäst"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Lägg till användare"</string>
<string name="car_new_user" msgid="8142927244990323906">"Ny användare"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"När du lägger till en ny användare måste den personen konfigurera sitt utrymme."</string>
diff --git a/packages/SystemUI/res/values-sw/strings_car.xml b/packages/SystemUI/res/values-sw/strings_car.xml
index c4b3dcc..bf7fb5b 100644
--- a/packages/SystemUI/res/values-sw/strings_car.xml
+++ b/packages/SystemUI/res/values-sw/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Mgeni"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Ongeza Mtumiaji"</string>
<string name="car_new_user" msgid="8142927244990323906">"Mtumiaji Mpya"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Ukiongeza mtumiaji mpya, ni lazima aweke kikundi chake."</string>
diff --git a/packages/SystemUI/res/values-ta/strings_car.xml b/packages/SystemUI/res/values-ta/strings_car.xml
index 0187c94..731c275 100644
--- a/packages/SystemUI/res/values-ta/strings_car.xml
+++ b/packages/SystemUI/res/values-ta/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"விருந்தினர்"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"பயனரைச் சேர்க்கவும்"</string>
<string name="car_new_user" msgid="8142927244990323906">"புதிய பயனர்"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"புதிய பயனரைச் சேர்க்கும்போது, அவர் தனக்கான இடத்தை அமைக்க வேண்டும்."</string>
diff --git a/packages/SystemUI/res/values-te/strings_car.xml b/packages/SystemUI/res/values-te/strings_car.xml
index 36afe5d..ec7a779 100644
--- a/packages/SystemUI/res/values-te/strings_car.xml
+++ b/packages/SystemUI/res/values-te/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"అతిథి"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"వినియోగదారును జోడించండి"</string>
<string name="car_new_user" msgid="8142927244990323906">"కొత్త వినియోగదారు"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"మీరు కొత్త వినియోగదారును జోడించినప్పుడు, ఆ వ్యక్తి తన స్థలాన్ని సెటప్ చేసుకోవాలి."</string>
diff --git a/packages/SystemUI/res/values-th/strings.xml b/packages/SystemUI/res/values-th/strings.xml
index 5ca8eff..4616996 100644
--- a/packages/SystemUI/res/values-th/strings.xml
+++ b/packages/SystemUI/res/values-th/strings.xml
@@ -85,7 +85,7 @@
<string name="accessibility_back" msgid="567011538994429120">"กลับ"</string>
<string name="accessibility_home" msgid="8217216074895377641">"หน้าแรก"</string>
<string name="accessibility_menu" msgid="316839303324695949">"เมนู"</string>
- <string name="accessibility_accessibility_button" msgid="7601252764577607915">"ความสามารถเข้าถึงได้ง่าย"</string>
+ <string name="accessibility_accessibility_button" msgid="7601252764577607915">"การเข้าถึงพิเศษ"</string>
<string name="accessibility_rotate_button" msgid="7402949513740253006">"หมุนหน้าจอ"</string>
<string name="accessibility_recent" msgid="5208608566793607626">"ภาพรวม"</string>
<string name="accessibility_search_light" msgid="1103867596330271848">"ค้นหา"</string>
diff --git a/packages/SystemUI/res/values-th/strings_car.xml b/packages/SystemUI/res/values-th/strings_car.xml
index 92cc60b..17f9b8f 100644
--- a/packages/SystemUI/res/values-th/strings_car.xml
+++ b/packages/SystemUI/res/values-th/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"ผู้มาเยือน"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"เพิ่มผู้ใช้"</string>
<string name="car_new_user" msgid="8142927244990323906">"ผู้ใช้ใหม่"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"เมื่อคุณเพิ่มผู้ใช้ใหม่ ผู้ใช้ดังกล่าวจะต้องตั้งค่าพื้นที่ของตนเอง"</string>
diff --git a/packages/SystemUI/res/values-tl/strings_car.xml b/packages/SystemUI/res/values-tl/strings_car.xml
index 19e60a5..0707b2c 100644
--- a/packages/SystemUI/res/values-tl/strings_car.xml
+++ b/packages/SystemUI/res/values-tl/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Bisita"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Magdagdag ng User"</string>
<string name="car_new_user" msgid="8142927244990323906">"Bagong User"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Kapag nagdagdag ka ng bagong user, kailangang i-set up ng taong iyon ang kanyang espasyo."</string>
diff --git a/packages/SystemUI/res/values-tr/strings_car.xml b/packages/SystemUI/res/values-tr/strings_car.xml
index f54498b..6dc7e5d 100644
--- a/packages/SystemUI/res/values-tr/strings_car.xml
+++ b/packages/SystemUI/res/values-tr/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Misafir"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Kullanıcı Ekle"</string>
<string name="car_new_user" msgid="8142927244990323906">"Yeni Kullanıcı"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Yeni kullanıcı eklediğinizde, bu kişinin kendi alanını ayarlaması gerekir."</string>
diff --git a/packages/SystemUI/res/values-uk/strings_car.xml b/packages/SystemUI/res/values-uk/strings_car.xml
index c5e8608..2d36a4b 100644
--- a/packages/SystemUI/res/values-uk/strings_car.xml
+++ b/packages/SystemUI/res/values-uk/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Гість"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Додати користувача"</string>
<string name="car_new_user" msgid="8142927244990323906">"Новий користувач"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Коли ви додаєте нового користувача, він має налаштувати свій профіль."</string>
diff --git a/packages/SystemUI/res/values-ur/strings_car.xml b/packages/SystemUI/res/values-ur/strings_car.xml
index eabff5b..6a85f56 100644
--- a/packages/SystemUI/res/values-ur/strings_car.xml
+++ b/packages/SystemUI/res/values-ur/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"مہمان"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"صارف شامل کریں"</string>
<string name="car_new_user" msgid="8142927244990323906">"نیا صارف"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"جب آپ ایک نیا صارف شامل کرتے ہیں تو اس شخص کو اپنی جگہ کو ترتیب دینے کی ضرورت ہوتی ہے۔"</string>
diff --git a/packages/SystemUI/res/values-uz/strings_car.xml b/packages/SystemUI/res/values-uz/strings_car.xml
index 656e7b3..ad4faf6 100644
--- a/packages/SystemUI/res/values-uz/strings_car.xml
+++ b/packages/SystemUI/res/values-uz/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Mehmon"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Foydalanuvchi qo‘shish"</string>
<string name="car_new_user" msgid="8142927244990323906">"Yangi foydalanuvchi"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Yangi profil qo‘shilgach, uni sozlash lozim."</string>
diff --git a/packages/SystemUI/res/values-vi/strings_car.xml b/packages/SystemUI/res/values-vi/strings_car.xml
index 08aece1..ad9bc9e 100644
--- a/packages/SystemUI/res/values-vi/strings_car.xml
+++ b/packages/SystemUI/res/values-vi/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Khách"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Thêm người dùng"</string>
<string name="car_new_user" msgid="8142927244990323906">"Người dùng mới"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Khi bạn thêm một người dùng mới, người đó cần thiết lập không gian của họ."</string>
diff --git a/packages/SystemUI/res/values-zh-rCN/strings_car.xml b/packages/SystemUI/res/values-zh-rCN/strings_car.xml
index e29397a..8dbb846 100644
--- a/packages/SystemUI/res/values-zh-rCN/strings_car.xml
+++ b/packages/SystemUI/res/values-zh-rCN/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"访客"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"添加用户"</string>
<string name="car_new_user" msgid="8142927244990323906">"新用户"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"当您添加新用户时,该用户必须设置自己的空间。"</string>
diff --git a/packages/SystemUI/res/values-zh-rHK/strings_car.xml b/packages/SystemUI/res/values-zh-rHK/strings_car.xml
index b247dd6..ea8836f 100644
--- a/packages/SystemUI/res/values-zh-rHK/strings_car.xml
+++ b/packages/SystemUI/res/values-zh-rHK/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"訪客"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"新增使用者"</string>
<string name="car_new_user" msgid="8142927244990323906">"新使用者"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"新增的使用者需要自行設定個人空間。"</string>
diff --git a/packages/SystemUI/res/values-zh-rTW/strings_car.xml b/packages/SystemUI/res/values-zh-rTW/strings_car.xml
index 6772d37..2779c7b 100644
--- a/packages/SystemUI/res/values-zh-rTW/strings_car.xml
+++ b/packages/SystemUI/res/values-zh-rTW/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"訪客"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"新增使用者"</string>
<string name="car_new_user" msgid="8142927244990323906">"新使用者"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"新增的使用者需要自行設定個人空間。"</string>
diff --git a/packages/SystemUI/res/values-zu/strings_car.xml b/packages/SystemUI/res/values-zu/strings_car.xml
index f922f46..dc0fec2 100644
--- a/packages/SystemUI/res/values-zu/strings_car.xml
+++ b/packages/SystemUI/res/values-zu/strings_car.xml
@@ -20,6 +20,8 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="car_guest" msgid="3738772168718508650">"Isivakashi"</string>
+ <!-- no translation found for start_guest_session (7055742120180595689) -->
+ <skip />
<string name="car_add_user" msgid="5245196248349230898">"Engeza umsebenzisi"</string>
<string name="car_new_user" msgid="8142927244990323906">"Umsebenzisi omusha"</string>
<string name="user_add_user_message_setup" msgid="1791011504259527329">"Uma ungeza umsebenzisi omusha, loyo muntu udinga ukusetha izikhala zakhe."</string>
diff --git a/packages/SystemUI/res/values/attrs.xml b/packages/SystemUI/res/values/attrs.xml
index 49ee952..f50ef82 100644
--- a/packages/SystemUI/res/values/attrs.xml
+++ b/packages/SystemUI/res/values/attrs.xml
@@ -146,5 +146,12 @@
<!-- Used to style charging animation AVD animation -->
<attr name="chargingAnimColor" format="color" />
+ <!-- Used display CarrierText in Keyguard or QS Footer -->
+ <declare-styleable name="CarrierText">
+ <attr name="allCaps" format="boolean" />
+ <attr name="showMissingSim" format="boolean" />
+ <attr name="showAirplaneMode" format="boolean" />
+ </declare-styleable>
+
</resources>
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index a9d995c..ca6b2d9 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -236,6 +236,9 @@
<!-- Height of search panel including navigation bar height -->
<dimen name="navbar_search_panel_height">230dip</dimen>
+ <!-- Move the back button drawable for 3 button layout upwards in ime mode and in portrait -->
+ <dimen name="navbar_back_button_ime_offset">2dp</dimen>
+
<!-- Height of the draggable handle at the bottom of the phone notification panel -->
<dimen name="close_handle_height">36dp</dimen>
diff --git a/packages/SystemUI/res/values/strings_car.xml b/packages/SystemUI/res/values/strings_car.xml
index 61d734f..2890cf2 100644
--- a/packages/SystemUI/res/values/strings_car.xml
+++ b/packages/SystemUI/res/values/strings_car.xml
@@ -19,7 +19,9 @@
<resources>
<!-- Name of Guest Profile. [CHAR LIMIT=30] -->
<string name="car_guest">Guest</string>
- <!-- Name of Add User Profile. [CHAR LIMIT=30] -->
+ <!-- Title for button that starts a guest session. [CHAR LIMIT=30] -->
+ <string name="start_guest_session">Guest</string>
+ <!-- Title for button that adds a new user. [CHAR LIMIT=30] -->
<string name="car_add_user">Add User</string>
<!-- Default name of the new user created. [CHAR LIMIT=30] -->
<string name="car_new_user">New User</string>
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/DockedStackListenerCompat.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/DockedStackListenerCompat.java
new file mode 100644
index 0000000..bb319e6
--- /dev/null
+++ b/packages/SystemUI/shared/src/com/android/systemui/shared/system/DockedStackListenerCompat.java
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2018 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.shared.system;
+
+import android.view.IDockedStackListener;
+
+/**
+ * An interface to track docked stack changes.
+ */
+public class DockedStackListenerCompat {
+
+ IDockedStackListener.Stub mListener = new IDockedStackListener.Stub() {
+ @Override
+ public void onDividerVisibilityChanged(boolean visible) {}
+
+ @Override
+ public void onDockedStackExistsChanged(boolean exists) {
+ DockedStackListenerCompat.this.onDockedStackExistsChanged(exists);
+ }
+
+ @Override
+ public void onDockedStackMinimizedChanged(boolean minimized, long animDuration,
+ boolean isHomeStackResizable) {
+ DockedStackListenerCompat.this.onDockedStackMinimizedChanged(minimized, animDuration,
+ isHomeStackResizable);
+ }
+
+ @Override
+ public void onAdjustedForImeChanged(boolean adjustedForIme, long animDuration) {}
+
+ @Override
+ public void onDockSideChanged(final int newDockSide) {
+ DockedStackListenerCompat.this.onDockSideChanged(newDockSide);
+ }
+ };
+
+ public void onDockedStackExistsChanged(boolean exists) {
+ // To be overridden
+ }
+
+ public void onDockedStackMinimizedChanged(boolean minimized, long animDuration,
+ boolean isHomeStackResizable) {
+ // To be overridden
+ }
+
+ public void onDockSideChanged(final int newDockSide) {
+ // To be overridden
+ }
+}
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/WindowManagerWrapper.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/WindowManagerWrapper.java
index ed2f831..d83b36d 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/WindowManagerWrapper.java
+++ b/packages/SystemUI/shared/src/com/android/systemui/shared/system/WindowManagerWrapper.java
@@ -166,4 +166,16 @@
}
return NAV_BAR_POS_INVALID;
}
+
+ /**
+ * Registers a docked stack listener with the system.
+ */
+ public void registerDockedStackListener(DockedStackListenerCompat listener) {
+ try {
+ WindowManagerGlobal.getWindowManagerService().registerDockedStackListener(
+ listener.mListener);
+ } catch (RemoteException e) {
+ Log.w(TAG, "Failed to register docked stack listener");
+ }
+ }
}
diff --git a/packages/SystemUI/src/com/android/keyguard/CarrierText.java b/packages/SystemUI/src/com/android/keyguard/CarrierText.java
index 66475e2..a0a3687 100644
--- a/packages/SystemUI/src/com/android/keyguard/CarrierText.java
+++ b/packages/SystemUI/src/com/android/keyguard/CarrierText.java
@@ -43,11 +43,6 @@
import android.telephony.TelephonyManager;
public class CarrierText extends TextView {
- /** Do not show missing sim message. */
- public static final int FLAG_HIDE_MISSING_SIM = 1 << 0;
- /** Do not show airplane mode message. */
- public static final int FLAG_HIDE_AIRPLANE_MODE = 1 << 1;
-
private static final boolean DEBUG = KeyguardConstants.DEBUG;
private static final String TAG = "CarrierText";
@@ -55,17 +50,23 @@
private final boolean mIsEmergencyCallCapable;
+ private boolean mTelephonyCapable;
+
+ private boolean mShowMissingSim;
+
+ private boolean mShowAirplaneMode;
+
private KeyguardUpdateMonitor mKeyguardUpdateMonitor;
private WifiManager mWifiManager;
private boolean[] mSimErrorState = new boolean[TelephonyManager.getDefault().getPhoneCount()];
- private int mFlags;
-
- private KeyguardUpdateMonitorCallback mCallback = new KeyguardUpdateMonitorCallback() {
+ private final KeyguardUpdateMonitorCallback mCallback = new KeyguardUpdateMonitorCallback() {
@Override
public void onRefreshCarrierInfo() {
+ if (DEBUG) Log.d(TAG, "onRefreshCarrierInfo(), mTelephonyCapable: "
+ + Boolean.toString(mTelephonyCapable));
updateCarrierText();
}
@@ -77,9 +78,18 @@
setSelected(true);
};
+ @Override
+ public void onTelephonyCapable(boolean capable) {
+ if (DEBUG) Log.d(TAG, "onTelephonyCapable() mTelephonyCapable: "
+ + Boolean.toString(capable));
+ mTelephonyCapable = capable;
+ updateCarrierText();
+ }
+
public void onSimStateChanged(int subId, int slotId, IccCardConstants.State simState) {
if (slotId < 0) {
- Log.d(TAG, "onSimStateChanged() - slotId invalid: " + slotId);
+ Log.d(TAG, "onSimStateChanged() - slotId invalid: " + slotId
+ + " mTelephonyCapable: " + Boolean.toString(mTelephonyCapable));
return;
}
@@ -91,13 +101,9 @@
mSimErrorState[slotId] = false;
updateCarrierText();
}
- };
+ }
};
- public void setDisplayFlags(int flags) {
- mFlags = flags;
- }
-
/**
* The status of this lock screen. Primarily used for widgets on LockScreen.
*/
@@ -110,7 +116,8 @@
SimLocked, // SIM card is currently locked
SimPermDisabled, // SIM card is permanently disabled due to PUK unlock failure
SimNotReady, // SIM is not ready yet. May never be on devices w/o a SIM.
- SimIoError; // SIM card is faulty
+ SimIoError, // SIM card is faulty
+ SimUnknown // SIM card is unknown
}
public CarrierText(Context context) {
@@ -126,6 +133,8 @@
attrs, R.styleable.CarrierText, 0, 0);
try {
useAllCaps = a.getBoolean(R.styleable.CarrierText_allCaps, false);
+ mShowAirplaneMode = a.getBoolean(R.styleable.CarrierText_showAirplaneMode, false);
+ mShowMissingSim = a.getBoolean(R.styleable.CarrierText_showMissingSim, false);
} finally {
a.recycle();
}
@@ -249,12 +258,12 @@
}
private String getMissingSimMessage() {
- return (mFlags & FLAG_HIDE_MISSING_SIM) == 0
+ return mShowMissingSim && mTelephonyCapable
? getContext().getString(R.string.keyguard_missing_sim_message_short) : "";
}
private String getAirplaneModeMessage() {
- return (mFlags & FLAG_HIDE_AIRPLANE_MODE) == 0
+ return mShowAirplaneMode
? getContext().getString(R.string.airplane_mode) : "";
}
@@ -360,6 +369,9 @@
getContext().getText(R.string.keyguard_sim_error_message_short),
text);
break;
+ case SimUnknown:
+ carrierText = null;
+ break;
}
return carrierText;
@@ -408,11 +420,11 @@
case PERM_DISABLED:
return StatusMode.SimPermDisabled;
case UNKNOWN:
- return StatusMode.SimMissing;
+ return StatusMode.SimUnknown;
case CARD_IO_ERROR:
return StatusMode.SimIoError;
}
- return StatusMode.SimMissing;
+ return StatusMode.SimUnknown;
}
private static CharSequence concatenate(CharSequence plmn, CharSequence spn) {
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
index fa7e814..dfd6a18 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
@@ -84,6 +84,7 @@
import com.android.internal.telephony.TelephonyIntents;
import com.android.internal.util.Preconditions;
import com.android.internal.widget.LockPatternUtils;
+import com.android.settingslib.WirelessUtils;
import com.android.systemui.recents.misc.SysUiTaskStackChangeListener;
import com.android.systemui.shared.system.ActivityManagerWrapper;
@@ -148,6 +149,7 @@
private static final int MSG_ASSISTANT_STACK_CHANGED = 335;
private static final int MSG_BIOMETRIC_AUTHENTICATION_CONTINUE = 336;
private static final int MSG_DEVICE_POLICY_MANAGER_STATE_CHANGED = 337;
+ private static final int MSG_TELEPHONY_CAPABLE = 338;
/** Biometric authentication state: Not listening. */
private static final int BIOMETRIC_STATE_STOPPED = 0;
@@ -204,6 +206,8 @@
private boolean mHasLockscreenWallpaper;
private boolean mAssistantVisible;
private boolean mKeyguardOccluded;
+ @VisibleForTesting
+ protected boolean mTelephonyCapable;
// Device provisioning state
private boolean mDeviceProvisioned;
@@ -344,6 +348,9 @@
case MSG_DEVICE_POLICY_MANAGER_STATE_CHANGED:
updateLogoutEnabled();
break;
+ case MSG_TELEPHONY_CAPABLE:
+ updateTelephonyCapable((boolean)msg.obj);
+ break;
default:
super.handleMessage(msg);
break;
@@ -962,14 +969,18 @@
maxChargingMicroWatt));
mHandler.sendMessage(msg);
} else if (TelephonyIntents.ACTION_SIM_STATE_CHANGED.equals(action)) {
+ SimData args = SimData.fromIntent(intent);
// ACTION_SIM_STATE_CHANGED is rebroadcast after unlocking the device to
// keep compatibility with apps that aren't direct boot aware.
// SysUI should just ignore this broadcast because it was already received
// and processed previously.
if (intent.getBooleanExtra(TelephonyIntents.EXTRA_REBROADCAST_ON_UNLOCK, false)) {
+ // Guarantee mTelephonyCapable state after SysUI crash and restart
+ if (args.simState == State.ABSENT) {
+ mHandler.obtainMessage(MSG_TELEPHONY_CAPABLE, true).sendToTarget();
+ }
return;
}
- SimData args = SimData.fromIntent(intent);
if (DEBUG_SIM_STATES) {
Log.v(TAG, "action " + action
+ " state: " + intent.getStringExtra(IccCardConstants.INTENT_KEY_ICC_STATE)
@@ -1467,6 +1478,16 @@
mUserManager = context.getSystemService(UserManager.class);
mDevicePolicyManager = context.getSystemService(DevicePolicyManager.class);
mLogoutEnabled = mDevicePolicyManager.isLogoutEnabled();
+ updateAirplaneModeState();
+ }
+
+ private void updateAirplaneModeState() {
+ // ACTION_AIRPLANE_MODE_CHANGED do not broadcast if device set AirplaneMode ON and boot
+ if (!WirelessUtils.isAirplaneModeOn(mContext)
+ || mHandler.hasMessages(MSG_AIRPLANE_MODE_CHANGED)) {
+ return;
+ }
+ mHandler.sendEmptyMessage(MSG_AIRPLANE_MODE_CHANGED);
}
private void updateBiometricListeningState() {
@@ -1823,6 +1844,23 @@
}
/**
+ * Handle Telephony status during Boot for CarrierText display policy
+ */
+ @VisibleForTesting
+ void updateTelephonyCapable(boolean capable){
+ if (capable == mTelephonyCapable) {
+ return;
+ }
+ mTelephonyCapable = capable;
+ for (WeakReference<KeyguardUpdateMonitorCallback> ref : mCallbacks) {
+ KeyguardUpdateMonitorCallback cb = ref.get();
+ if (cb != null) {
+ cb.onTelephonyCapable(mTelephonyCapable);
+ }
+ }
+ }
+
+ /**
* Handle {@link #MSG_SIM_STATE_CHANGE}
*/
@VisibleForTesting
@@ -1835,6 +1873,10 @@
if (!SubscriptionManager.isValidSubscriptionId(subId)) {
Log.w(TAG, "invalid subId in handleSimStateChange()");
+ /* Only handle No SIM(ABSENT) due to handleServiceStateChange() handle other case */
+ if (state == State.ABSENT) {
+ updateTelephonyCapable(true);
+ }
return;
}
@@ -1863,7 +1905,8 @@
/**
* Handle {@link #MSG_SERVICE_STATE_CHANGE}
*/
- private void handleServiceStateChange(int subId, ServiceState serviceState) {
+ @VisibleForTesting
+ void handleServiceStateChange(int subId, ServiceState serviceState) {
if (DEBUG) {
Log.d(TAG,
"handleServiceStateChange(subId=" + subId + ", serviceState=" + serviceState);
@@ -1872,6 +1915,8 @@
if (!SubscriptionManager.isValidSubscriptionId(subId)) {
Log.w(TAG, "invalid subId in handleServiceStateChange()");
return;
+ } else {
+ updateTelephonyCapable(true);
}
mServiceStates.put(subId, serviceState);
@@ -2035,6 +2080,7 @@
callback.onRefreshCarrierInfo();
callback.onClockVisibilityChanged();
callback.onKeyguardVisibilityChangedRaw(mKeyguardIsVisible);
+ callback.onTelephonyCapable(mTelephonyCapable);
for (Entry<Integer, SimData> data : mSimDatas.entrySet()) {
final SimData state = data.getValue();
callback.onSimStateChanged(state.subId, state.slotId, state.simState);
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitorCallback.java b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitorCallback.java
index 8135ac5..f818d05 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitorCallback.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitorCallback.java
@@ -117,6 +117,12 @@
public void onUserSwitchComplete(int userId) { }
/**
+ * Called when the Telephony capable
+ * @param capable
+ */
+ public void onTelephonyCapable(boolean capable) { }
+
+ /**
* Called when the SIM state changes.
* @param slotId
* @param simState
diff --git a/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java b/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java
index 520e40a..68d77eb 100644
--- a/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java
+++ b/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java
@@ -43,9 +43,12 @@
import android.graphics.Rect;
import android.graphics.Region;
import android.hardware.display.DisplayManager;
+import android.os.Handler;
+import android.os.HandlerThread;
import android.os.SystemProperties;
import android.provider.Settings.Secure;
import android.util.DisplayMetrics;
+import android.util.Log;
import android.view.DisplayCutout;
import android.view.DisplayInfo;
import android.view.Gravity;
@@ -60,6 +63,7 @@
import android.widget.FrameLayout;
import android.widget.ImageView;
+import com.android.internal.util.Preconditions;
import com.android.systemui.RegionInterceptingFrameLayout.RegionInterceptableView;
import com.android.systemui.fragments.FragmentHostManager;
import com.android.systemui.fragments.FragmentHostManager.FragmentListener;
@@ -79,6 +83,9 @@
* for antialiasing and emulation purposes.
*/
public class ScreenDecorations extends SystemUI implements Tunable {
+ private static final boolean DEBUG = false;
+ private static final String TAG = "ScreenDecorations";
+
public static final String SIZE = "sysui_rounded_size";
public static final String PADDING = "sysui_rounded_content_padding";
private static final boolean DEBUG_SCREENSHOT_ROUNDED_CORNERS =
@@ -99,9 +106,23 @@
private DisplayCutoutView mCutoutBottom;
private SecureSetting mColorInversionSetting;
private boolean mPendingRotationChange;
+ private Handler mHandler;
@Override
public void start() {
+ mHandler = startHandlerThread();
+ mHandler.post(this::startOnScreenDecorationsThread);
+ setupStatusBarPaddingIfNeeded();
+ }
+
+ @VisibleForTesting
+ Handler startHandlerThread() {
+ HandlerThread thread = new HandlerThread("ScreenDecorations");
+ thread.start();
+ return thread.getThreadHandler();
+ }
+
+ private void startOnScreenDecorationsThread() {
mWindowManager = mContext.getSystemService(WindowManager.class);
mRoundedDefault = mContext.getResources().getDimensionPixelSize(
R.dimen.rounded_corner_radius);
@@ -113,12 +134,6 @@
setupDecorations();
}
- int padding = mContext.getResources().getDimensionPixelSize(
- R.dimen.rounded_corner_content_padding);
- if (padding != 0) {
- setupPadding(padding);
- }
-
mDisplayListener = new DisplayManager.DisplayListener() {
@Override
public void onDisplayAdded(int displayId) {
@@ -132,8 +147,8 @@
@Override
public void onDisplayChanged(int displayId) {
- if ((hasRoundedCorners() || shouldDrawCutout()) &&
- mRotation != RotationUtils.getExactRotation(mContext)) {
+ final int newRotation = RotationUtils.getExactRotation(mContext);
+ if (mOverlay != null && mBottomOverlay != null && mRotation != newRotation) {
// We cannot immediately update the orientation. Otherwise
// WindowManager is still deferring layout until it has finished dispatching
// the config changes, which may cause divergence between what we draw
@@ -142,10 +157,15 @@
// - we are trying to redraw. This because WM resized our window and told us to.
// - the config change has been dispatched, so WM is no longer deferring layout.
mPendingRotationChange = true;
+ if (DEBUG) {
+ Log.i(TAG, "Rotation changed, deferring " + newRotation + ", staying at "
+ + mRotation);
+ }
+
mOverlay.getViewTreeObserver().addOnPreDrawListener(
- new RestartingPreDrawListener(mOverlay));
+ new RestartingPreDrawListener(mOverlay, newRotation));
mBottomOverlay.getViewTreeObserver().addOnPreDrawListener(
- new RestartingPreDrawListener(mBottomOverlay));
+ new RestartingPreDrawListener(mBottomOverlay, newRotation));
}
updateOrientation();
}
@@ -154,7 +174,7 @@
mRotation = -1;
mDisplayManager = (DisplayManager) mContext.getSystemService(
Context.DISPLAY_SERVICE);
- mDisplayManager.registerDisplayListener(mDisplayListener, null);
+ mDisplayManager.registerDisplayListener(mDisplayListener, mHandler);
}
private void setupDecorations() {
@@ -184,10 +204,11 @@
mWindowManager.getDefaultDisplay().getMetrics(metrics);
mDensity = metrics.density;
- Dependency.get(TunerService.class).addTunable(this, SIZE);
+ Dependency.get(Dependency.MAIN_HANDLER).post(
+ () -> Dependency.get(TunerService.class).addTunable(this, SIZE));
// Watch color inversion and invert the overlay as needed.
- mColorInversionSetting = new SecureSetting(mContext, Dependency.get(Dependency.MAIN_HANDLER),
+ mColorInversionSetting = new SecureSetting(mContext, mHandler,
Secure.ACCESSIBILITY_DISPLAY_INVERSION_ENABLED) {
@Override
protected void handleValueChanged(int value, boolean observedChange) {
@@ -199,7 +220,7 @@
IntentFilter filter = new IntentFilter();
filter.addAction(Intent.ACTION_USER_SWITCHED);
- mContext.registerReceiver(mIntentReceiver, filter);
+ mContext.registerReceiver(mIntentReceiver, filter, null /* permission */, mHandler);
mOverlay.addOnLayoutChangeListener(new OnLayoutChangeListener() {
@Override
@@ -217,6 +238,11 @@
.start();
}
});
+
+ mOverlay.getViewTreeObserver().addOnPreDrawListener(
+ new ValidatingPreDrawListener(mOverlay));
+ mBottomOverlay.getViewTreeObserver().addOnPreDrawListener(
+ new ValidatingPreDrawListener(mBottomOverlay));
}
private final BroadcastReceiver mIntentReceiver = new BroadcastReceiver() {
@@ -246,14 +272,28 @@
@Override
protected void onConfigurationChanged(Configuration newConfig) {
- mPendingRotationChange = false;
- updateOrientation();
- if (shouldDrawCutout() && mOverlay == null) {
- setupDecorations();
- }
+ mHandler.post(() -> {
+ int oldRotation = mRotation;
+ mPendingRotationChange = false;
+ updateOrientation();
+ if (DEBUG) Log.i(TAG, "onConfigChanged from rot " + oldRotation + " to " + mRotation);
+ if (shouldDrawCutout() && mOverlay == null) {
+ setupDecorations();
+ }
+ if (mOverlay != null) {
+ // Updating the layout params ensures that ViewRootImpl will call relayoutWindow(),
+ // which ensures that the forced seamless rotation will end, even if we updated
+ // the rotation before window manager was ready (and was still waiting for sending
+ // the updated rotation).
+ updateLayoutParams();
+ }
+ });
}
- protected void updateOrientation() {
+ private void updateOrientation() {
+ Preconditions.checkState(mHandler.getLooper().getThread() == Thread.currentThread(),
+ "must call on " + mHandler.getLooper().getThread()
+ + ", but was " + Thread.currentThread());
if (mPendingRotationChange) {
return;
}
@@ -333,7 +373,19 @@
com.android.internal.R.bool.config_fillMainBuiltInDisplayCutout);
}
- private void setupPadding(int padding) {
+
+ private void setupStatusBarPaddingIfNeeded() {
+ // TODO: This should be moved to a more appropriate place, as it is not related to the
+ // screen decorations overlay.
+ int padding = mContext.getResources().getDimensionPixelSize(
+ R.dimen.rounded_corner_content_padding);
+ if (padding != 0) {
+ setupStatusBarPadding(padding);
+ }
+
+ }
+
+ private void setupStatusBarPadding(int padding) {
// Add some padding to all the content near the edge of the screen.
StatusBar sb = getComponent(StatusBar.class);
View statusBar = (sb != null ? sb.getStatusBarWindow() : null);
@@ -402,30 +454,32 @@
@Override
public void onTuningChanged(String key, String newValue) {
- if (mOverlay == null) return;
- if (SIZE.equals(key)) {
- int size = mRoundedDefault;
- int sizeTop = mRoundedDefaultTop;
- int sizeBottom = mRoundedDefaultBottom;
- if (newValue != null) {
- try {
- size = (int) (Integer.parseInt(newValue) * mDensity);
- } catch (Exception e) {
+ mHandler.post(() -> {
+ if (mOverlay == null) return;
+ if (SIZE.equals(key)) {
+ int size = mRoundedDefault;
+ int sizeTop = mRoundedDefaultTop;
+ int sizeBottom = mRoundedDefaultBottom;
+ if (newValue != null) {
+ try {
+ size = (int) (Integer.parseInt(newValue) * mDensity);
+ } catch (Exception e) {
+ }
}
- }
- if (sizeTop == 0) {
- sizeTop = size;
- }
- if (sizeBottom == 0) {
- sizeBottom = size;
- }
+ if (sizeTop == 0) {
+ sizeTop = size;
+ }
+ if (sizeBottom == 0) {
+ sizeBottom = size;
+ }
- setSize(mOverlay.findViewById(R.id.left), sizeTop);
- setSize(mOverlay.findViewById(R.id.right), sizeTop);
- setSize(mBottomOverlay.findViewById(R.id.left), sizeBottom);
- setSize(mBottomOverlay.findViewById(R.id.right), sizeBottom);
- }
+ setSize(mOverlay.findViewById(R.id.left), sizeTop);
+ setSize(mOverlay.findViewById(R.id.right), sizeTop);
+ setSize(mBottomOverlay.findViewById(R.id.left), sizeBottom);
+ setSize(mBottomOverlay.findViewById(R.id.right), sizeBottom);
+ }
+ });
}
private void setSize(View view, int pixelSize) {
@@ -484,6 +538,11 @@
mVisibilityChangedListener = visibilityChangedListener;
mDecorations = decorations;
setId(R.id.display_cutout);
+ if (DEBUG) {
+ getViewTreeObserver().addOnDrawListener(() -> Log.i(TAG,
+ (mInitialStart ? "OverlayTop" : "OverlayBottom")
+ + " drawn in rot " + mRotation));
+ }
}
public void setColor(int color) {
@@ -719,20 +778,66 @@
private class RestartingPreDrawListener implements ViewTreeObserver.OnPreDrawListener {
private final View mView;
+ private final int mTargetRotation;
- private RestartingPreDrawListener(View view) {
+ private RestartingPreDrawListener(View view, int targetRotation) {
+ mView = view;
+ mTargetRotation = targetRotation;
+ }
+
+ @Override
+ public boolean onPreDraw() {
+ mView.getViewTreeObserver().removeOnPreDrawListener(this);
+
+ if (mTargetRotation == mRotation) {
+ if (DEBUG) {
+ Log.i(TAG, (mView == mOverlay ? "OverlayTop" : "OverlayBottom")
+ + " already in target rot "
+ + mTargetRotation + ", allow draw without restarting it");
+ }
+ return true;
+ }
+
+ mPendingRotationChange = false;
+ // This changes the window attributes - we need to restart the traversal for them to
+ // take effect.
+ updateOrientation();
+ if (DEBUG) {
+ Log.i(TAG, (mView == mOverlay ? "OverlayTop" : "OverlayBottom")
+ + " restarting listener fired, restarting draw for rot " + mRotation);
+ }
+ mView.invalidate();
+ return false;
+ }
+ }
+
+ /**
+ * A pre-draw listener, that validates that the rotation we draw in matches the displays
+ * rotation before continuing the draw.
+ *
+ * This is to prevent a race condition, where we have not received the display changed event
+ * yet, and would thus draw in an old orientation.
+ */
+ private class ValidatingPreDrawListener implements ViewTreeObserver.OnPreDrawListener {
+
+ private final View mView;
+
+ public ValidatingPreDrawListener(View view) {
mView = view;
}
@Override
public boolean onPreDraw() {
- mPendingRotationChange = false;
- mView.getViewTreeObserver().removeOnPreDrawListener(this);
- // This changes the window attributes - we need to restart the traversal for them to
- // take effect.
- updateOrientation();
- mView.invalidate();
- return false;
+ final int displayRotation = RotationUtils.getExactRotation(mContext);
+ if (displayRotation != mRotation && !mPendingRotationChange) {
+ if (DEBUG) {
+ Log.i(TAG, "Drawing rot " + mRotation + ", but display is at rot "
+ + displayRotation + ". Restarting draw");
+ }
+ mView.invalidate();
+ return false;
+ }
+ return true;
}
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyboard/KeyboardUI.java b/packages/SystemUI/src/com/android/systemui/keyboard/KeyboardUI.java
index d295bd6..a42191c 100644
--- a/packages/SystemUI/src/com/android/systemui/keyboard/KeyboardUI.java
+++ b/packages/SystemUI/src/com/android/systemui/keyboard/KeyboardUI.java
@@ -598,21 +598,6 @@
mHandler.obtainMessage(MSG_ON_DEVICE_BOND_STATE_CHANGED,
bondState, 0, cachedDevice).sendToTarget();
}
-
- @Override
- public void onDeviceAdded(CachedBluetoothDevice cachedDevice) { }
- @Override
- public void onDeviceDeleted(CachedBluetoothDevice cachedDevice) { }
- @Override
- public void onScanningStateChanged(boolean started) { }
- @Override
- public void onConnectionStateChanged(CachedBluetoothDevice cachedDevice, int state) { }
- @Override
- public void onActiveDeviceChanged(CachedBluetoothDevice activeDevice,
- int bluetoothProfile) { }
-
- @Override
- public void onAudioModeChanged() { }
}
private final class BluetoothErrorListener implements BluetoothUtils.ErrorListener {
diff --git a/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java b/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java
index 9070170..21eab59 100644
--- a/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java
+++ b/packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java
@@ -266,9 +266,12 @@
|| mEstimate.estimateMillis < mSevereWarningThreshold) {
nb.setColor(Utils.getColorAttrDefaultColor(mContext, android.R.attr.colorError));
}
- nb.addAction(0,
- mContext.getString(R.string.battery_saver_start_action),
- pendingBroadcast(ACTION_START_SAVER));
+
+ if (!mPowerMan.isPowerSaveMode()) {
+ nb.addAction(0,
+ mContext.getString(R.string.battery_saver_start_action),
+ pendingBroadcast(ACTION_START_SAVER));
+ }
nb.setOnlyAlertOnce(!mPlaySound);
mPlaySound = false;
SystemUI.overrideNotificationAppName(mContext, nb, false);
diff --git a/packages/SystemUI/src/com/android/systemui/power/PowerUI.java b/packages/SystemUI/src/com/android/systemui/power/PowerUI.java
index 9a648d1..0b9067e 100644
--- a/packages/SystemUI/src/com/android/systemui/power/PowerUI.java
+++ b/packages/SystemUI/src/com/android/systemui/power/PowerUI.java
@@ -333,10 +333,11 @@
@VisibleForTesting
boolean shouldDismissLowBatteryWarning(boolean plugged, int oldBucket, int bucket,
long timeRemaining, boolean isPowerSaver) {
- final boolean hybridWouldDismiss = mEnhancedEstimates.isHybridNotificationEnabled()
+ final boolean hybridEnabled = mEnhancedEstimates.isHybridNotificationEnabled();
+ final boolean hybridWouldDismiss = hybridEnabled
&& timeRemaining > mEnhancedEstimates.getLowWarningThreshold();
final boolean standardWouldDismiss = (bucket > oldBucket && bucket > 0);
- return isPowerSaver
+ return (isPowerSaver && !hybridEnabled)
|| plugged
|| (standardWouldDismiss && (!mEnhancedEstimates.isHybridNotificationEnabled()
|| hybridWouldDismiss));
@@ -344,14 +345,14 @@
private boolean isEnhancedTrigger(boolean plugged, long timeRemaining, boolean isPowerSaver,
int batteryStatus) {
- if (plugged || isPowerSaver || batteryStatus == BatteryManager.BATTERY_STATUS_UNKNOWN) {
+ if (plugged || batteryStatus == BatteryManager.BATTERY_STATUS_UNKNOWN) {
return false;
}
int warnLevel = mLowBatteryReminderLevels[0];
int critLevel = mLowBatteryReminderLevels[1];
- // Only show the low warning once per charge cycle
- final boolean canShowWarning = !mLowWarningShownThisChargeCycle
+ // Only show the low warning once per charge cycle & no battery saver
+ final boolean canShowWarning = !mLowWarningShownThisChargeCycle && !isPowerSaver
&& (timeRemaining < mEnhancedEstimates.getLowWarningThreshold()
|| mBatteryLevel <= warnLevel);
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSFooterImpl.java b/packages/SystemUI/src/com/android/systemui/qs/QSFooterImpl.java
index a6b065f..f147fb3 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSFooterImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSFooterImpl.java
@@ -123,8 +123,6 @@
mMobileSignal = findViewById(R.id.mobile_signal);
mMobileRoaming = findViewById(R.id.mobile_roaming);
mCarrierText = findViewById(R.id.qs_carrier_text);
- mCarrierText.setDisplayFlags(
- CarrierText.FLAG_HIDE_AIRPLANE_MODE | CarrierText.FLAG_HIDE_MISSING_SIM);
mMultiUserSwitch = findViewById(R.id.multi_user_switch);
mMultiUserAvatar = mMultiUserSwitch.findViewById(R.id.multi_user_avatar);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java
index 38d266d..55dfd44 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java
@@ -16,6 +16,7 @@
package com.android.systemui.statusbar;
+import static com.android.systemui.Interpolators.FAST_OUT_SLOW_IN_REVERSE;
import static com.android.systemui.statusbar.phone.NotificationIconContainer.IconState.NO_VALUE;
import android.content.Context;
@@ -26,9 +27,11 @@
import android.util.AttributeSet;
import android.util.Log;
import android.util.MathUtils;
+import android.view.DisplayCutout;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
+import android.view.WindowInsets;
import android.view.accessibility.AccessibilityNodeInfo;
import com.android.systemui.Interpolators;
@@ -89,6 +92,7 @@
private boolean mShowNotificationShelf;
private float mFirstElementRoundness;
private Rect mClipRect = new Rect();
+ private int mCutoutHeight;
public NotificationShelf(Context context, AttributeSet attrs) {
super(context, attrs);
@@ -200,8 +204,12 @@
0 : mAmbientState.getDarkAmount();
mShelfState.yTranslation = MathUtils.lerp(awakenTranslation, darkTranslation, yRatio);
mShelfState.zTranslation = ambientState.getBaseZHeight();
+ // For the small display size, it's not enough to make the icon not covered by
+ // the top cutout so the denominator add the height of cutout.
+ // Totally, (getIntrinsicHeight() * 2 + mCutoutHeight) should be smaller then
+ // mAmbientState.getTopPadding().
float openedAmount = (mShelfState.yTranslation - getFullyClosedTranslation())
- / (getIntrinsicHeight() * 2);
+ / (getIntrinsicHeight() * 2 + mCutoutHeight);
openedAmount = Math.min(1.0f, openedAmount);
mShelfState.openedAmount = openedAmount;
mShelfState.clipTopAmount = 0;
@@ -745,6 +753,22 @@
mRelativeOffset -= mTmp[0];
}
+ @Override
+ public WindowInsets onApplyWindowInsets(WindowInsets insets) {
+ WindowInsets ret = super.onApplyWindowInsets(insets);
+
+ // NotificationShelf drag from the status bar and the status bar dock on the top
+ // of the display for current design so just focus on the top of ScreenDecorations.
+ // In landscape or multiple window split mode, the NotificationShelf still drag from
+ // the top and the physical notch/cutout goes to the right, left, or both side of the
+ // display so it doesn't matter for the NotificationSelf in landscape.
+ DisplayCutout displayCutout = insets.getDisplayCutout();
+ mCutoutHeight = displayCutout == null || displayCutout.getSafeInsetTop() < 0
+ ? 0 : displayCutout.getSafeInsetTop();
+
+ return ret;
+ }
+
private void setOpenedAmount(float openedAmount) {
mNoAnimationsInThisFrame = openedAmount == 1.0f && mOpenedAmount == 0.0f;
mOpenedAmount = openedAmount;
@@ -759,7 +783,7 @@
int width = (int) NotificationUtils.interpolate(
start + mCollapsedIcons.getFinalTranslationX(),
mShelfIcons.getWidth(),
- openedAmount);
+ FAST_OUT_SLOW_IN_REVERSE.getInterpolation(openedAmount));
mShelfIcons.setActualLayoutWidth(width);
boolean hasOverflow = mCollapsedIcons.hasOverflow();
int collapsedPadding = mCollapsedIcons.getPaddingEnd();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java
index 7a357ae..aa07c70 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java
@@ -20,7 +20,6 @@
import android.app.ActivityTaskManager;
import android.graphics.PixelFormat;
import android.graphics.drawable.Drawable;
-import android.os.SystemProperties;
import android.util.Log;
import android.view.Gravity;
import android.view.View;
@@ -51,14 +50,13 @@
import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.util.Map;
+
/**
* A status bar (and navigation bar) tailored for the automotive use case.
*/
public class CarStatusBar extends StatusBar implements
CarBatteryController.BatteryViewHandler {
private static final String TAG = "CarStatusBar";
- public static final boolean ENABLE_HVAC_CONNECTION
- = !SystemProperties.getBoolean("android.car.hvac.demo", true);
private TaskStackListenerImpl mTaskStackListener;
@@ -97,10 +95,9 @@
createBatteryController();
mCarBatteryController.startListening();
- if (ENABLE_HVAC_CONNECTION) {
- Log.d(TAG, "Connecting to HVAC service");
- Dependency.get(HvacController.class).connectToCarService();
- }
+ Log.d(TAG, "Connecting to HVAC service");
+ Dependency.get(HvacController.class).connectToCarService();
+
mCarFacetButtonController = Dependency.get(CarFacetButtonController.class);
mDeviceProvisionedController = Dependency.get(DeviceProvisionedController.class);
mDeviceIsProvisioned = mDeviceProvisionedController.isDeviceProvisioned();
@@ -123,9 +120,9 @@
*/
private void restartNavBars() {
mCarFacetButtonController.removeAll();
- if (ENABLE_HVAC_CONNECTION) {
- Dependency.get(HvacController.class).removeAllComponents();
- }
+
+ Dependency.get(HvacController.class).removeAllComponents();
+
if (mNavigationBarWindow != null) {
mNavigationBarWindow.removeAllViews();
mNavigationBarView = null;
@@ -147,7 +144,7 @@
* Allows for showing or hiding just the navigation bars. This is indented to be used when
* the full screen user selector is shown.
*/
- void setNavBarVisibility(@View.Visibility int visibility) {
+ void setNavBarVisibility(@View.Visibility int visibility) {
if (mNavigationBarWindow != null) {
mNavigationBarWindow.setVisibility(visibility);
}
@@ -268,12 +265,12 @@
private void buildNavBarWindows() {
if (mShowBottom) {
- mNavigationBarWindow = (ViewGroup) View.inflate(mContext,
+ mNavigationBarWindow = (ViewGroup) View.inflate(mContext,
R.layout.navigation_bar_window, null);
}
if (mShowLeft) {
mLeftNavigationBarWindow = (ViewGroup) View.inflate(mContext,
- R.layout.navigation_bar_window, null);
+ R.layout.navigation_bar_window, null);
}
if (mShowRight) {
mRightNavigationBarWindow = (ViewGroup) View.inflate(mContext,
@@ -378,10 +375,12 @@
+ "," + mStackScroller.getScrollY());
}
- pw.print(" mTaskStackListener="); pw.println(mTaskStackListener);
+ pw.print(" mTaskStackListener=");
+ pw.println(mTaskStackListener);
pw.print(" mCarFacetButtonController=");
pw.println(mCarFacetButtonController);
- pw.print(" mFullscreenUserSwitcher="); pw.println(mFullscreenUserSwitcher);
+ pw.print(" mFullscreenUserSwitcher=");
+ pw.println(mFullscreenUserSwitcher);
pw.print(" mCarBatteryController=");
pw.println(mCarBatteryController);
pw.print(" mBatteryMeterView=");
@@ -400,7 +399,10 @@
pw.println("SharedPreferences:");
for (Map.Entry<String, ?> entry : Prefs.getAll(mContext).entrySet()) {
- pw.print(" "); pw.print(entry.getKey()); pw.print("="); pw.println(entry.getValue());
+ pw.print(" ");
+ pw.print(entry.getKey());
+ pw.print("=");
+ pw.println(entry.getValue());
}
}
@@ -446,8 +448,8 @@
}
/**
- * An implementation of SysUiTaskStackChangeListener, that listens for changes in the system task
- * stack and notifies the navigation bar.
+ * An implementation of SysUiTaskStackChangeListener, that listens for changes in the system
+ * task stack and notifies the navigation bar.
*/
private class TaskStackListenerImpl extends SysUiTaskStackChangeListener {
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/car/FullscreenUserSwitcher.java b/packages/SystemUI/src/com/android/systemui/statusbar/car/FullscreenUserSwitcher.java
index 25a55bd..af0ed284 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/car/FullscreenUserSwitcher.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/car/FullscreenUserSwitcher.java
@@ -101,7 +101,8 @@
hideUserGrid();
}
- if (record.mIsForeground) {
+ if (record.mIsForeground || (record.mIsStartGuestSession
+ && mUserManagerHelper.foregroundUserIsGuestUser())) {
dismissKeyguard();
return;
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/car/UserGridRecyclerView.java b/packages/SystemUI/src/com/android/systemui/statusbar/car/UserGridRecyclerView.java
index 257fa75..23724c2 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/car/UserGridRecyclerView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/car/UserGridRecyclerView.java
@@ -109,14 +109,12 @@
userRecords.add(record);
}
- // Add guest user record if the foreground user is not a guest
- if (!mUserManagerHelper.foregroundUserIsGuestUser()) {
- userRecords.add(addGuestUserRecord());
- }
+ // Add button for starting guest session.
+ userRecords.add(createStartGuestUserRecord());
// Add add user record if the foreground user can add users
if (mUserManagerHelper.foregroundUserCanAddUsers()) {
- userRecords.add(addUserRecord());
+ userRecords.add(createAddUserRecord());
}
return userRecords;
@@ -125,17 +123,17 @@
/**
* Create guest user record
*/
- private UserRecord addGuestUserRecord() {
+ private UserRecord createStartGuestUserRecord() {
UserInfo userInfo = new UserInfo();
- userInfo.name = mContext.getString(R.string.car_guest);
- return new UserRecord(userInfo, true /* isStartGuestSession */,
- false /* isAddUser */, false /* isForeground */);
+ userInfo.name = mContext.getString(R.string.start_guest_session);
+ return new UserRecord(userInfo, true /* isStartGuestSession */, false /* isAddUser */,
+ false /* isForeground */);
}
/**
* Create add user record
*/
- private UserRecord addUserRecord() {
+ private UserRecord createAddUserRecord() {
UserInfo userInfo = new UserInfo();
userInfo.name = mContext.getString(R.string.car_add_user);
return new UserRecord(userInfo, false /* isStartGuestSession */,
@@ -210,8 +208,6 @@
return;
}
-
- // If the user selects Guest, start the guest session.
if (userRecord.mIsStartGuestSession) {
notifyUserSelected(userRecord);
mUserManagerHelper.startNewGuestSession(mGuestName);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
index b7bc577..ad2e9dc 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
@@ -25,6 +25,7 @@
import android.animation.LayoutTransition;
import android.animation.LayoutTransition.TransitionListener;
import android.animation.ObjectAnimator;
+import android.animation.PropertyValuesHolder;
import android.animation.TimeInterpolator;
import android.animation.ValueAnimator;
import android.annotation.DrawableRes;
@@ -61,6 +62,7 @@
import com.android.settingslib.Utils;
import com.android.systemui.Dependency;
import com.android.systemui.DockedStackExistsListener;
+import com.android.systemui.Interpolators;
import com.android.systemui.OverviewProxyService;
import com.android.systemui.R;
import com.android.systemui.RecentsComponent;
@@ -483,14 +485,15 @@
Context lightContext = new ContextThemeWrapper(ctx, dualToneLightTheme);
Context darkContext = new ContextThemeWrapper(ctx, dualToneDarkTheme);
- if (oldConfig.orientation != newConfig.orientation
- || oldConfig.densityDpi != newConfig.densityDpi) {
+ final boolean orientationChange = oldConfig.orientation != newConfig.orientation;
+ final boolean densityChange = oldConfig.densityDpi != newConfig.densityDpi;
+ final boolean dirChange = oldConfig.getLayoutDirection() != newConfig.getLayoutDirection();
+
+ if (orientationChange || densityChange) {
mDockedIcon = getDrawable(lightContext, darkContext, R.drawable.ic_sysbar_docked);
mHomeDefaultIcon = getHomeDrawable(lightContext, darkContext);
}
- if (oldConfig.densityDpi != newConfig.densityDpi
- || oldConfig.getLayoutDirection() != newConfig.getLayoutDirection()) {
- mBackIcon = getBackDrawable(lightContext, darkContext);
+ if (densityChange || dirChange) {
mRecentIcon = getDrawable(lightContext, darkContext, R.drawable.ic_sysbar_recent);
mMenuIcon = getDrawable(lightContext, darkContext, R.drawable.ic_sysbar_menu);
@@ -506,6 +509,9 @@
updateCarModeIcons(ctx);
}
}
+ if (orientationChange || densityChange || dirChange) {
+ mBackIcon = getBackDrawable(lightContext, darkContext);
+ }
}
public KeyButtonDrawable getBackDrawable(Context lightContext, Context darkContext) {
@@ -527,9 +533,26 @@
private void orientBackButton(KeyButtonDrawable drawable) {
final boolean useAltBack =
- (mNavigationIconHints & StatusBarManager.NAVIGATION_HINT_BACK_ALT) != 0;
- drawable.setRotation(useAltBack
- ? -90 : (getLayoutDirection() == View.LAYOUT_DIRECTION_RTL) ? 180 : 0);
+ (mNavigationIconHints & StatusBarManager.NAVIGATION_HINT_BACK_ALT) != 0;
+ final boolean isRtl = getLayoutDirection() == View.LAYOUT_DIRECTION_RTL;
+ float degrees = useAltBack
+ ? (isRtl ? 270 : -90)
+ : (isRtl ? 180 : 0);
+ if (drawable.getRotation() == degrees) {
+ return;
+ }
+
+ // Animate the back button's rotation to the new degrees and only in portrait move up the
+ // back button to line up with the other buttons
+ float targetY = !mOverviewProxyService.shouldShowSwipeUpUI() && !mVertical && useAltBack
+ ? - getResources().getDimension(R.dimen.navbar_back_button_ime_offset)
+ : 0;
+ ObjectAnimator navBarAnimator = ObjectAnimator.ofPropertyValuesHolder(drawable,
+ PropertyValuesHolder.ofFloat(KeyButtonDrawable.KEY_DRAWABLE_ROTATE, degrees),
+ PropertyValuesHolder.ofFloat(KeyButtonDrawable.KEY_DRAWABLE_TRANSLATE_Y, targetY));
+ navBarAnimator.setInterpolator(Interpolators.FAST_OUT_SLOW_IN);
+ navBarAnimator.setDuration(200);
+ navBarAnimator.start();
}
private void orientHomeButton(KeyButtonDrawable drawable) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ShadowKeyDrawable.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ShadowKeyDrawable.java
index 2471e34..8bd8048 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ShadowKeyDrawable.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ShadowKeyDrawable.java
@@ -28,8 +28,6 @@
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
-import com.android.systemui.R;
-
/**
* A drawable which adds shadow around a child drawable.
*/
@@ -60,6 +58,23 @@
}
}
+ public void setTranslationX(float x) {
+ setTranslation(x, mState.mTranslationY);
+ }
+
+ public void setTranslationY(float y) {
+ setTranslation(mState.mTranslationX, y);
+ }
+
+ public void setTranslation(float x, float y) {
+ if (mState.mTranslationX != x || mState.mTranslationY != y) {
+ mState.mTranslationX = x;
+ mState.mTranslationY = y;
+ mState.mLastDrawnBitmap = null;
+ invalidateSelf();
+ }
+ }
+
public void setShadowProperties(int x, int y, int size, int color) {
if (mState.mShadowOffsetX != x || mState.mShadowOffsetY != y
|| mState.mShadowSize != size || mState.mShadowColor != color) {
@@ -76,6 +91,14 @@
return mState.mRotateDegrees;
}
+ public float getTranslationX() {
+ return mState.mTranslationX;
+ }
+
+ public float getTranslationY() {
+ return mState.mTranslationY;
+ }
+
@Override
public void draw(Canvas canvas) {
Rect bounds = getBounds();
@@ -151,6 +174,7 @@
// Call mutate, so that the pixel allocation by the underlying vector drawable is cleared.
final Drawable d = mState.mChildState.newDrawable().mutate();
d.setBounds(0, 0, mState.mBaseWidth, mState.mBaseHeight);
+ canvas.translate(mState.mTranslationX, mState.mTranslationY);
d.draw(canvas);
if (mState.mShadowSize > 0) {
@@ -168,9 +192,9 @@
canvas.rotate(mState.mRotateDegrees, width / 2, height / 2);
final float shadowOffsetX = (float) (Math.sin(radians) * mState.mShadowOffsetY
- + Math.cos(radians) * mState.mShadowOffsetX);
+ + Math.cos(radians) * mState.mShadowOffsetX) - mState.mTranslationX;
final float shadowOffsetY = (float) (Math.cos(radians) * mState.mShadowOffsetY
- - Math.sin(radians) * mState.mShadowOffsetX);
+ - Math.sin(radians) * mState.mShadowOffsetX) - mState.mTranslationY;
canvas.drawBitmap(shadow, offset[0] + shadowOffsetX, offset[1] + shadowOffsetY, paint);
d.draw(canvas);
@@ -189,6 +213,8 @@
int mBaseWidth;
int mBaseHeight;
float mRotateDegrees;
+ float mTranslationX;
+ float mTranslationY;
int mShadowOffsetX;
int mShadowOffsetY;
int mShadowSize;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java
index 8df51db..1085b06 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java
@@ -239,11 +239,6 @@
}
@Override
- public void onScanningStateChanged(boolean started) {
- // Don't care.
- }
-
- @Override
public void onDeviceAdded(CachedBluetoothDevice cachedDevice) {
cachedDevice.registerCallback(this);
updateConnected();
@@ -277,12 +272,6 @@
mHandler.sendEmptyMessage(H.MSG_STATE_CHANGED);
}
- @Override
- public void onActiveDeviceChanged(CachedBluetoothDevice activeDevice, int bluetoothProfile) {}
-
- @Override
- public void onAudioModeChanged() {}
-
private ActuallyCachedState getCachedState(CachedBluetoothDevice device) {
ActuallyCachedState state = mCachedState.get(device);
if (state == null) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonDrawable.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonDrawable.java
index 1a85c47..8e31f31 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonDrawable.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonDrawable.java
@@ -22,6 +22,7 @@
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.LayerDrawable;
+import android.util.FloatProperty;
import android.view.Gravity;
import com.android.systemui.R;
@@ -33,6 +34,32 @@
*/
public class KeyButtonDrawable extends LayerDrawable {
+ public static final FloatProperty<KeyButtonDrawable> KEY_DRAWABLE_ROTATE =
+ new FloatProperty<KeyButtonDrawable>("KeyButtonRotation") {
+ @Override
+ public void setValue(KeyButtonDrawable drawable, float degree) {
+ drawable.setRotation(degree);
+ }
+
+ @Override
+ public Float get(KeyButtonDrawable drawable) {
+ return drawable.getRotation();
+ }
+ };
+
+ public static final FloatProperty<KeyButtonDrawable> KEY_DRAWABLE_TRANSLATE_Y =
+ new FloatProperty<KeyButtonDrawable>("KeyButtonTranslateY") {
+ @Override
+ public void setValue(KeyButtonDrawable drawable, float y) {
+ drawable.setTranslationY(y);
+ }
+
+ @Override
+ public Float get(KeyButtonDrawable drawable) {
+ return drawable.getTranslationY();
+ }
+ };
+
private final boolean mHasDarkDrawable;
public static KeyButtonDrawable create(Context lightContext, Drawable lightDrawable,
@@ -83,4 +110,33 @@
((ShadowKeyDrawable) getDrawable(1)).setRotation(degrees);
}
}
+
+ public void setTranslationY(float y) {
+ if (getDrawable(0) instanceof ShadowKeyDrawable) {
+ ((ShadowKeyDrawable) getDrawable(0)).setTranslationY(y);
+ }
+ if (mHasDarkDrawable && getDrawable(1) instanceof ShadowKeyDrawable) {
+ ((ShadowKeyDrawable) getDrawable(1)).setTranslationY(y);
+ }
+ }
+
+ public float getRotation() {
+ if (getDrawable(0) instanceof ShadowKeyDrawable) {
+ return ((ShadowKeyDrawable) getDrawable(0)).getRotation();
+ }
+ if (mHasDarkDrawable && getDrawable(1) instanceof ShadowKeyDrawable) {
+ return ((ShadowKeyDrawable) getDrawable(1)).getRotation();
+ }
+ return 0;
+ }
+
+ public float getTranslationY() {
+ if (getDrawable(0) instanceof ShadowKeyDrawable) {
+ return ((ShadowKeyDrawable) getDrawable(0)).getTranslationY();
+ }
+ if (mHasDarkDrawable && getDrawable(1) instanceof ShadowKeyDrawable) {
+ return ((ShadowKeyDrawable) getDrawable(1)).getTranslationY();
+ }
+ return 0;
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/tuner/TunerServiceImpl.java b/packages/SystemUI/src/com/android/systemui/tuner/TunerServiceImpl.java
index 1bdb7ad..196d9bc 100644
--- a/packages/SystemUI/src/com/android/systemui/tuner/TunerServiceImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/tuner/TunerServiceImpl.java
@@ -119,7 +119,9 @@
// 3 Removed because of a revert.
if (oldVersion < 4) {
// Delay this so that we can wait for everything to be registered first.
- new Handler(Dependency.get(Dependency.BG_LOOPER)).postDelayed(() -> clearAll(), 5000);
+ final int user = mCurrentUser;
+ new Handler(Dependency.get(Dependency.BG_LOOPER)).postDelayed(
+ () -> clearAllFromUser(user), 5000);
}
setValue(TUNER_VERSION, newVersion);
}
@@ -221,6 +223,10 @@
@Override
public void clearAll() {
+ clearAllFromUser(mCurrentUser);
+ }
+
+ public void clearAllFromUser(int user) {
// A couple special cases.
Settings.Global.putString(mContentResolver, DemoMode.DEMO_MODE_ALLOWED, null);
Intent intent = new Intent(DemoMode.ACTION_DEMO);
@@ -231,7 +237,7 @@
if (ArrayUtils.contains(RESET_BLACKLIST, key)) {
continue;
}
- Settings.Secure.putString(mContentResolver, key, null);
+ Settings.Secure.putStringForUser(mContentResolver, key, null, user);
}
}
diff --git a/packages/SystemUI/tests/AndroidManifest.xml b/packages/SystemUI/tests/AndroidManifest.xml
index 1be8322..e604877 100644
--- a/packages/SystemUI/tests/AndroidManifest.xml
+++ b/packages/SystemUI/tests/AndroidManifest.xml
@@ -49,6 +49,7 @@
<uses-permission android:name="android.permission.INTERNAL_SYSTEM_WINDOW" />
<uses-permission android:name="android.permission.NETWORK_SETTINGS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+ <uses-permission android:name="android.permission.REGISTER_WINDOW_MANAGER_LISTENERS" />
<application android:debuggable="true">
<uses-library android:name="android.test.runner" />
diff --git a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java
index d46a974..2055519 100644
--- a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java
+++ b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java
@@ -16,14 +16,22 @@
package com.android.keyguard;
+import static com.google.common.truth.Truth.assertThat;
+
+import com.google.common.truth.Truth.*;
+
import android.content.Context;
import android.content.Intent;
+import android.os.Bundle;
+import android.telephony.ServiceState;
+import android.telephony.SubscriptionManager;
import android.test.suitebuilder.annotation.SmallTest;
import android.testing.AndroidTestingRunner;
import android.testing.TestableLooper;
import android.testing.TestableLooper.RunWithLooper;
import com.android.internal.telephony.IccCardConstants;
+import com.android.internal.telephony.PhoneConstants;
import com.android.internal.telephony.TelephonyIntents;
import com.android.systemui.SysuiTestCase;
@@ -70,6 +78,184 @@
keyguardUpdateMonitor.hasSimStateJustChanged());
}
+ @Test
+ public void testTelephonyCapable_BootInitState() {
+ TestableKeyguardUpdateMonitor keyguardUpdateMonitor =
+ new TestableKeyguardUpdateMonitor(getContext());
+ assertThat(keyguardUpdateMonitor.mTelephonyCapable).isFalse();
+ }
+
+ @Test
+ public void testTelephonyCapable_SimState_Absent() {
+ Intent intent = new Intent(TelephonyIntents.ACTION_SIM_STATE_CHANGED);
+ intent.putExtra(IccCardConstants.INTENT_KEY_ICC_STATE
+ , IccCardConstants.INTENT_VALUE_ICC_ABSENT);
+ TestableKeyguardUpdateMonitor keyguardUpdateMonitor =
+ new TestableKeyguardUpdateMonitor(getContext());
+ keyguardUpdateMonitor.mBroadcastReceiver.onReceive(getContext()
+ , putPhoneInfo(intent,null, false));
+ mTestableLooper.processAllMessages();
+ assertThat(keyguardUpdateMonitor.mTelephonyCapable).isTrue();
+ }
+
+ @Test
+ public void testTelephonyCapable_SimInvalid_ServiceState_InService() {
+ // SERVICE_STATE - IN_SERVICE, but SIM_STATE is invalid TelephonyCapable should be False
+ TestableKeyguardUpdateMonitor keyguardUpdateMonitor =
+ new TestableKeyguardUpdateMonitor(getContext());
+ Intent intent = new Intent(TelephonyIntents.ACTION_SERVICE_STATE_CHANGED);
+ Bundle data = new Bundle();
+ ServiceState state = new ServiceState();
+ state.setState(ServiceState.STATE_IN_SERVICE);
+ state.fillInNotifierBundle(data);
+ keyguardUpdateMonitor.mBroadcastReceiver.onReceive(getContext()
+ , putPhoneInfo(intent, data, false));
+ mTestableLooper.processAllMessages();
+ assertThat(keyguardUpdateMonitor.mTelephonyCapable).isFalse();
+ }
+
+ @Test
+ public void testTelephonyCapable_SimValid_ServiceState_PowerOff() {
+ // Simulate AirplaneMode case, SERVICE_STATE - POWER_OFF, check TelephonyCapable False
+ // Only receive ServiceState callback IN_SERVICE -> OUT_OF_SERVICE -> POWER_OFF
+ TestableKeyguardUpdateMonitor keyguardUpdateMonitor =
+ new TestableKeyguardUpdateMonitor(getContext());
+ Intent intent = new Intent(TelephonyIntents.ACTION_SERVICE_STATE_CHANGED);
+ intent.putExtra(IccCardConstants.INTENT_KEY_ICC_STATE
+ , IccCardConstants.INTENT_VALUE_ICC_LOADED);
+ Bundle data = new Bundle();
+ ServiceState state = new ServiceState();
+ state.setState(ServiceState.STATE_POWER_OFF);
+ state.fillInNotifierBundle(data);
+ keyguardUpdateMonitor.mBroadcastReceiver.onReceive(getContext()
+ , putPhoneInfo(intent, data, true));
+ mTestableLooper.processAllMessages();
+ assertThat(keyguardUpdateMonitor.mTelephonyCapable).isTrue();
+ }
+
+ /* Normal SIM inserted flow
+ * ServiceState: ---OutOfServie----->PowerOff->OutOfServie--->InService
+ * SimState: ----NOT_READY---->READY----------------------LOADED>>>
+ * Subscription: --------null---->null--->"Chunghwa Telecom"-------->>>
+ * System: -------------------------------BOOT_COMPLETED------>>>
+ * TelephonyCapable:(F)-(F)-(F)-(F)-(F)-(F)-(F)-(F)-(F)-(F)------(T)-(T)>>
+ */
+ @Test
+ public void testTelephonyCapable_BootInitState_ServiceState_OutOfService() {
+ TestableKeyguardUpdateMonitor keyguardUpdateMonitor =
+ new TestableKeyguardUpdateMonitor(getContext());
+ Intent intent = new Intent(TelephonyIntents.ACTION_SERVICE_STATE_CHANGED);
+ Bundle data = new Bundle();
+ ServiceState state = new ServiceState();
+ state.setState(ServiceState.STATE_OUT_OF_SERVICE);
+ state.fillInNotifierBundle(data);
+ intent.putExtras(data);
+ keyguardUpdateMonitor.mBroadcastReceiver.onReceive(getContext()
+ , putPhoneInfo(intent, data, false));
+ mTestableLooper.processAllMessages();
+ assertThat(keyguardUpdateMonitor.mTelephonyCapable).isFalse();
+ }
+
+ @Test
+ public void testTelephonyCapable_BootInitState_SimState_NotReady() {
+ TestableKeyguardUpdateMonitor keyguardUpdateMonitor =
+ new TestableKeyguardUpdateMonitor(getContext());
+ Bundle data = new Bundle();
+ ServiceState state = new ServiceState();
+ state.setState(ServiceState.STATE_OUT_OF_SERVICE);
+ state.fillInNotifierBundle(data);
+ Intent intent = new Intent(TelephonyIntents.ACTION_SIM_STATE_CHANGED);
+ intent.putExtra(IccCardConstants.INTENT_KEY_ICC_STATE
+ , IccCardConstants.INTENT_VALUE_ICC_NOT_READY);
+ keyguardUpdateMonitor.mBroadcastReceiver.onReceive(getContext()
+ , putPhoneInfo(intent, data, false));
+ mTestableLooper.processAllMessages();
+ assertThat(keyguardUpdateMonitor.mTelephonyCapable).isFalse();
+ }
+
+ @Test
+ public void testTelephonyCapable_BootInitState_SimState_Ready() {
+ TestableKeyguardUpdateMonitor keyguardUpdateMonitor =
+ new TestableKeyguardUpdateMonitor(getContext());
+ Bundle data = new Bundle();
+ ServiceState state = new ServiceState();
+ state.setState(ServiceState.STATE_OUT_OF_SERVICE);
+ state.fillInNotifierBundle(data);
+ Intent intent = new Intent(TelephonyIntents.ACTION_SIM_STATE_CHANGED);
+ intent.putExtra(IccCardConstants.INTENT_KEY_ICC_STATE
+ , IccCardConstants.INTENT_VALUE_ICC_READY);
+ keyguardUpdateMonitor.mBroadcastReceiver.onReceive(getContext()
+ , putPhoneInfo(intent, data, false));
+ mTestableLooper.processAllMessages();
+ assertThat(keyguardUpdateMonitor.mTelephonyCapable).isFalse();
+ }
+
+ @Test
+ public void testTelephonyCapable_BootInitState_ServiceState_PowerOff() {
+ TestableKeyguardUpdateMonitor keyguardUpdateMonitor =
+ new TestableKeyguardUpdateMonitor(getContext());
+ Intent intent = new Intent(TelephonyIntents.ACTION_SERVICE_STATE_CHANGED);
+ Bundle data = new Bundle();
+ ServiceState state = new ServiceState();
+ state.setState(ServiceState.STATE_POWER_OFF);
+ state.fillInNotifierBundle(data);
+ keyguardUpdateMonitor.mBroadcastReceiver.onReceive(getContext()
+ , putPhoneInfo(intent, data, false));
+ mTestableLooper.processAllMessages();
+ assertThat(keyguardUpdateMonitor.mTelephonyCapable).isFalse();
+ }
+
+ @Test
+ public void testTelephonyCapable_SimValid_ServiceState_InService() {
+ TestableKeyguardUpdateMonitor keyguardUpdateMonitor =
+ new TestableKeyguardUpdateMonitor(getContext());
+ Intent intent = new Intent(TelephonyIntents.ACTION_SERVICE_STATE_CHANGED);
+ Bundle data = new Bundle();
+ ServiceState state = new ServiceState();
+ state.setState(ServiceState.STATE_IN_SERVICE);
+ state.fillInNotifierBundle(data);
+ keyguardUpdateMonitor.mBroadcastReceiver.onReceive(getContext()
+ , putPhoneInfo(intent, data, true));
+ mTestableLooper.processAllMessages();
+ assertThat(keyguardUpdateMonitor.mTelephonyCapable).isTrue();
+ }
+
+ @Test
+ public void testTelephonyCapable_SimValid_SimState_Loaded() {
+ TestableKeyguardUpdateMonitor keyguardUpdateMonitor =
+ new TestableKeyguardUpdateMonitor(getContext());
+ Bundle data = new Bundle();
+ ServiceState state = new ServiceState();
+ state.setState(ServiceState.STATE_IN_SERVICE);
+ state.fillInNotifierBundle(data);
+ Intent intentSimState = new Intent(TelephonyIntents.ACTION_SIM_STATE_CHANGED);
+ intentSimState.putExtra(IccCardConstants.INTENT_KEY_ICC_STATE
+ , IccCardConstants.INTENT_VALUE_ICC_LOADED);
+ keyguardUpdateMonitor.mBroadcastReceiver.onReceive(getContext()
+ , putPhoneInfo(intentSimState, data, true));
+ mTestableLooper.processAllMessages();
+ // Even SimState Loaded, still need ACTION_SERVICE_STATE_CHANGED turn on mTelephonyCapable
+ assertThat(keyguardUpdateMonitor.mTelephonyCapable).isFalse();
+
+ Intent intentServiceState = new Intent(TelephonyIntents.ACTION_SERVICE_STATE_CHANGED);
+ intentSimState.putExtra(IccCardConstants.INTENT_KEY_ICC_STATE
+ , IccCardConstants.INTENT_VALUE_ICC_LOADED);
+ keyguardUpdateMonitor.mBroadcastReceiver.onReceive(getContext()
+ , putPhoneInfo(intentServiceState, data, true));
+ mTestableLooper.processAllMessages();
+ assertThat(keyguardUpdateMonitor.mTelephonyCapable).isTrue();
+ }
+
+ private Intent putPhoneInfo(Intent intent, Bundle data, Boolean simInited) {
+ int subscription = simInited
+ ? 1/* mock subid=1 */ : SubscriptionManager.DUMMY_SUBSCRIPTION_ID_BASE;
+ if (data != null) intent.putExtras(data);
+ intent.putExtra(PhoneConstants.PHONE_NAME_KEY, "Phone");
+ intent.putExtra("subscription", subscription);
+ intent.putExtra("slot", 0/* SLOT 1 */);
+ return intent;
+ }
+
private class TestableKeyguardUpdateMonitor extends KeyguardUpdateMonitor {
AtomicBoolean mSimStateChanged = new AtomicBoolean(false);
diff --git a/packages/SystemUI/tests/src/com/android/systemui/ScreenDecorationsTest.java b/packages/SystemUI/tests/src/com/android/systemui/ScreenDecorationsTest.java
index f1bf31d..644c0b3 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/ScreenDecorationsTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/ScreenDecorationsTest.java
@@ -34,8 +34,10 @@
import android.app.Fragment;
import android.content.res.Configuration;
+import android.os.Handler;
import android.support.test.filters.SmallTest;
import android.testing.AndroidTestingRunner;
+import android.testing.TestableLooper;
import android.testing.TestableLooper.RunWithLooper;
import android.view.Display;
import android.view.View;
@@ -60,6 +62,7 @@
@SmallTest
public class ScreenDecorationsTest extends SysuiTestCase {
+ private TestableLooper mTestableLooper;
private ScreenDecorations mScreenDecorations;
private StatusBar mStatusBar;
private WindowManager mWindowManager;
@@ -71,6 +74,10 @@
@Before
public void setup() {
+ mTestableLooper = TestableLooper.get(this);
+ mDependency.injectTestDependency(Dependency.MAIN_HANDLER,
+ new Handler(mTestableLooper.getLooper()));
+
mStatusBar = mock(StatusBar.class);
mWindowManager = mock(WindowManager.class);
mView = spy(new StatusBarWindowView(mContext, null));
@@ -88,7 +95,31 @@
mTunerService = mDependency.injectMockDependency(TunerService.class);
- mScreenDecorations = new ScreenDecorations();
+
+ mScreenDecorations = new ScreenDecorations() {
+ @Override
+ public void start() {
+ super.start();
+ mTestableLooper.processAllMessages();
+ }
+
+ @Override
+ Handler startHandlerThread() {
+ return new Handler(mTestableLooper.getLooper());
+ }
+
+ @Override
+ protected void onConfigurationChanged(Configuration newConfig) {
+ super.onConfigurationChanged(newConfig);
+ mTestableLooper.processAllMessages();
+ }
+
+ @Override
+ public void onTuningChanged(String key, String newValue) {
+ super.onTuningChanged(key, newValue);
+ mTestableLooper.processAllMessages();
+ }
+ };
mScreenDecorations.mContext = mContext;
mScreenDecorations.mComponents = mContext.getComponents();
diff --git a/packages/SystemUI/tests/src/com/android/systemui/power/PowerUITest.java b/packages/SystemUI/tests/src/com/android/systemui/power/PowerUITest.java
index 5ecf0c0..a9d49f9 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/power/PowerUITest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/power/PowerUITest.java
@@ -323,9 +323,9 @@
}
@Test
- public void testShouldDismissLowBatteryWarning_dismissWhenPowerSaverEnabled() {
+ public void testShouldDismissLowBatteryWarning_dismissWhenPowerSaverEnabledLegacy() {
mPowerUI.start();
- when(mEnhancedEstimates.isHybridNotificationEnabled()).thenReturn(true);
+ when(mEnhancedEstimates.isHybridNotificationEnabled()).thenReturn(false);
when(mEnhancedEstimates.getLowWarningThreshold()).thenReturn(PowerUI.THREE_HOURS_IN_MILLIS);
when(mEnhancedEstimates.getSevereWarningThreshold()).thenReturn(ONE_HOUR_MILLIS);
@@ -337,6 +337,20 @@
}
@Test
+ public void testShouldNotDismissLowBatteryWarning_dismissWhenPowerSaverEnabledHybrid() {
+ mPowerUI.start();
+ when(mEnhancedEstimates.isHybridNotificationEnabled()).thenReturn(true);
+ when(mEnhancedEstimates.getLowWarningThreshold()).thenReturn(PowerUI.THREE_HOURS_IN_MILLIS);
+ when(mEnhancedEstimates.getSevereWarningThreshold()).thenReturn(ONE_HOUR_MILLIS);
+
+ // device that gets power saver turned on should dismiss
+ boolean shouldDismiss =
+ mPowerUI.shouldDismissLowBatteryWarning(UNPLUGGED, BELOW_WARNING_BUCKET,
+ BELOW_WARNING_BUCKET, ABOVE_HYBRID_THRESHOLD, !POWER_SAVER_OFF);
+ assertFalse(shouldDismiss);
+ }
+
+ @Test
public void testShouldDismissLowBatteryWarning_dismissWhenPlugged() {
mPowerUI.start();
when(mEnhancedEstimates.isHybridNotificationEnabled()).thenReturn(true);
diff --git a/packages/VpnDialogs/res/values-th/strings.xml b/packages/VpnDialogs/res/values-th/strings.xml
index f6dfca5..333ff5f 100644
--- a/packages/VpnDialogs/res/values-th/strings.xml
+++ b/packages/VpnDialogs/res/values-th/strings.xml
@@ -17,7 +17,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="prompt" msgid="3183836924226407828">"ขอการเชื่อมต่อ"</string>
- <string name="warning" msgid="809658604548412033">"<xliff:g id="APP">%s</xliff:g> ต้องการติดตั้งการเชื่อมต่อ VPN เพื่อให้แอปสามารถตรวจสอบการเข้าใช้งานเครือข่าย โปรดยอมรับหากคุณเชื่อถือแหล่งที่มานี้เท่านั้น <br /> <br /> <img src=vpn_icon /> จะปรากฏที่ด้านบนหน้าจอเมื่อมีการใช้งาน VPN อยู่"</string>
+ <string name="warning" msgid="809658604548412033">"<xliff:g id="APP">%s</xliff:g> ต้องการสร้างการเชื่อมต่อ VPN เพื่อให้แอปสามารถตรวจสอบการเข้าใช้งานเครือข่าย โปรดยอมรับหากคุณเชื่อถือแหล่งที่มานี้เท่านั้น <br /> <br /> <img src=vpn_icon /> จะปรากฏที่ด้านบนหน้าจอเมื่อมีการใช้งาน VPN อยู่"</string>
<string name="legacy_title" msgid="192936250066580964">"เชื่อมต่อ VPN แล้ว"</string>
<string name="session" msgid="6470628549473641030">"เซสชัน"</string>
<string name="duration" msgid="3584782459928719435">"ระยะเวลา:"</string>
diff --git a/proto/src/metrics_constants.proto b/proto/src/metrics_constants.proto
index 02f0439..e0cf846 100644
--- a/proto/src/metrics_constants.proto
+++ b/proto/src/metrics_constants.proto
@@ -941,9 +941,10 @@
// OS: 6.0
NOTIFICATION_ZEN_MODE_EVENT_RULE = 146;
- // ACTION: App notification settings > Block Notifications
+ // ACTION: App notification settings > Block Notifications or long press on
+ // notification blocks.
// CATEGORY: SETTINGS
- // OS: 6.0
+ // OS: 9.0
ACTION_BAN_APP_NOTES = 147;
// ACTION: Notification shade > Dismiss all button
@@ -6180,6 +6181,250 @@
// OS: Q
DIALOG_ACCESSIBILITY_HEARINGAID = 1512;
+ // ACTION: Activity start
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ ACTION_ACTIVITY_START = 1513;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Calling UID
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_CALLING_UID = 1514;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Calling package name
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_CALLING_PACKAGE_NAME = 1515;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Calling UID proc state
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_CALLING_UID_PROC_STATE = 1516;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Calling UID has any visible window
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_CALLING_UID_HAS_ANY_VISIBLE_WINDOW = 1517;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Real calling UID
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_REAL_CALLING_UID = 1518;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Real calling UID proc state
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_REAL_CALLING_UID_PROC_STATE = 1519;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Real calling UID has any visible window
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_REAL_CALLING_UID_HAS_ANY_VISIBLE_WINDOW = 1520;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Target UID
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_TARGET_UID = 1521;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Target UID package name
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_TARGET_PACKAGE_NAME = 1522;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Target UID proc state
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_TARGET_UID_PROC_STATE = 1523;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Target UID has any visible window
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_TARGET_UID_HAS_ANY_VISIBLE_WINDOW = 1524;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Target doze whitelist tag
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_TARGET_WHITELIST_TAG = 1525;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Target short component name
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_TARGET_SHORT_COMPONENT_NAME = 1526;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Coming from pending intent
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_COMING_FROM_PENDING_INTENT = 1527;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Intent action
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_INTENT_ACTION = 1528;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Caller app process record process name
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_PROCESS_RECORD_PROCESS_NAME = 1529;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Caller app process record current proc state
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_PROCESS_RECORD_CUR_PROC_STATE = 1530;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Caller app process record has client activities
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_PROCESS_RECORD_HAS_CLIENT_ACTIVITIES = 1531;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Caller app process record has foreground services
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_PROCESS_RECORD_HAS_FOREGROUND_SERVICES = 1532;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Caller app process record has foreground activities
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_PROCESS_RECORD_HAS_FOREGROUND_ACTIVITIES = 1533;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Caller app process record has top UI
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_PROCESS_RECORD_HAS_TOP_UI = 1534;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Caller app process record has overlay UI
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_PROCESS_RECORD_HAS_OVERLAY_UI = 1535;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Caller app process record pending UI clean
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_PROCESS_RECORD_PENDING_UI_CLEAN = 1536;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Millis since caller app's process record last interaction event
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_PROCESS_RECORD_MILLIS_SINCE_LAST_INTERACTION_EVENT = 1537;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Millis since caller app's process record fg interaction
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_PROCESS_RECORD_MILLIS_SINCE_FG_INTERACTION = 1538;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Millis since caller app's process record last became unimportant
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_PROCESS_RECORD_MILLIS_SINCE_UNIMPORTANT = 1539;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Activity record launch mode
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_ACTIVITY_RECORD_LAUNCH_MODE = 1540;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Activity record target activity
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_ACTIVITY_RECORD_TARGET_ACTIVITY = 1541;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Activity record flags
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_ACTIVITY_RECORD_FLAGS = 1542;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Activity record real activity
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_ACTIVITY_RECORD_REAL_ACTIVITY = 1543;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Activity record short component name
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_ACTIVITY_RECORD_SHORT_COMPONENT_NAME = 1544;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Activity record process name
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_ACTIVITY_RECORD_PROCESS_NAME = 1545;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Activity record is fullscreen
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_ACTIVITY_RECORD_IS_FULLSCREEN = 1546;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Activity record is no display
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_ACTIVITY_RECORD_IS_NO_DISPLAY = 1547;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Millis since activity was last visible
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_ACTIVITY_RECORD_MILLIS_SINCE_LAST_VISIBLE = 1548;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Activity record's resultTo packageName
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_ACTIVITY_RECORD_RESULT_TO_PKG_NAME = 1549;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Activity record's resultTo shortComponentName
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_ACTIVITY_RECORD_RESULT_TO_SHORT_COMPONENT_NAME = 1550;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Activity record is visible
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_ACTIVITY_RECORD_IS_VISIBLE = 1551;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Activity record is visible ignoring keyguard
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_ACTIVITY_RECORD_IS_VISIBLE_IGNORING_KEYGUARD = 1552;
+
+ // Tagged data for ACTION_ACTIVITY_START.
+ // FIELD: Millis since activity's last launch
+ // CATEGORY: OTHER
+ // OS: Q (will also ship in PQ1A)
+ FIELD_ACTIVITY_RECORD_MILLIS_SINCE_LAST_LAUNCH = 1553;
// ---- End Q Constants, all Q constants go above this line ----
diff --git a/services/accessibility/java/com/android/server/accessibility/TouchExplorer.java b/services/accessibility/java/com/android/server/accessibility/TouchExplorer.java
index 1229c58..347a084 100644
--- a/services/accessibility/java/com/android/server/accessibility/TouchExplorer.java
+++ b/services/accessibility/java/com/android/server/accessibility/TouchExplorer.java
@@ -375,6 +375,7 @@
return false;
}
+ mAms.onTouchInteractionEnd();
// Remove pending event deliveries.
mSendHoverEnterAndMoveDelayed.cancel();
mSendHoverExitDelayed.cancel();
@@ -382,9 +383,9 @@
if (mSendTouchExplorationEndDelayed.isPending()) {
mSendTouchExplorationEndDelayed.forceSendAndRemove();
}
- if (mSendTouchInteractionEndDelayed.isPending()) {
- mSendTouchInteractionEndDelayed.forceSendAndRemove();
- }
+
+ // Announce the end of a new touch interaction.
+ sendAccessibilityEvent(AccessibilityEvent.TYPE_TOUCH_INTERACTION_END);
// Try to use the standard accessibility API to click
if (mAms.performActionOnAccessibilityFocusedItem(
@@ -487,20 +488,25 @@
case MotionEvent.ACTION_DOWN: {
mAms.onTouchInteractionStart();
- sendAccessibilityEvent(AccessibilityEvent.TYPE_TOUCH_INTERACTION_START);
-
// If we still have not notified the user for the last
// touch, we figure out what to do. If were waiting
// we resent the delayed callback and wait again.
mSendHoverEnterAndMoveDelayed.cancel();
mSendHoverExitDelayed.cancel();
- if (mSendTouchExplorationEndDelayed.isPending()) {
- mSendTouchExplorationEndDelayed.forceSendAndRemove();
+ // If a touch exploration gesture is in progress send events for its end.
+ if(mTouchExplorationInProgress) {
+ sendHoverExitAndTouchExplorationGestureEndIfNeeded(policyFlags);
}
- if (mSendTouchInteractionEndDelayed.isPending()) {
+ // Avoid duplicated TYPE_TOUCH_INTERACTION_START event when 2nd tap of double tap.
+ if (!mGestureDetector.firstTapDetected()) {
+ mSendTouchExplorationEndDelayed.forceSendAndRemove();
mSendTouchInteractionEndDelayed.forceSendAndRemove();
+ sendAccessibilityEvent(AccessibilityEvent.TYPE_TOUCH_INTERACTION_START);
+ } else {
+ // Let gesture to handle to avoid duplicated TYPE_TOUCH_INTERACTION_END event.
+ mSendTouchInteractionEndDelayed.cancel();
}
if (!mGestureDetector.firstTapDetected() && !mTouchExplorationInProgress) {
diff --git a/services/art-profile b/services/art-profile
index 24964f3..cbc00ea 100644
--- a/services/art-profile
+++ b/services/art-profile
@@ -9258,24 +9258,24 @@
PLcom/android/server/backup/internal/BackupState;-><init>(Ljava/lang/String;I)V
PLcom/android/server/backup/internal/BackupState;->values()[Lcom/android/server/backup/internal/BackupState;
PLcom/android/server/backup/internal/Operation;-><init>(ILcom/android/server/backup/BackupRestoreTask;I)V
-PLcom/android/server/backup/internal/KeyValueBackupTask;-><init>(Lcom/android/server/backup/BackupManagerService;Lcom/android/server/backup/transport/TransportClient;Ljava/lang/String;Ljava/util/List;Lcom/android/server/backup/DataChangedJournal;Landroid/app/backup/IBackupObserver;Landroid/app/backup/IBackupManagerMonitor;Lcom/android/server/backup/internal/OnTaskFinishedListener;Ljava/util/List;ZZ)V
-PLcom/android/server/backup/internal/KeyValueBackupTask;->backupPm()V
-PLcom/android/server/backup/internal/KeyValueBackupTask;->beginBackup()V
-PLcom/android/server/backup/internal/KeyValueBackupTask;->clearAgentState()V
-PLcom/android/server/backup/internal/KeyValueBackupTask;->execute()V
-PLcom/android/server/backup/internal/KeyValueBackupTask;->executeNextState(Lcom/android/server/backup/internal/BackupState;)V
-PLcom/android/server/backup/internal/KeyValueBackupTask;->finalizeBackup()V
-PLcom/android/server/backup/internal/KeyValueBackupTask;->invokeAgentForBackup(Ljava/lang/String;Landroid/app/IBackupAgent;)I
-PLcom/android/server/backup/internal/KeyValueBackupTask;->invokeNextAgent()V
-PLcom/android/server/backup/internal/KeyValueBackupTask;->operationComplete(J)V
-PLcom/android/server/backup/internal/KeyValueBackupTask;->registerTask()V
-PLcom/android/server/backup/internal/KeyValueBackupTask;->revertAndEndBackup()V
-PLcom/android/server/backup/internal/KeyValueBackupTask;->unregisterTask()V
-PLcom/android/server/backup/internal/KeyValueBackupTask;->writeWidgetPayloadIfAppropriate(Ljava/io/FileDescriptor;Ljava/lang/String;)V
PLcom/android/server/backup/internal/ProvisionedObserver;-><init>(Lcom/android/server/backup/BackupManagerService;Landroid/os/Handler;)V
PLcom/android/server/backup/internal/RunBackupReceiver;-><init>(Lcom/android/server/backup/BackupManagerService;)V
PLcom/android/server/backup/internal/RunBackupReceiver;->onReceive(Landroid/content/Context;Landroid/content/Intent;)V
PLcom/android/server/backup/internal/RunInitializeReceiver;-><init>(Lcom/android/server/backup/BackupManagerService;)V
+PLcom/android/server/backup/keyvalue/KeyValueBackupTask;-><init>(Lcom/android/server/backup/BackupManagerService;Lcom/android/server/backup/transport/TransportClient;Ljava/lang/String;Ljava/util/List;Lcom/android/server/backup/DataChangedJournal;Landroid/app/backup/IBackupObserver;Landroid/app/backup/IBackupManagerMonitor;Lcom/android/server/backup/internal/OnTaskFinishedListener;Ljava/util/List;ZZ)V
+PLcom/android/server/backup/keyvalue/KeyValueBackupTask;->backupPm()V
+PLcom/android/server/backup/keyvalue/KeyValueBackupTask;->beginBackup()V
+PLcom/android/server/backup/keyvalue/KeyValueBackupTask;->clearAgentState()V
+PLcom/android/server/backup/keyvalue/KeyValueBackupTask;->execute()V
+PLcom/android/server/backup/keyvalue/KeyValueBackupTask;->executeNextState(Lcom/android/server/backup/internal/BackupState;)V
+PLcom/android/server/backup/keyvalue/KeyValueBackupTask;->finalizeBackup()V
+PLcom/android/server/backup/keyvalue/KeyValueBackupTask;->invokeAgentForBackup(Ljava/lang/String;Landroid/app/IBackupAgent;)I
+PLcom/android/server/backup/keyvalue/KeyValueBackupTask;->invokeNextAgent()V
+PLcom/android/server/backup/keyvalue/KeyValueBackupTask;->operationComplete(J)V
+PLcom/android/server/backup/keyvalue/KeyValueBackupTask;->registerTask()V
+PLcom/android/server/backup/keyvalue/KeyValueBackupTask;->revertAndEndBackup()V
+PLcom/android/server/backup/keyvalue/KeyValueBackupTask;->unregisterTask()V
+PLcom/android/server/backup/keyvalue/KeyValueBackupTask;->writeWidgetPayloadIfAppropriate(Ljava/io/FileDescriptor;Ljava/lang/String;)V
PLcom/android/server/backup/transport/-$$Lambda$TransportClient$ciIUj0x0CRg93UETUpy2FB5aqCQ;-><init>(Lcom/android/server/backup/transport/TransportClient;Lcom/android/server/backup/transport/TransportConnectionListener;Lcom/android/internal/backup/IBackupTransport;)V
PLcom/android/server/backup/transport/-$$Lambda$TransportClient$ciIUj0x0CRg93UETUpy2FB5aqCQ;->run()V
PLcom/android/server/backup/transport/-$$Lambda$TransportClient$uc3fygwQjQIS_JT7mlt-yMBfJcE;-><init>(Ljava/util/concurrent/CompletableFuture;)V
diff --git a/services/autofill/java/com/android/server/autofill/AutofillManagerService.java b/services/autofill/java/com/android/server/autofill/AutofillManagerService.java
index 0610256..6f03b76 100644
--- a/services/autofill/java/com/android/server/autofill/AutofillManagerService.java
+++ b/services/autofill/java/com/android/server/autofill/AutofillManagerService.java
@@ -29,6 +29,7 @@
import android.annotation.Nullable;
import android.annotation.UserIdInt;
import android.app.ActivityManager;
+import android.app.ActivityManagerInternal;
import android.app.ActivityThread;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
@@ -42,7 +43,6 @@
import android.graphics.Rect;
import android.net.Uri;
import android.os.Binder;
-import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
@@ -963,12 +963,20 @@
throw new IllegalArgumentException(packageName + " is not a valid package", e);
}
+ // TODO(b/112051762): rather than always call AM here, call it on demand on
+ // getPreviousSessionsLocked()? That way we save space / time here, and don't set
+ // a callback on AM unnecessarily (see TODO below :-)
+ final ActivityManagerInternal am = LocalServices
+ .getService(ActivityManagerInternal.class);
+ // TODO(b/112051762): add a callback method on AM to be notified when a task is finished
+ // so we can clean up sessions kept alive
+ final int taskId = am.getTaskIdForActivity(activityToken, false);
final int sessionId;
synchronized (mLock) {
final AutofillManagerServiceImpl service = getServiceForUserLocked(userId);
- sessionId = service.startSessionLocked(activityToken, getCallingUid(), appCallback,
- autofillId, bounds, value, hasCallback, componentName, compatMode,
- mAllowInstantService, flags);
+ sessionId = service.startSessionLocked(activityToken, taskId, getCallingUid(),
+ appCallback, autofillId, bounds, value, hasCallback, componentName,
+ compatMode, mAllowInstantService, flags);
}
send(receiver, sessionId);
}
diff --git a/services/autofill/java/com/android/server/autofill/AutofillManagerServiceImpl.java b/services/autofill/java/com/android/server/autofill/AutofillManagerServiceImpl.java
index 4206d9a..48b3798 100644
--- a/services/autofill/java/com/android/server/autofill/AutofillManagerServiceImpl.java
+++ b/services/autofill/java/com/android/server/autofill/AutofillManagerServiceImpl.java
@@ -25,11 +25,9 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
-import android.app.ActivityManager;
import android.app.ActivityTaskManager;
import android.app.ActivityManagerInternal;
import android.app.AppGlobals;
-import android.app.IActivityManager;
import android.app.IActivityTaskManager;
import android.content.ComponentName;
import android.content.Context;
@@ -82,7 +80,6 @@
import com.android.server.LocalServices;
import com.android.server.autofill.AutofillManagerService.AutofillCompatState;
import com.android.server.autofill.ui.AutoFillUI;
-import com.android.server.wm.ActivityTaskManagerInternal;
import java.io.PrintWriter;
import java.util.ArrayList;
@@ -342,7 +339,7 @@
}
@GuardedBy("mLock")
- int startSessionLocked(@NonNull IBinder activityToken, int uid,
+ int startSessionLocked(@NonNull IBinder activityToken, int taskId, int uid,
@NonNull IBinder appCallbackToken, @NonNull AutofillId autofillId,
@NonNull Rect virtualBounds, @Nullable AutofillValue value, boolean hasCallback,
@NonNull ComponentName componentName, boolean compatMode,
@@ -375,8 +372,9 @@
// Occasionally clean up abandoned sessions
pruneAbandonedSessionsLocked();
- final Session newSession = createSessionByTokenLocked(activityToken, uid, appCallbackToken,
- hasCallback, componentName, compatMode, bindInstantServiceAllowed, flags);
+ final Session newSession = createSessionByTokenLocked(activityToken, taskId, uid,
+ appCallbackToken, hasCallback, componentName, compatMode, bindInstantServiceAllowed,
+ flags);
if (newSession == null) {
return NO_SESSION;
}
@@ -493,7 +491,7 @@
}
@GuardedBy("mLock")
- private Session createSessionByTokenLocked(@NonNull IBinder activityToken, int uid,
+ private Session createSessionByTokenLocked(@NonNull IBinder activityToken, int taskId, int uid,
@NonNull IBinder appCallbackToken, boolean hasCallback,
@NonNull ComponentName componentName, boolean compatMode,
boolean bindInstantServiceAllowed, int flags) {
@@ -513,9 +511,9 @@
assertCallerLocked(componentName, compatMode);
final Session newSession = new Session(this, mUi, mContext, mHandler, mUserId, mLock,
- sessionId, uid, activityToken, appCallbackToken, hasCallback, mUiLatencyHistory,
- mWtfHistory, mInfo.getServiceInfo().getComponentName(), componentName, compatMode,
- bindInstantServiceAllowed, flags);
+ sessionId, taskId, uid, activityToken, appCallbackToken, hasCallback,
+ mUiLatencyHistory, mWtfHistory, mInfo.getServiceInfo().getComponentName(),
+ componentName, compatMode, bindInstantServiceAllowed, flags);
mSessions.put(newSession.id, newSession);
return newSession;
@@ -607,6 +605,30 @@
mSessions.remove(sessionId);
}
+ /**
+ * Ges the previous sessions asked to be kept alive in a given activity task.
+ *
+ * @param session session calling this method (so it's excluded from the result).
+ */
+ @Nullable
+ @GuardedBy("mLock")
+ ArrayList<Session> getPreviousSessionsLocked(@NonNull Session session) {
+ final int size = mSessions.size();
+ ArrayList<Session> previousSessions = null;
+ for (int i = 0; i < size; i++) {
+ final Session previousSession = mSessions.valueAt(i);
+ // TODO(b/112051762): only return sessions asked to be kept alive / add CTS test
+ if (previousSession.taskId == session.taskId && previousSession.id != session.id) {
+ if (previousSessions == null) {
+ previousSessions = new ArrayList<>(size);
+ }
+ previousSessions.add(previousSession);
+ }
+ }
+ // TODO(b/112051762): remove returned sessions / add CTS test
+ return previousSessions;
+ }
+
void handleSessionSave(Session session) {
synchronized (mLock) {
if (mSessions.get(session.id) == null) {
diff --git a/services/autofill/java/com/android/server/autofill/Session.java b/services/autofill/java/com/android/server/autofill/Session.java
index 13de9fa..101bf49 100644
--- a/services/autofill/java/com/android/server/autofill/Session.java
+++ b/services/autofill/java/com/android/server/autofill/Session.java
@@ -129,12 +129,15 @@
private static AtomicInteger sIdCounter = new AtomicInteger();
- /** Id of the session */
+ /** ID of the session */
public final int id;
/** uid the session is for */
public final int uid;
+ /** ID of the task associated with this session's activity */
+ public final int taskId;
+
/** Flags used to start the session */
public final int mFlags;
@@ -329,8 +332,8 @@
// until the dispatch happens. The items in the list don't need to be cloned
// since we don't hold on them anywhere else. The client state is not touched
// by us, so no need to copy.
- request = new FillRequest(requestId, new ArrayList<>(mContexts),
- mClientState, flags);
+ request = new FillRequest(requestId, new ArrayList<>(mContexts), mClientState,
+ flags);
}
mRemoteFillService.onFillRequest(request);
@@ -528,14 +531,15 @@
}
Session(@NonNull AutofillManagerServiceImpl service, @NonNull AutoFillUI ui,
- @NonNull Context context, @NonNull Handler handler, int userId,
- @NonNull Object lock, int sessionId, int uid, @NonNull IBinder activityToken,
+ @NonNull Context context, @NonNull Handler handler, int userId, @NonNull Object lock,
+ int sessionId, int taskId, int uid, @NonNull IBinder activityToken,
@NonNull IBinder client, boolean hasCallback, @NonNull LocalLog uiLatencyHistory,
- @NonNull LocalLog wtfHistory,
- @NonNull ComponentName serviceComponentName, @NonNull ComponentName componentName,
- boolean compatMode, boolean bindInstantServiceAllowed, int flags) {
+ @NonNull LocalLog wtfHistory, @NonNull ComponentName serviceComponentName,
+ @NonNull ComponentName componentName, boolean compatMode,
+ boolean bindInstantServiceAllowed, int flags) {
id = sessionId;
mFlags = flags;
+ this.taskId = taskId;
this.uid = uid;
mStartTime = SystemClock.elapsedRealtime();
mService = service;
@@ -1431,7 +1435,8 @@
/**
* Shows the save UI, when session can be saved.
*
- * @return {@code true} if session is done, or {@code false} if it's pending user action.
+ * @return {@code true} if session is done and could be removed, or {@code false} if it's
+ * pending user action or the service asked to keep it alive (for multi-screens workflow).
*/
@GuardedBy("mLock")
public boolean showSaveLocked() {
@@ -1451,12 +1456,19 @@
* - autofillValue of at least one id (required or optional) has changed.
* - there is no Dataset in the last FillResponse whose values of all dataset fields matches
* the current values of all fields in the screen.
+ * - server didn't ask to keep session alive
*/
if (saveInfo == null) {
if (sVerbose) Slog.v(TAG, "showSaveLocked(): no saveInfo from service");
return true;
}
+ if ((saveInfo.getFlags() & SaveInfo.FLAG_DELAY_SAVE) != 0) {
+ // TODO(b/112051762): log metrics
+ if (sDebug) Slog.v(TAG, "showSaveLocked(): service asked to delay save");
+ return false;
+ }
+
final ArrayMap<AutofillId, InternalSanitizer> sanitizers = createSanitizers(saveInfo);
// Cache used to make sure changed fields do not belong to a dataset.
@@ -1769,6 +1781,66 @@
}
/**
+ * Update the {@link AutofillValue values} of the {@link AssistStructure} before sending it to
+ * the service on save().
+ */
+ private void updateValuesForSaveLocked() {
+ final ArrayMap<AutofillId, InternalSanitizer> sanitizers =
+ createSanitizers(getSaveInfoLocked());
+
+ final int numContexts = mContexts.size();
+ for (int contextNum = 0; contextNum < numContexts; contextNum++) {
+ final FillContext context = mContexts.get(contextNum);
+
+ final ViewNode[] nodes =
+ context.findViewNodesByAutofillIds(getIdsOfAllViewStatesLocked());
+
+ if (sVerbose) Slog.v(TAG, "updateValuesForSaveLocked(): updating " + context);
+
+ for (int viewStateNum = 0; viewStateNum < mViewStates.size(); viewStateNum++) {
+ final ViewState viewState = mViewStates.valueAt(viewStateNum);
+
+ final AutofillId id = viewState.id;
+ final AutofillValue value = viewState.getCurrentValue();
+ if (value == null) {
+ if (sVerbose) Slog.v(TAG, "updateValuesForSaveLocked(): skipping " + id);
+ continue;
+ }
+ final ViewNode node = nodes[viewStateNum];
+ if (node == null) {
+ Slog.w(TAG, "callSaveLocked(): did not find node with id " + id);
+ continue;
+ }
+ if (sVerbose) {
+ Slog.v(TAG, "updateValuesForSaveLocked(): updating " + id + " to " + value);
+ }
+
+ AutofillValue sanitizedValue = viewState.getSanitizedValue();
+
+ if (sanitizedValue == null) {
+ // Field is optional and haven't been sanitized yet.
+ sanitizedValue = getSanitizedValue(sanitizers, id, value);
+ }
+ if (sanitizedValue != null) {
+ node.updateAutofillValue(sanitizedValue);
+ } else if (sDebug) {
+ Slog.d(TAG, "updateValuesForSaveLocked(): not updating field " + id
+ + " because it failed sanitization");
+ }
+ }
+
+ // Sanitize structure before it's sent to service.
+ context.getStructure().sanitizeForParceling(false);
+
+ if (sVerbose) {
+ Slog.v(TAG, "updateValuesForSaveLocked(): dumping structure of " + context
+ + " before calling service.save()");
+ context.getStructure().dump(false);
+ }
+ }
+ }
+
+ /**
* Calls service when user requested save.
*/
@GuardedBy("mLock")
@@ -1786,66 +1858,49 @@
return;
}
- final ArrayMap<AutofillId, InternalSanitizer> sanitizers =
- createSanitizers(getSaveInfoLocked());
-
- final int numContexts = mContexts.size();
-
- for (int contextNum = 0; contextNum < numContexts; contextNum++) {
- final FillContext context = mContexts.get(contextNum);
-
- final ViewNode[] nodes =
- context.findViewNodesByAutofillIds(getIdsOfAllViewStatesLocked());
-
- if (sVerbose) Slog.v(TAG, "callSaveLocked(): updating " + context);
-
- for (int viewStateNum = 0; viewStateNum < mViewStates.size(); viewStateNum++) {
- final ViewState viewState = mViewStates.valueAt(viewStateNum);
-
- final AutofillId id = viewState.id;
- final AutofillValue value = viewState.getCurrentValue();
- if (value == null) {
- if (sVerbose) Slog.v(TAG, "callSaveLocked(): skipping " + id);
- continue;
- }
- final ViewNode node = nodes[viewStateNum];
- if (node == null) {
- Slog.w(TAG, "callSaveLocked(): did not find node with id " + id);
- continue;
- }
- if (sVerbose) Slog.v(TAG, "callSaveLocked(): updating " + id + " to " + value);
-
- AutofillValue sanitizedValue = viewState.getSanitizedValue();
-
- if (sanitizedValue == null) {
- // Field is optional and haven't been sanitized yet.
- sanitizedValue = getSanitizedValue(sanitizers, id, value);
- }
- if (sanitizedValue != null) {
- node.updateAutofillValue(sanitizedValue);
- } else if (sDebug) {
- Slog.d(TAG, "Not updating field " + id + " because it failed sanitization");
- }
- }
-
- // Sanitize structure before it's sent to service.
- context.getStructure().sanitizeForParceling(false);
-
- if (sVerbose) {
- Slog.v(TAG, "Dumping structure of " + context + " before calling service.save()");
- context.getStructure().dump(false);
- }
- }
+ updateValuesForSaveLocked();
// Remove pending fill requests as the session is finished.
cancelCurrentRequestLocked();
- // Dispatch a snapshot of the current contexts list since it may change
- // until the dispatch happens. The items in the list don't need to be cloned
- // since we don't hold on them anywhere else. The client state is not touched
- // by us, so no need to copy.
- final SaveRequest saveRequest = new SaveRequest(new ArrayList<>(mContexts), mClientState,
- mSelectedDatasetIds);
+ // Merge the previous sessions that the service asked to be kept alive
+ final ArrayList<Session> previousSessions = mService.getPreviousSessionsLocked(this);
+ final ArrayList<FillContext> contexts;
+ final Bundle clientState;
+ if (previousSessions != null) {
+ if (sDebug) {
+ Slog.d(TAG, "callSaveLocked(): Merging the content of " + previousSessions.size()
+ + " sessions for task " + taskId);
+ }
+ contexts = new ArrayList<>();
+ for (int i = 0; i < previousSessions.size(); i++) {
+ final Session previousSession = previousSessions.get(i);
+ final ArrayList<FillContext> previousContexts = previousSession.mContexts;
+ if (previousContexts == null) {
+ Slog.w(TAG, "callSaveLocked(): Not merging null contexts from "
+ + previousSession.id);
+ continue;
+ }
+ previousSession.updateValuesForSaveLocked();
+ if (sVerbose) {
+ Slog.v(TAG, "callSaveLocked(): adding " + previousContexts.size()
+ + " context from previous session #" + previousSession.id);
+ }
+ contexts.addAll(previousContexts);
+ }
+ contexts.addAll(mContexts);
+ // TODO(b/112051762): decided what to do with client state / add CTS test
+ clientState = mClientState;
+ } else {
+ // Dispatch a snapshot of the current contexts list since it may change
+ // until the dispatch happens. The items in the list don't need to be cloned
+ // since we don't hold on them anywhere else. The client state is not touched
+ // by us, so no need to copy.
+ contexts = new ArrayList<>(mContexts);
+ clientState = mClientState;
+ }
+
+ final SaveRequest saveRequest = new SaveRequest(contexts, clientState, mSelectedDatasetIds);
mRemoteFillService.onSaveRequest(saveRequest);
}
@@ -2510,6 +2565,7 @@
final String prefix2 = prefix + " ";
pw.print(prefix); pw.print("id: "); pw.println(id);
pw.print(prefix); pw.print("uid: "); pw.println(uid);
+ pw.print(prefix); pw.print("taskId: "); pw.println(taskId);
pw.print(prefix); pw.print("flags: "); pw.println(mFlags);
pw.print(prefix); pw.print("mComponentName: "); pw.println(mComponentName);
pw.print(prefix); pw.print("mActivityToken: "); pw.println(mActivityToken);
diff --git a/services/backup/java/com/android/server/backup/BackupManagerService.java b/services/backup/java/com/android/server/backup/BackupManagerService.java
index ec27da9..c26ac17 100644
--- a/services/backup/java/com/android/server/backup/BackupManagerService.java
+++ b/services/backup/java/com/android/server/backup/BackupManagerService.java
@@ -104,7 +104,7 @@
import com.android.server.backup.fullbackup.FullBackupEntry;
import com.android.server.backup.fullbackup.PerformFullTransportBackupTask;
import com.android.server.backup.internal.BackupHandler;
-import com.android.server.backup.internal.BackupRequest;
+import com.android.server.backup.keyvalue.BackupRequest;
import com.android.server.backup.internal.ClearDataObserver;
import com.android.server.backup.internal.OnTaskFinishedListener;
import com.android.server.backup.internal.Operation;
diff --git a/services/backup/java/com/android/server/backup/internal/BackupHandler.java b/services/backup/java/com/android/server/backup/internal/BackupHandler.java
index 6e96fe0..2722729 100644
--- a/services/backup/java/com/android/server/backup/internal/BackupHandler.java
+++ b/services/backup/java/com/android/server/backup/internal/BackupHandler.java
@@ -41,6 +41,8 @@
import com.android.server.backup.TransportManager;
import com.android.server.backup.fullbackup.PerformAdbBackupTask;
import com.android.server.backup.fullbackup.PerformFullTransportBackupTask;
+import com.android.server.backup.keyvalue.BackupRequest;
+import com.android.server.backup.keyvalue.KeyValueBackupTask;
import com.android.server.backup.params.AdbBackupParams;
import com.android.server.backup.params.AdbParams;
import com.android.server.backup.params.AdbRestoreParams;
diff --git a/services/backup/java/com/android/server/backup/internal/BackupState.java b/services/backup/java/com/android/server/backup/internal/BackupState.java
deleted file mode 100644
index 320b555..0000000
--- a/services/backup/java/com/android/server/backup/internal/BackupState.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package com.android.server.backup.internal;
-
-/**
- * Current state of the backup.
- */
-enum BackupState {
- INITIAL,
- BACKUP_PM,
- RUNNING_QUEUE,
- CANCELLED,
- FINAL
-}
diff --git a/services/backup/java/com/android/server/backup/internal/BackupRequest.java b/services/backup/java/com/android/server/backup/keyvalue/BackupRequest.java
similarity index 96%
rename from services/backup/java/com/android/server/backup/internal/BackupRequest.java
rename to services/backup/java/com/android/server/backup/keyvalue/BackupRequest.java
index 01e4385..67b2f72 100644
--- a/services/backup/java/com/android/server/backup/internal/BackupRequest.java
+++ b/services/backup/java/com/android/server/backup/keyvalue/BackupRequest.java
@@ -14,7 +14,7 @@
* limitations under the License
*/
-package com.android.server.backup.internal;
+package com.android.server.backup.keyvalue;
import java.util.Objects;
diff --git a/services/backup/java/com/android/server/backup/internal/KeyValueBackupTask.java b/services/backup/java/com/android/server/backup/keyvalue/KeyValueBackupTask.java
similarity index 99%
rename from services/backup/java/com/android/server/backup/internal/KeyValueBackupTask.java
rename to services/backup/java/com/android/server/backup/keyvalue/KeyValueBackupTask.java
index 54b8d1f..1cb9933 100644
--- a/services/backup/java/com/android/server/backup/internal/KeyValueBackupTask.java
+++ b/services/backup/java/com/android/server/backup/keyvalue/KeyValueBackupTask.java
@@ -14,7 +14,7 @@
* limitations under the License
*/
-package com.android.server.backup.internal;
+package com.android.server.backup.keyvalue;
import static com.android.server.backup.BackupManagerService.DEBUG_BACKUP_TRACE;
import static com.android.server.backup.BackupManagerService.KEY_WIDGET_STATE;
@@ -62,6 +62,8 @@
import com.android.server.backup.DataChangedJournal;
import com.android.server.backup.KeyValueBackupJob;
import com.android.server.backup.fullbackup.PerformFullTransportBackupTask;
+import com.android.server.backup.internal.OnTaskFinishedListener;
+import com.android.server.backup.internal.Operation;
import com.android.server.backup.remote.RemoteCall;
import com.android.server.backup.remote.RemoteCallable;
import com.android.server.backup.remote.RemoteResult;
@@ -754,7 +756,9 @@
BackupObserverUtils.sendBackupFinished(mObserver, BackupManager.ERROR_BACKUP_CANCELLED);
} else {
mListener.onFinished(callerLogString);
- mFullBackupTask.unregisterTask();
+ if (mFullBackupTask != null) {
+ mFullBackupTask.unregisterTask();
+ }
switch (mStatus) {
case BackupTransport.TRANSPORT_OK:
case BackupTransport.TRANSPORT_QUOTA_EXCEEDED:
@@ -1351,4 +1355,12 @@
mPendingCall = null;
return result;
}
+
+ private enum BackupState {
+ INITIAL,
+ BACKUP_PM,
+ RUNNING_QUEUE,
+ CANCELLED,
+ FINAL
+ }
}
diff --git a/services/core/java/com/android/server/OWNERS b/services/core/java/com/android/server/OWNERS
index 3ca3a96..4fa0c07 100644
--- a/services/core/java/com/android/server/OWNERS
+++ b/services/core/java/com/android/server/OWNERS
@@ -1,15 +1,21 @@
# Connectivity / Networking
+per-file ConnectivityService.java=codewiz@google.com
per-file ConnectivityService.java=ek@google.com
per-file ConnectivityService.java=jchalard@google.com
per-file ConnectivityService.java=lorenzo@google.com
+per-file ConnectivityService.java=reminv@google.com
per-file ConnectivityService.java=satk@google.com
+per-file NetworkManagementService.java=codewiz@google.com
per-file NetworkManagementService.java=ek@google.com
per-file NetworkManagementService.java=jchalard@google.com
per-file NetworkManagementService.java=lorenzo@google.com
+per-file NetworkManagementService.java=reminv@google.com
per-file NetworkManagementService.java=satk@google.com
+per-file NsdService.java=codewiz@google.com
per-file NsdService.java=ek@google.com
per-file NsdService.java=jchalard@google.com
per-file NsdService.java=lorenzo@google.com
+per-file NsdService.java=reminv@google.com
per-file NsdService.java=satk@google.com
# Vibrator
diff --git a/services/core/java/com/android/server/StorageManagerService.java b/services/core/java/com/android/server/StorageManagerService.java
index 6409bb3..42157cc 100644
--- a/services/core/java/com/android/server/StorageManagerService.java
+++ b/services/core/java/com/android/server/StorageManagerService.java
@@ -79,6 +79,7 @@
import android.os.RemoteCallbackList;
import android.os.RemoteException;
import android.os.ServiceManager;
+import android.os.ServiceSpecificException;
import android.os.SystemClock;
import android.os.SystemProperties;
import android.os.UserHandle;
@@ -2380,6 +2381,9 @@
}
}, DateUtils.SECOND_IN_MILLIS);
return 0;
+ } catch (ServiceSpecificException e) {
+ Slog.e(TAG, "fdeCheckPassword failed", e);
+ return e.errorCode;
} catch (Exception e) {
Slog.wtf(TAG, e);
return StorageManager.ENCRYPTION_STATE_ERROR_UNKNOWN;
diff --git a/services/core/java/com/android/server/VibratorService.java b/services/core/java/com/android/server/VibratorService.java
index 95e5518..ae3946a 100644
--- a/services/core/java/com/android/server/VibratorService.java
+++ b/services/core/java/com/android/server/VibratorService.java
@@ -66,6 +66,7 @@
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.LinkedList;
+import java.util.List;
import java.util.Date;
public class VibratorService extends IVibratorService.Stub
@@ -158,6 +159,7 @@
public final int usageHint;
public final int uid;
public final String opPkg;
+ public final String reason;
// The actual effect to be played.
public VibrationEffect effect;
@@ -167,7 +169,7 @@
public VibrationEffect originalEffect;
private Vibration(IBinder token, VibrationEffect effect,
- int usageHint, int uid, String opPkg) {
+ int usageHint, int uid, String opPkg, String reason) {
this.token = token;
this.effect = effect;
this.startTime = SystemClock.elapsedRealtime();
@@ -175,6 +177,7 @@
this.usageHint = usageHint;
this.uid = uid;
this.opPkg = opPkg;
+ this.reason = reason;
}
public void binderDied() {
@@ -233,7 +236,7 @@
public VibrationInfo toInfo() {
return new VibrationInfo(
- startTimeDebug, effect, originalEffect, usageHint, uid, opPkg);
+ startTimeDebug, effect, originalEffect, usageHint, uid, opPkg, reason);
}
}
@@ -244,15 +247,18 @@
private final int mUsageHint;
private final int mUid;
private final String mOpPkg;
+ private final String mReason;
public VibrationInfo(long startTimeDebug, VibrationEffect effect,
- VibrationEffect originalEffect, int usageHint, int uid, String opPkg) {
+ VibrationEffect originalEffect, int usageHint, int uid,
+ String opPkg, String reason) {
mStartTimeDebug = startTimeDebug;
mEffect = effect;
mOriginalEffect = originalEffect;
mUsageHint = usageHint;
mUid = uid;
mOpPkg = opPkg;
+ mReason = reason;
}
@Override
@@ -270,6 +276,8 @@
.append(mUid)
.append(", opPkg: ")
.append(mOpPkg)
+ .append(", reason: ")
+ .append(mReason)
.toString();
}
}
@@ -482,9 +490,9 @@
}
@Override // Binder call
- public void vibrate(int uid, String opPkg, VibrationEffect effect, int usageHint,
+ public void vibrate(int uid, String opPkg, VibrationEffect effect, int usageHint, String reason,
IBinder token) {
- Trace.traceBegin(Trace.TRACE_TAG_VIBRATOR, "vibrate");
+ Trace.traceBegin(Trace.TRACE_TAG_VIBRATOR, "vibrate, reason = " + reason);
try {
if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.VIBRATE)
!= PackageManager.PERMISSION_GRANTED) {
@@ -531,10 +539,11 @@
return;
}
- Vibration vib = new Vibration(token, effect, usageHint, uid, opPkg);
+ Vibration vib = new Vibration(token, effect, usageHint, uid, opPkg, reason);
linkVibration(vib);
long ident = Binder.clearCallingIdentity();
try {
+
doCancelVibrateLocked();
startVibrationLocked(vib);
addToPreviousVibrationsLocked(vib);
@@ -1001,8 +1010,8 @@
Slog.w(TAG, "Failed to play prebaked effect, no fallback");
return 0;
}
- Vibration fallbackVib =
- new Vibration(vib.token, effect, vib.usageHint, vib.uid, vib.opPkg);
+ Vibration fallbackVib = new Vibration(vib.token, effect, vib.usageHint, vib.uid,
+ vib.opPkg, vib.reason + " (fallback)");
final int intensity = getCurrentIntensityLocked(fallbackVib);
linkVibration(fallbackVib);
applyVibrationIntensityScalingLocked(fallbackVib, intensity);
@@ -1292,7 +1301,7 @@
VibrationEffect effect =
VibrationEffect.createOneShot(duration, VibrationEffect.DEFAULT_AMPLITUDE);
vibrate(Binder.getCallingUid(), description, effect, AudioAttributes.USAGE_UNKNOWN,
- mToken);
+ "Shell Command", mToken);
return 0;
} finally {
Trace.traceEnd(Trace.TRACE_TAG_VIBRATOR);
diff --git a/services/core/java/com/android/server/am/ActivityManagerConstants.java b/services/core/java/com/android/server/am/ActivityManagerConstants.java
index 6550d06..9bf72fb 100644
--- a/services/core/java/com/android/server/am/ActivityManagerConstants.java
+++ b/services/core/java/com/android/server/am/ActivityManagerConstants.java
@@ -207,6 +207,10 @@
// Indicates if the processes need to be started asynchronously.
public boolean FLAG_PROCESS_START_ASYNC = DEFAULT_PROCESS_START_ASYNC;
+ // Indicates whether the activity starts logging is enabled.
+ // Controlled by Settings.Global.ACTIVITY_STARTS_LOGGING_ENABLED
+ boolean mFlagActivityStartsLoggingEnabled;
+
private final ActivityManagerService mService;
private ContentResolver mResolver;
private final KeyValueListParser mParser = new KeyValueListParser(',');
@@ -235,6 +239,12 @@
// memory trimming.
public int CUR_TRIM_CACHED_PROCESSES;
+ private static final Uri ACTIVITY_MANAGER_CONSTANTS_URI = Settings.Global.getUriFor(
+ Settings.Global.ACTIVITY_MANAGER_CONSTANTS);
+
+ private static final Uri ACTIVITY_STARTS_LOGGING_ENABLED_URI = Settings.Global.getUriFor(
+ Settings.Global.ACTIVITY_STARTS_LOGGING_ENABLED);
+
public ActivityManagerConstants(ActivityManagerService service, Handler handler) {
super(handler);
mService = service;
@@ -243,9 +253,10 @@
public void start(ContentResolver resolver) {
mResolver = resolver;
- mResolver.registerContentObserver(Settings.Global.getUriFor(
- Settings.Global.ACTIVITY_MANAGER_CONSTANTS), false, this);
+ mResolver.registerContentObserver(ACTIVITY_MANAGER_CONSTANTS_URI, false, this);
+ mResolver.registerContentObserver(ACTIVITY_STARTS_LOGGING_ENABLED_URI, false, this);
updateConstants();
+ updateActivityStartsLoggingEnabled();
}
public void setOverrideMaxCachedProcesses(int value) {
@@ -263,7 +274,12 @@
@Override
public void onChange(boolean selfChange, Uri uri) {
- updateConstants();
+ if (uri == null) return;
+ if (ACTIVITY_MANAGER_CONSTANTS_URI.equals(uri)) {
+ updateConstants();
+ } else if (ACTIVITY_STARTS_LOGGING_ENABLED_URI.equals(uri)) {
+ updateActivityStartsLoggingEnabled();
+ }
}
private void updateConstants() {
@@ -337,6 +353,11 @@
}
}
+ private void updateActivityStartsLoggingEnabled() {
+ mFlagActivityStartsLoggingEnabled = Settings.Global.getInt(mResolver,
+ Settings.Global.ACTIVITY_STARTS_LOGGING_ENABLED, 0) == 1;
+ }
+
private void updateMaxCachedProcesses() {
CUR_MAX_CACHED_PROCESSES = mOverrideMaxCachedProcesses < 0
? MAX_CACHED_PROCESSES : mOverrideMaxCachedProcesses;
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index a660040..1d01a572 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -56,7 +56,6 @@
import static android.os.Process.PROC_OUT_LONG;
import static android.os.Process.PROC_PARENS;
import static android.os.Process.PROC_SPACE_TERM;
-import static android.os.Process.ProcessStartResult;
import static android.os.Process.ROOT_UID;
import static android.os.Process.SCHED_FIFO;
import static android.os.Process.SCHED_OTHER;
@@ -91,9 +90,7 @@
import static android.provider.Settings.Global.NETWORK_ACCESS_TIMEOUT_MS;
import static android.provider.Settings.Global.WAIT_FOR_DEBUGGER;
import static android.text.format.DateUtils.DAY_IN_MILLIS;
-import static com.android.internal.util.XmlUtils.readBooleanAttribute;
-import static com.android.internal.util.XmlUtils.readIntAttribute;
-import static com.android.internal.util.XmlUtils.readLongAttribute;
+
import static com.android.server.am.ActivityManagerDebugConfig.DEBUG_ALL;
import static com.android.server.am.ActivityManagerDebugConfig.DEBUG_ANR;
import static com.android.server.am.ActivityManagerDebugConfig.DEBUG_BACKGROUND_CHECK;
@@ -254,6 +251,7 @@
import android.os.PowerManager.ServiceType;
import android.os.PowerManagerInternal;
import android.os.Process;
+import android.os.Process.ProcessStartResult;
import android.os.RemoteCallback;
import android.os.RemoteCallbackList;
import android.os.RemoteException;
@@ -298,9 +296,6 @@
import android.view.WindowManager;
import android.view.autofill.AutofillManagerInternal;
-import com.android.server.uri.GrantUri;
-import com.android.server.uri.UriGrantsManagerInternal;
-
import com.android.internal.R;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.VisibleForTesting;
@@ -352,11 +347,17 @@
import com.android.server.pm.Installer;
import com.android.server.pm.Installer.InstallerException;
import com.android.server.pm.dex.DexManager;
+import com.android.server.uri.GrantUri;
+import com.android.server.uri.UriGrantsManagerInternal;
import com.android.server.utils.PriorityDump;
import com.android.server.vr.VrManagerInternal;
import com.android.server.wm.ActivityTaskManagerInternal;
import com.android.server.wm.WindowManagerService;
+import dalvik.system.VMRuntime;
+
+import libcore.util.EmptyArray;
+
import java.io.BufferedReader;
import java.io.File;
import java.io.FileDescriptor;
@@ -390,9 +391,6 @@
import java.util.concurrent.atomic.AtomicLong;
import java.util.function.BiFunction;
-import dalvik.system.VMRuntime;
-import libcore.util.EmptyArray;
-
public class ActivityManagerService extends IActivityManager.Stub
implements Watchdog.Monitor, BatteryStatsImpl.BatteryCallback {
@@ -7216,6 +7214,20 @@
|| mPendingTempWhitelist.indexOfKey(uid) >= 0;
}
+ /**
+ * @return whitelist tag for a uid from mPendingTempWhitelist, null if not currently on
+ * the whitelist
+ */
+ String getPendingTempWhitelistTagForUidLocked(int uid) {
+ final PendingTempWhitelist ptw = mPendingTempWhitelist.get(uid);
+ return ptw != null ? ptw.tag : null;
+ }
+
+ @VisibleForTesting
+ boolean isActivityStartsLoggingEnabled() {
+ return mConstants.mFlagActivityStartsLoggingEnabled;
+ }
+
private ProviderInfo getProviderInfoLocked(String authority, int userHandle, int pmFlags) {
ProviderInfo pi = null;
ContentProviderRecord cpr = mProviderMap.getProviderByName(authority, userHandle);
@@ -21105,6 +21117,13 @@
ActivityManagerService.this.scheduleAppGcsLocked();
}
}
+
+ @Override
+ public int getTaskIdForActivity(IBinder token, boolean onlyRoot) {
+ synchronized (ActivityManagerService.this) {
+ return ActivityManagerService.this.getTaskForActivity(token, onlyRoot);
+ }
+ }
}
/**
diff --git a/services/core/java/com/android/server/am/ActivityMetricsLogger.java b/services/core/java/com/android/server/am/ActivityMetricsLogger.java
index d3e3af3..263c34f 100644
--- a/services/core/java/com/android/server/am/ActivityMetricsLogger.java
+++ b/services/core/java/com/android/server/am/ActivityMetricsLogger.java
@@ -2,6 +2,7 @@
import static android.app.ActivityManager.START_SUCCESS;
import static android.app.ActivityManager.START_TASK_TO_FRONT;
+import static android.app.ActivityManager.processStateAmToProto;
import static com.android.server.wm.ActivityTaskManagerInternal.APP_TRANSITION_TIMEOUT;
import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_PRIMARY;
import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM;
@@ -9,6 +10,7 @@
import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED;
import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_SECONDARY;
import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.ACTION_ACTIVITY_START;
import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.APP_TRANSITION;
import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.APP_TRANSITION_BIND_APPLICATION_DELAY_MS;
import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.APP_TRANSITION_CALLING_PACKAGE_NAME;
@@ -21,8 +23,48 @@
import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.APP_TRANSITION_REPORTED_DRAWN_MS;
import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.APP_TRANSITION_STARTING_WINDOW_DELAY_MS;
import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.APP_TRANSITION_WINDOWS_DRAWN_DELAY_MS;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_ACTIVITY_RECORD_FLAGS;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_ACTIVITY_RECORD_IS_FULLSCREEN;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_ACTIVITY_RECORD_IS_NO_DISPLAY;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_ACTIVITY_RECORD_IS_VISIBLE;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_ACTIVITY_RECORD_IS_VISIBLE_IGNORING_KEYGUARD;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_ACTIVITY_RECORD_MILLIS_SINCE_LAST_LAUNCH;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_ACTIVITY_RECORD_MILLIS_SINCE_LAST_VISIBLE;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_ACTIVITY_RECORD_LAUNCH_MODE;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_ACTIVITY_RECORD_PROCESS_NAME;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_ACTIVITY_RECORD_REAL_ACTIVITY;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_ACTIVITY_RECORD_RESULT_TO_PKG_NAME;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_ACTIVITY_RECORD_RESULT_TO_SHORT_COMPONENT_NAME;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_ACTIVITY_RECORD_SHORT_COMPONENT_NAME;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_ACTIVITY_RECORD_TARGET_ACTIVITY;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_CALLING_PACKAGE_NAME;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_CALLING_UID;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_CALLING_UID_HAS_ANY_VISIBLE_WINDOW;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_CALLING_UID_PROC_STATE;
import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_CLASS_NAME;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_COMING_FROM_PENDING_INTENT;
import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_INSTANT_APP_LAUNCH_TOKEN;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_INTENT_ACTION;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_PROCESS_RECORD_CUR_PROC_STATE;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_PROCESS_RECORD_HAS_CLIENT_ACTIVITIES;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_PROCESS_RECORD_HAS_FOREGROUND_ACTIVITIES;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_PROCESS_RECORD_HAS_FOREGROUND_SERVICES;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_PROCESS_RECORD_HAS_OVERLAY_UI;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_PROCESS_RECORD_HAS_TOP_UI;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_PROCESS_RECORD_MILLIS_SINCE_FG_INTERACTION;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_PROCESS_RECORD_MILLIS_SINCE_LAST_INTERACTION_EVENT;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_PROCESS_RECORD_MILLIS_SINCE_UNIMPORTANT;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_PROCESS_RECORD_PENDING_UI_CLEAN;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_PROCESS_RECORD_PROCESS_NAME;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_REAL_CALLING_UID;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_REAL_CALLING_UID_PROC_STATE;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_REAL_CALLING_UID_HAS_ANY_VISIBLE_WINDOW;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_TARGET_PACKAGE_NAME;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_TARGET_SHORT_COMPONENT_NAME;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_TARGET_UID;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_TARGET_UID_HAS_ANY_VISIBLE_WINDOW;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_TARGET_UID_PROC_STATE;
+import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_TARGET_WHITELIST_TAG;
import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.PACKAGE_OPTIMIZATION_COMPILATION_REASON;
import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.PACKAGE_OPTIMIZATION_COMPILATION_FILTER;
import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.TYPE_TRANSITION_COLD_LAUNCH;
@@ -37,6 +79,7 @@
import static com.android.server.am.MemoryStatUtil.readMemoryStatFromFilesystem;
import android.content.Context;
+import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.dex.ArtManagerInternal;
import android.content.pm.dex.PackageOptimizationInfo;
@@ -612,6 +655,95 @@
startupTimeMs);
}
+ void logActivityStart(Intent intent, ProcessRecord callerApp, ActivityRecord r,
+ int callingUid, String callingPackage, int callingUidProcState,
+ boolean callingUidHasAnyVisibleWindow,
+ int realCallingUid, int realCallingUidProcState,
+ boolean realCallingUidHasAnyVisibleWindow,
+ int targetUid, String targetPackage, int targetUidProcState,
+ boolean targetUidHasAnyVisibleWindow, String targetWhitelistTag,
+ boolean comingFromPendingIntent) {
+
+ final long nowElapsed = SystemClock.elapsedRealtime();
+ final long nowUptime = SystemClock.uptimeMillis();
+ final LogMaker builder = new LogMaker(ACTION_ACTIVITY_START);
+ builder.setTimestamp(System.currentTimeMillis());
+ builder.addTaggedData(FIELD_CALLING_UID, callingUid);
+ builder.addTaggedData(FIELD_CALLING_PACKAGE_NAME, callingPackage);
+ builder.addTaggedData(FIELD_CALLING_UID_PROC_STATE,
+ processStateAmToProto(callingUidProcState));
+ builder.addTaggedData(FIELD_CALLING_UID_HAS_ANY_VISIBLE_WINDOW,
+ callingUidHasAnyVisibleWindow ? 1 : 0);
+ builder.addTaggedData(FIELD_REAL_CALLING_UID, realCallingUid);
+ builder.addTaggedData(FIELD_REAL_CALLING_UID_PROC_STATE,
+ processStateAmToProto(realCallingUidProcState));
+ builder.addTaggedData(FIELD_REAL_CALLING_UID_HAS_ANY_VISIBLE_WINDOW,
+ realCallingUidHasAnyVisibleWindow ? 1 : 0);
+ builder.addTaggedData(FIELD_TARGET_UID, targetUid);
+ builder.addTaggedData(FIELD_TARGET_PACKAGE_NAME, targetPackage);
+ builder.addTaggedData(FIELD_TARGET_UID_PROC_STATE,
+ processStateAmToProto(targetUidProcState));
+ builder.addTaggedData(FIELD_TARGET_UID_HAS_ANY_VISIBLE_WINDOW,
+ targetUidHasAnyVisibleWindow ? 1 : 0);
+ builder.addTaggedData(FIELD_TARGET_WHITELIST_TAG, targetWhitelistTag);
+ builder.addTaggedData(FIELD_TARGET_SHORT_COMPONENT_NAME, r.shortComponentName);
+ builder.addTaggedData(FIELD_COMING_FROM_PENDING_INTENT, comingFromPendingIntent ? 1 : 0);
+ builder.addTaggedData(FIELD_INTENT_ACTION, intent.getAction());
+ if (callerApp != null) {
+ builder.addTaggedData(FIELD_PROCESS_RECORD_PROCESS_NAME, callerApp.processName);
+ builder.addTaggedData(FIELD_PROCESS_RECORD_CUR_PROC_STATE,
+ processStateAmToProto(callerApp.curProcState));
+ builder.addTaggedData(FIELD_PROCESS_RECORD_HAS_CLIENT_ACTIVITIES,
+ callerApp.hasClientActivities ? 1 : 0);
+ builder.addTaggedData(FIELD_PROCESS_RECORD_HAS_FOREGROUND_SERVICES,
+ callerApp.hasForegroundServices() ? 1 : 0);
+ builder.addTaggedData(FIELD_PROCESS_RECORD_HAS_FOREGROUND_ACTIVITIES,
+ callerApp.foregroundActivities ? 1 : 0);
+ builder.addTaggedData(FIELD_PROCESS_RECORD_HAS_TOP_UI, callerApp.hasTopUi ? 1 : 0);
+ builder.addTaggedData(FIELD_PROCESS_RECORD_HAS_OVERLAY_UI,
+ callerApp.hasOverlayUi ? 1 : 0);
+ builder.addTaggedData(FIELD_PROCESS_RECORD_PENDING_UI_CLEAN,
+ callerApp.pendingUiClean ? 1 : 0);
+ if (callerApp.interactionEventTime != 0) {
+ builder.addTaggedData(FIELD_PROCESS_RECORD_MILLIS_SINCE_LAST_INTERACTION_EVENT,
+ (nowElapsed - callerApp.interactionEventTime));
+ }
+ if (callerApp.fgInteractionTime != 0) {
+ builder.addTaggedData(FIELD_PROCESS_RECORD_MILLIS_SINCE_FG_INTERACTION,
+ (nowElapsed - callerApp.fgInteractionTime));
+ }
+ if (callerApp.whenUnimportant != 0) {
+ builder.addTaggedData(FIELD_PROCESS_RECORD_MILLIS_SINCE_UNIMPORTANT,
+ (nowUptime - callerApp.whenUnimportant));
+ }
+ }
+ builder.addTaggedData(FIELD_ACTIVITY_RECORD_LAUNCH_MODE, r.info.launchMode);
+ builder.addTaggedData(FIELD_ACTIVITY_RECORD_TARGET_ACTIVITY, r.info.targetActivity);
+ builder.addTaggedData(FIELD_ACTIVITY_RECORD_FLAGS, r.info.flags);
+ builder.addTaggedData(FIELD_ACTIVITY_RECORD_REAL_ACTIVITY, r.realActivity.toShortString());
+ builder.addTaggedData(FIELD_ACTIVITY_RECORD_SHORT_COMPONENT_NAME, r.shortComponentName);
+ builder.addTaggedData(FIELD_ACTIVITY_RECORD_PROCESS_NAME, r.processName);
+ builder.addTaggedData(FIELD_ACTIVITY_RECORD_IS_FULLSCREEN, r.fullscreen ? 1 : 0);
+ builder.addTaggedData(FIELD_ACTIVITY_RECORD_IS_NO_DISPLAY, r.noDisplay ? 1 : 0);
+ if (r.lastVisibleTime != 0) {
+ builder.addTaggedData(FIELD_ACTIVITY_RECORD_MILLIS_SINCE_LAST_VISIBLE,
+ (nowUptime - r.lastVisibleTime));
+ }
+ if (r.resultTo != null) {
+ builder.addTaggedData(FIELD_ACTIVITY_RECORD_RESULT_TO_PKG_NAME, r.resultTo.packageName);
+ builder.addTaggedData(FIELD_ACTIVITY_RECORD_RESULT_TO_SHORT_COMPONENT_NAME,
+ r.resultTo.shortComponentName);
+ }
+ builder.addTaggedData(FIELD_ACTIVITY_RECORD_IS_VISIBLE, r.visible ? 1 : 0);
+ builder.addTaggedData(FIELD_ACTIVITY_RECORD_IS_VISIBLE_IGNORING_KEYGUARD,
+ r.visibleIgnoringKeyguard ? 1 : 0);
+ if (r.lastLaunchTime != 0) {
+ builder.addTaggedData(FIELD_ACTIVITY_RECORD_MILLIS_SINCE_LAST_LAUNCH,
+ (nowUptime - r.lastLaunchTime));
+ }
+ mMetricsLogger.write(builder);
+ }
+
private int getTransitionType(WindowingModeTransitionInfo info) {
if (info.currentTransitionProcessRunning) {
if (info.startResult == START_SUCCESS) {
diff --git a/services/core/java/com/android/server/am/ActivityStackSupervisor.java b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
index 27a4460..9809bfa 100644
--- a/services/core/java/com/android/server/am/ActivityStackSupervisor.java
+++ b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
@@ -4863,7 +4863,7 @@
return mService.getActivityStartController().startActivityInPackage(
task.mCallingUid, callingPid, callingUid, callingPackage, intent, null, null,
null, 0, 0, options, userId, task, "startActivityFromRecents",
- false /* validateIncomingUser */);
+ false /* validateIncomingUser */, null /* originatingPendingIntent */);
} finally {
if (windowingMode == WINDOWING_MODE_SPLIT_SCREEN_PRIMARY && task != null) {
// If we are launching the task in the docked stack, put it into resizing mode so
diff --git a/services/core/java/com/android/server/am/ActivityStartController.java b/services/core/java/com/android/server/am/ActivityStartController.java
index 2cba720..6e3a79c 100644
--- a/services/core/java/com/android/server/am/ActivityStartController.java
+++ b/services/core/java/com/android/server/am/ActivityStartController.java
@@ -249,7 +249,8 @@
final int startActivityInPackage(int uid, int realCallingPid, int realCallingUid,
String callingPackage, Intent intent, String resolvedType, IBinder resultTo,
String resultWho, int requestCode, int startFlags, SafeActivityOptions options,
- int userId, TaskRecord inTask, String reason, boolean validateIncomingUser) {
+ int userId, TaskRecord inTask, String reason, boolean validateIncomingUser,
+ PendingIntentRecord originatingPendingIntent) {
userId = checkTargetUser(userId, validateIncomingUser, realCallingPid, realCallingUid,
reason);
@@ -268,6 +269,7 @@
.setActivityOptions(options)
.setMayWait(userId)
.setInTask(inTask)
+ .setOriginatingPendingIntent(originatingPendingIntent)
.execute();
}
@@ -279,10 +281,12 @@
* @param intents Intents to start.
* @param userId Start the intents on this user.
* @param validateIncomingUser Set true to skip checking {@code userId} with the calling UID.
+ * @param originatingPendingIntent PendingIntentRecord that originated this activity start or
+ * null if not originated by PendingIntent
*/
final int startActivitiesInPackage(int uid, String callingPackage, Intent[] intents,
String[] resolvedTypes, IBinder resultTo, SafeActivityOptions options, int userId,
- boolean validateIncomingUser) {
+ boolean validateIncomingUser, PendingIntentRecord originatingPendingIntent) {
final String reason = "startActivityInPackage";
@@ -291,12 +295,12 @@
// TODO: Switch to user app stacks here.
return startActivities(null, uid, callingPackage, intents, resolvedTypes, resultTo, options,
- userId, reason);
+ userId, reason, originatingPendingIntent);
}
int startActivities(IApplicationThread caller, int callingUid, String callingPackage,
Intent[] intents, String[] resolvedTypes, IBinder resultTo, SafeActivityOptions options,
- int userId, String reason) {
+ int userId, String reason, PendingIntentRecord originatingPendingIntent) {
if (intents == null) {
throw new NullPointerException("intents is null");
}
@@ -375,6 +379,7 @@
// Top activity decides on animation being run, so we allow only for the
// top one as otherwise an activity below might consume it.
.setAllowPendingRemoteAnimationRegistryLookup(top /* allowLookup*/)
+ .setOriginatingPendingIntent(originatingPendingIntent)
.execute();
if (res < 0) {
diff --git a/services/core/java/com/android/server/am/ActivityStarter.java b/services/core/java/com/android/server/am/ActivityStarter.java
index 05fae83..dcf9344 100644
--- a/services/core/java/com/android/server/am/ActivityStarter.java
+++ b/services/core/java/com/android/server/am/ActivityStarter.java
@@ -99,6 +99,7 @@
import android.os.IBinder;
import android.os.RemoteException;
import android.os.SystemClock;
+import android.os.Trace;
import android.os.UserHandle;
import android.os.UserManager;
import android.service.voice.IVoiceInteractionSession;
@@ -313,6 +314,7 @@
int userId;
WaitResult waitResult;
int filterCallingUid;
+ PendingIntentRecord originatingPendingIntent;
/**
* If set to {@code true}, allows this activity start to look into
@@ -369,6 +371,7 @@
avoidMoveToFront = false;
allowPendingRemoteAnimationRegistryLookup = true;
filterCallingUid = UserHandle.USER_NULL;
+ originatingPendingIntent = null;
}
/**
@@ -407,6 +410,7 @@
allowPendingRemoteAnimationRegistryLookup
= request.allowPendingRemoteAnimationRegistryLookup;
filterCallingUid = request.filterCallingUid;
+ originatingPendingIntent = request.originatingPendingIntent;
}
}
@@ -490,7 +494,8 @@
mRequest.profilerInfo, mRequest.waitResult, mRequest.globalConfig,
mRequest.activityOptions, mRequest.ignoreTargetSecurity, mRequest.userId,
mRequest.inTask, mRequest.reason,
- mRequest.allowPendingRemoteAnimationRegistryLookup);
+ mRequest.allowPendingRemoteAnimationRegistryLookup,
+ mRequest.originatingPendingIntent);
} else {
return startActivity(mRequest.caller, mRequest.intent, mRequest.ephemeralIntent,
mRequest.resolvedType, mRequest.activityInfo, mRequest.resolveInfo,
@@ -500,7 +505,8 @@
mRequest.realCallingUid, mRequest.startFlags, mRequest.activityOptions,
mRequest.ignoreTargetSecurity, mRequest.componentSpecified,
mRequest.outActivity, mRequest.inTask, mRequest.reason,
- mRequest.allowPendingRemoteAnimationRegistryLookup);
+ mRequest.allowPendingRemoteAnimationRegistryLookup,
+ mRequest.originatingPendingIntent);
}
} finally {
onExecutionComplete();
@@ -532,7 +538,8 @@
String callingPackage, int realCallingPid, int realCallingUid, int startFlags,
SafeActivityOptions options, boolean ignoreTargetSecurity, boolean componentSpecified,
ActivityRecord[] outActivity, TaskRecord inTask, String reason,
- boolean allowPendingRemoteAnimationRegistryLookup) {
+ boolean allowPendingRemoteAnimationRegistryLookup,
+ PendingIntentRecord originatingPendingIntent) {
if (TextUtils.isEmpty(reason)) {
throw new IllegalArgumentException("Need to specify a reason.");
@@ -545,7 +552,7 @@
aInfo, rInfo, voiceSession, voiceInteractor, resultTo, resultWho, requestCode,
callingPid, callingUid, callingPackage, realCallingPid, realCallingUid, startFlags,
options, ignoreTargetSecurity, componentSpecified, mLastStartActivityRecord,
- inTask, allowPendingRemoteAnimationRegistryLookup);
+ inTask, allowPendingRemoteAnimationRegistryLookup, originatingPendingIntent);
if (outActivity != null) {
// mLastStartActivityRecord[0] is set in the call to startActivity above.
@@ -575,7 +582,8 @@
String callingPackage, int realCallingPid, int realCallingUid, int startFlags,
SafeActivityOptions options,
boolean ignoreTargetSecurity, boolean componentSpecified, ActivityRecord[] outActivity,
- TaskRecord inTask, boolean allowPendingRemoteAnimationRegistryLookup) {
+ TaskRecord inTask, boolean allowPendingRemoteAnimationRegistryLookup,
+ PendingIntentRecord originatingPendingIntent) {
int err = ActivityManager.START_SUCCESS;
// Pull the optional Ephemeral Installer-only bundle out of the options early.
final Bundle verificationBundle
@@ -857,10 +865,58 @@
mService.onStartActivitySetDidAppSwitch();
mController.doPendingActivityLaunches(false);
+ maybeLogActivityStart(callingUid, callingPackage, realCallingUid, intent, callerApp, r,
+ originatingPendingIntent);
+
return startActivity(r, sourceRecord, voiceSession, voiceInteractor, startFlags,
true /* doResume */, checkedOptions, inTask, outActivity);
}
+ private void maybeLogActivityStart(int callingUid, String callingPackage, int realCallingUid,
+ Intent intent, ProcessRecord callerApp, ActivityRecord r,
+ PendingIntentRecord originatingPendingIntent) {
+ boolean callerAppHasForegroundActivity = (callerApp != null)
+ ? callerApp.foregroundActivities
+ : false;
+ if (!mService.mAm.isActivityStartsLoggingEnabled() || callerAppHasForegroundActivity
+ || r == null) {
+ // skip logging in this case
+ return;
+ }
+
+ try {
+ Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "logActivityStart");
+ final int callingUidProcState = mService.mAm.getUidStateLocked(callingUid);
+ final boolean callingUidHasAnyVisibleWindow =
+ mService.mWindowManager.isAnyWindowVisibleForUid(callingUid);
+ final int realCallingUidProcState = (callingUid == realCallingUid)
+ ? callingUidProcState
+ : mService.mAm.getUidStateLocked(realCallingUid);
+ final boolean realCallingUidHasAnyVisibleWindow = (callingUid == realCallingUid)
+ ? callingUidHasAnyVisibleWindow
+ : mService.mWindowManager.isAnyWindowVisibleForUid(realCallingUid);
+ final String targetPackage = r.packageName;
+ final int targetUid = (r.appInfo != null) ? r.appInfo.uid : -1;
+ final int targetUidProcState = mService.mAm.getUidStateLocked(targetUid);
+ final boolean targetUidHasAnyVisibleWindow = (targetUid != -1)
+ ? mService.mWindowManager.isAnyWindowVisibleForUid(targetUid)
+ : false;
+ final String targetWhitelistTag = (targetUid != -1)
+ ? mService.mAm.getPendingTempWhitelistTagForUidLocked(targetUid)
+ : null;
+
+ mSupervisor.getActivityMetricsLogger().logActivityStart(intent, callerApp, r,
+ callingUid, callingPackage, callingUidProcState,
+ callingUidHasAnyVisibleWindow,
+ realCallingUid, realCallingUidProcState,
+ realCallingUidHasAnyVisibleWindow,
+ targetUid, targetPackage, targetUidProcState,
+ targetUidHasAnyVisibleWindow, targetWhitelistTag,
+ (originatingPendingIntent != null));
+ } finally {
+ Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER);
+ }
+ }
/**
* Creates a launch intent for the given auxiliary resolution data.
@@ -941,7 +997,8 @@
ProfilerInfo profilerInfo, WaitResult outResult,
Configuration globalConfig, SafeActivityOptions options, boolean ignoreTargetSecurity,
int userId, TaskRecord inTask, String reason,
- boolean allowPendingRemoteAnimationRegistryLookup) {
+ boolean allowPendingRemoteAnimationRegistryLookup,
+ PendingIntentRecord originatingPendingIntent) {
// Refuse possible leaked file descriptors
if (intent != null && intent.hasFileDescriptors()) {
throw new IllegalArgumentException("File descriptors passed in Intent");
@@ -1087,7 +1144,7 @@
voiceSession, voiceInteractor, resultTo, resultWho, requestCode, callingPid,
callingUid, callingPackage, realCallingPid, realCallingUid, startFlags, options,
ignoreTargetSecurity, componentSpecified, outRecord, inTask, reason,
- allowPendingRemoteAnimationRegistryLookup);
+ allowPendingRemoteAnimationRegistryLookup, originatingPendingIntent);
Binder.restoreCallingIdentity(origId);
@@ -2615,6 +2672,11 @@
return this;
}
+ ActivityStarter setOriginatingPendingIntent(PendingIntentRecord originatingPendingIntent) {
+ mRequest.originatingPendingIntent = originatingPendingIntent;
+ return this;
+ }
+
void dump(PrintWriter pw, String prefix) {
prefix = prefix + " ";
pw.print(prefix);
diff --git a/services/core/java/com/android/server/am/ActivityTaskManagerService.java b/services/core/java/com/android/server/am/ActivityTaskManagerService.java
index 68b1d76..11f8bb1 100644
--- a/services/core/java/com/android/server/am/ActivityTaskManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityTaskManagerService.java
@@ -727,7 +727,8 @@
userId = handleIncomingUser(Binder.getCallingPid(), Binder.getCallingUid(), userId, reason);
// TODO: Switch to user app stacks here.
return getActivityStartController().startActivities(caller, -1, callingPackage, intents,
- resolvedTypes, resultTo, SafeActivityOptions.fromBundle(bOptions), userId, reason);
+ resolvedTypes, resultTo, SafeActivityOptions.fromBundle(bOptions), userId, reason,
+ null /* originatingPendingIntent */);
}
@Override
@@ -5093,7 +5094,7 @@
packageUid, packageName,
intents, resolvedTypes, null /* resultTo */,
SafeActivityOptions.fromBundle(bOptions), userId,
- false /* validateIncomingUser */);
+ false /* validateIncomingUser */, null /* originatingPendingIntent */);
}
}
diff --git a/services/core/java/com/android/server/am/AppErrors.java b/services/core/java/com/android/server/am/AppErrors.java
index 3b98f37..162f344 100644
--- a/services/core/java/com/android/server/am/AppErrors.java
+++ b/services/core/java/com/android/server/am/AppErrors.java
@@ -491,7 +491,8 @@
task.intent, null, null, null, 0, 0,
new SafeActivityOptions(ActivityOptions.makeBasic()),
task.userId, null,
- "AppErrors", false /*validateIncomingUser*/);
+ "AppErrors", false /*validateIncomingUser*/,
+ null /* originatingPendingIntent */);
}
}
}
diff --git a/services/core/java/com/android/server/am/PendingIntentRecord.java b/services/core/java/com/android/server/am/PendingIntentRecord.java
index db09165..ee1166e 100644
--- a/services/core/java/com/android/server/am/PendingIntentRecord.java
+++ b/services/core/java/com/android/server/am/PendingIntentRecord.java
@@ -307,7 +307,7 @@
} else if (finalIntent.getComponent() != null) {
finalIntent.getComponent().appendShortString(tag);
} else if (finalIntent.getData() != null) {
- tag.append(finalIntent.getData());
+ tag.append(finalIntent.getData().toSafeString());
}
owner.tempWhitelistForPendingIntentLocked(callingPid,
callingUid, uid, duration, tag.toString());
@@ -346,13 +346,15 @@
res = owner.mActivityTaskManager.getActivityStartController().startActivitiesInPackage(
uid, key.packageName, allIntents, allResolvedTypes,
resultTo, mergedOptions, userId,
- false /* validateIncomingUser */);
+ false /* validateIncomingUser */,
+ this /* originatingPendingIntent */);
} else {
res = owner.mActivityTaskManager.getActivityStartController().startActivityInPackage(uid,
callingPid, callingUid, key.packageName, finalIntent,
resolvedType, resultTo, resultWho, requestCode, 0,
mergedOptions, userId, null, "PendingIntentRecord",
- false /* validateIncomingUser */);
+ false /* validateIncomingUser */,
+ this /* originatingPendingIntent */);
}
} catch (RuntimeException e) {
Slog.w(TAG, "Unable to send startActivity intent", e);
diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java
index c7e103c..8caa702 100644
--- a/services/core/java/com/android/server/audio/AudioService.java
+++ b/services/core/java/com/android/server/audio/AudioService.java
@@ -2580,12 +2580,12 @@
toastText = com.android.internal.R.string.volume_dialog_ringer_guidance_vibrate;
break;
}
- maybeVibrate(effect);
+ maybeVibrate(effect, reason);
setRingerModeInternal(ringerMode, reason);
Toast.makeText(mContext, toastText, Toast.LENGTH_SHORT).show();
}
- private boolean maybeVibrate(VibrationEffect effect) {
+ private boolean maybeVibrate(VibrationEffect effect, String reason) {
if (!mHasVibrator) {
return false;
}
@@ -2598,8 +2598,8 @@
if (effect == null) {
return false;
}
- mVibrator.vibrate(
- Binder.getCallingUid(), mContext.getOpPackageName(), effect, VIBRATION_ATTRIBUTES);
+ mVibrator.vibrate(Binder.getCallingUid(), mContext.getOpPackageName(), effect,
+ reason, VIBRATION_ATTRIBUTES);
return true;
}
diff --git a/services/core/java/com/android/server/connectivity/NetworkMonitor.java b/services/core/java/com/android/server/connectivity/NetworkMonitor.java
index 9b9a380..843ba2e 100644
--- a/services/core/java/com/android/server/connectivity/NetworkMonitor.java
+++ b/services/core/java/com/android/server/connectivity/NetworkMonitor.java
@@ -21,7 +21,10 @@
import static android.net.CaptivePortal.APP_RETURN_WANTED_AS_IS;
import static android.net.ConnectivityManager.EXTRA_CAPTIVE_PORTAL_PROBE_SPEC;
import static android.net.ConnectivityManager.EXTRA_CAPTIVE_PORTAL_URL;
+import static android.net.metrics.ValidationProbeEvent.DNS_FAILURE;
+import static android.net.metrics.ValidationProbeEvent.DNS_SUCCESS;
import static android.net.metrics.ValidationProbeEvent.PROBE_FALLBACK;
+import static android.net.metrics.ValidationProbeEvent.PROBE_PRIVDNS;
import android.annotation.Nullable;
import android.app.PendingIntent;
@@ -258,7 +261,7 @@
private final WifiManager mWifiManager;
private final NetworkRequest mDefaultRequest;
private final IpConnectivityLog mMetricsLog;
- private final NetworkMonitorSettings mSettings;
+ private final Dependencies mDependencies;
// Configuration values for captive portal detection probes.
private final String mCaptivePortalUserAgent;
@@ -298,18 +301,19 @@
// This variable is set before transitioning to the mCaptivePortalState.
private CaptivePortalProbeResult mLastPortalProbeResult = CaptivePortalProbeResult.FAILED;
+ // Random generator to select fallback URL index
+ private final Random mRandom;
private int mNextFallbackUrlIndex = 0;
public NetworkMonitor(Context context, Handler handler, NetworkAgentInfo networkAgentInfo,
NetworkRequest defaultRequest) {
this(context, handler, networkAgentInfo, defaultRequest, new IpConnectivityLog(),
- NetworkMonitorSettings.DEFAULT);
+ Dependencies.DEFAULT);
}
@VisibleForTesting
protected NetworkMonitor(Context context, Handler handler, NetworkAgentInfo networkAgentInfo,
- NetworkRequest defaultRequest, IpConnectivityLog logger,
- NetworkMonitorSettings settings) {
+ NetworkRequest defaultRequest, IpConnectivityLog logger, Dependencies deps) {
// Add suffix indicating which NetworkMonitor we're talking about.
super(TAG + networkAgentInfo.name());
@@ -320,9 +324,9 @@
mContext = context;
mMetricsLog = logger;
mConnectivityServiceHandler = handler;
- mSettings = settings;
+ mDependencies = deps;
mNetworkAgentInfo = networkAgentInfo;
- mNetwork = new OneAddressPerFamilyNetwork(networkAgentInfo.network());
+ mNetwork = deps.getNetwork(networkAgentInfo);
mNetId = mNetwork.netId;
mTelephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
mWifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
@@ -340,9 +344,10 @@
mUseHttps = getUseHttpsValidation();
mCaptivePortalUserAgent = getCaptivePortalUserAgent();
mCaptivePortalHttpsUrl = makeURL(getCaptivePortalServerHttpsUrl());
- mCaptivePortalHttpUrl = makeURL(getCaptivePortalServerHttpUrl(settings, context));
+ mCaptivePortalHttpUrl = makeURL(getCaptivePortalServerHttpUrl(deps, context));
mCaptivePortalFallbackUrls = makeCaptivePortalFallbackUrls();
mCaptivePortalFallbackSpecs = makeCaptivePortalFallbackProbeSpecs();
+ mRandom = deps.getRandom();
start();
}
@@ -799,8 +804,10 @@
final InetAddress[] ips = ResolvUtil.blockingResolveAllLocally(
mNetwork, mPrivateDnsProviderHostname, 0 /* aiFlags */);
mPrivateDnsConfig = new PrivateDnsConfig(mPrivateDnsProviderHostname, ips);
+ validationLog("Strict mode hostname resolved: " + mPrivateDnsConfig);
} catch (UnknownHostException uhe) {
mPrivateDnsConfig = null;
+ validationLog("Strict mode hostname resolution failed: " + uhe.getMessage());
}
}
@@ -829,10 +836,21 @@
final String ONE_TIME_HOSTNAME_SUFFIX = "-dnsotls-ds.metric.gstatic.com";
final String host = UUID.randomUUID().toString().substring(0, 8) +
ONE_TIME_HOSTNAME_SUFFIX;
+ final Stopwatch watch = new Stopwatch().start();
try {
final InetAddress[] ips = mNetworkAgentInfo.network().getAllByName(host);
- return (ips != null && ips.length > 0);
- } catch (UnknownHostException uhe) {}
+ final long time = watch.stop();
+ final String strIps = Arrays.toString(ips);
+ final boolean success = (ips != null && ips.length > 0);
+ validationLog(PROBE_PRIVDNS, host, String.format("%dms: %s", time, strIps));
+ logValidationProbe(time, PROBE_PRIVDNS, success ? DNS_SUCCESS : DNS_FAILURE);
+ return success;
+ } catch (UnknownHostException uhe) {
+ final long time = watch.stop();
+ validationLog(PROBE_PRIVDNS, host,
+ String.format("%dms - Error: %s", time, uhe.getMessage()));
+ logValidationProbe(time, PROBE_PRIVDNS, DNS_FAILURE);
+ }
return false;
}
}
@@ -867,40 +885,38 @@
public boolean getIsCaptivePortalCheckEnabled() {
String symbol = Settings.Global.CAPTIVE_PORTAL_MODE;
int defaultValue = Settings.Global.CAPTIVE_PORTAL_MODE_PROMPT;
- int mode = mSettings.getSetting(mContext, symbol, defaultValue);
+ int mode = mDependencies.getSetting(mContext, symbol, defaultValue);
return mode != Settings.Global.CAPTIVE_PORTAL_MODE_IGNORE;
}
public boolean getUseHttpsValidation() {
- return mSettings.getSetting(mContext, Settings.Global.CAPTIVE_PORTAL_USE_HTTPS, 1) == 1;
+ return mDependencies.getSetting(mContext, Settings.Global.CAPTIVE_PORTAL_USE_HTTPS, 1) == 1;
}
public boolean getWifiScansAlwaysAvailableDisabled() {
- return mSettings.getSetting(mContext, Settings.Global.WIFI_SCAN_ALWAYS_AVAILABLE, 0) == 0;
+ return mDependencies.getSetting(mContext, Settings.Global.WIFI_SCAN_ALWAYS_AVAILABLE, 0) == 0;
}
private String getCaptivePortalServerHttpsUrl() {
- return mSettings.getSetting(mContext,
+ return mDependencies.getSetting(mContext,
Settings.Global.CAPTIVE_PORTAL_HTTPS_URL, DEFAULT_HTTPS_URL);
}
// Static for direct access by ConnectivityService
public static String getCaptivePortalServerHttpUrl(Context context) {
- return getCaptivePortalServerHttpUrl(NetworkMonitorSettings.DEFAULT, context);
+ return getCaptivePortalServerHttpUrl(Dependencies.DEFAULT, context);
}
- public static String getCaptivePortalServerHttpUrl(
- NetworkMonitorSettings settings, Context context) {
- return settings.getSetting(
- context, Settings.Global.CAPTIVE_PORTAL_HTTP_URL, DEFAULT_HTTP_URL);
+ public static String getCaptivePortalServerHttpUrl(Dependencies deps, Context context) {
+ return deps.getSetting(context, Settings.Global.CAPTIVE_PORTAL_HTTP_URL, DEFAULT_HTTP_URL);
}
private URL[] makeCaptivePortalFallbackUrls() {
try {
String separator = ",";
- String firstUrl = mSettings.getSetting(mContext,
+ String firstUrl = mDependencies.getSetting(mContext,
Settings.Global.CAPTIVE_PORTAL_FALLBACK_URL, DEFAULT_FALLBACK_URL);
- String joinedUrls = firstUrl + separator + mSettings.getSetting(mContext,
+ String joinedUrls = firstUrl + separator + mDependencies.getSetting(mContext,
Settings.Global.CAPTIVE_PORTAL_OTHER_FALLBACK_URLS,
DEFAULT_OTHER_FALLBACK_URLS);
List<URL> urls = new ArrayList<>();
@@ -924,7 +940,7 @@
private CaptivePortalProbeSpec[] makeCaptivePortalFallbackProbeSpecs() {
try {
- final String settingsValue = mSettings.getSetting(
+ final String settingsValue = mDependencies.getSetting(
mContext, Settings.Global.CAPTIVE_PORTAL_FALLBACK_PROBE_SPECS, null);
// Probe specs only used if configured in settings
if (TextUtils.isEmpty(settingsValue)) {
@@ -940,7 +956,7 @@
}
private String getCaptivePortalUserAgent() {
- return mSettings.getSetting(mContext,
+ return mDependencies.getSetting(mContext,
Settings.Global.CAPTIVE_PORTAL_USER_AGENT, DEFAULT_USER_AGENT);
}
@@ -949,7 +965,7 @@
return null;
}
int idx = Math.abs(mNextFallbackUrlIndex) % mCaptivePortalFallbackUrls.length;
- mNextFallbackUrlIndex += new Random().nextInt(); // randomely change url without memory.
+ mNextFallbackUrlIndex += mRandom.nextInt(); // randomly change url without memory.
return mCaptivePortalFallbackUrls[idx];
}
@@ -958,7 +974,7 @@
return null;
}
// Randomly change spec without memory. Also randomize the first attempt.
- final int idx = Math.abs(new Random().nextInt()) % mCaptivePortalFallbackSpecs.length;
+ final int idx = Math.abs(mRandom.nextInt()) % mCaptivePortalFallbackSpecs.length;
return mCaptivePortalFallbackSpecs[idx];
}
@@ -1376,15 +1392,15 @@
}
@VisibleForTesting
- public interface NetworkMonitorSettings {
- int getSetting(Context context, String symbol, int defaultValue);
- String getSetting(Context context, String symbol, String defaultValue);
+ public static class Dependencies {
+ public Network getNetwork(NetworkAgentInfo networkAgentInfo) {
+ return new OneAddressPerFamilyNetwork(networkAgentInfo.network());
+ }
- static NetworkMonitorSettings DEFAULT = new DefaultNetworkMonitorSettings();
- }
+ public Random getRandom() {
+ return new Random();
+ }
- @VisibleForTesting
- public static class DefaultNetworkMonitorSettings implements NetworkMonitorSettings {
public int getSetting(Context context, String symbol, int defaultValue) {
return Settings.Global.getInt(context.getContentResolver(), symbol, defaultValue);
}
@@ -1393,5 +1409,7 @@
final String value = Settings.Global.getString(context.getContentResolver(), symbol);
return value != null ? value : defaultValue;
}
+
+ public static final Dependencies DEFAULT = new Dependencies();
}
}
diff --git a/services/core/java/com/android/server/connectivity/OWNERS b/services/core/java/com/android/server/connectivity/OWNERS
index ce50558..7311eee 100644
--- a/services/core/java/com/android/server/connectivity/OWNERS
+++ b/services/core/java/com/android/server/connectivity/OWNERS
@@ -1,6 +1,8 @@
set noparent
+codewiz@google.com
ek@google.com
jchalard@google.com
lorenzo@google.com
+reminv@google.com
satk@google.com
diff --git a/services/core/java/com/android/server/job/JobSchedulerService.java b/services/core/java/com/android/server/job/JobSchedulerService.java
index 0b7c5b9..260633a 100644
--- a/services/core/java/com/android/server/job/JobSchedulerService.java
+++ b/services/core/java/com/android/server/job/JobSchedulerService.java
@@ -32,6 +32,7 @@
import android.app.job.JobProtoEnums;
import android.app.job.JobScheduler;
import android.app.job.JobService;
+import android.app.job.JobSnapshot;
import android.app.job.JobWorkItem;
import android.app.usage.UsageStatsManager;
import android.app.usage.UsageStatsManagerInternal;
@@ -2724,6 +2725,55 @@
(new JobSchedulerShellCommand(JobSchedulerService.this)).exec(
this, in, out, err, args, callback, resultReceiver);
}
+
+ /**
+ * <b>For internal system user only!</b>
+ * Returns a list of all currently-executing jobs.
+ */
+ @Override
+ public List<JobInfo> getStartedJobs() {
+ final int uid = Binder.getCallingUid();
+ if (uid != Process.SYSTEM_UID) {
+ throw new SecurityException(
+ "getStartedJobs() is system internal use only.");
+ }
+
+ final ArrayList<JobInfo> runningJobs;
+
+ synchronized (mLock) {
+ runningJobs = new ArrayList<>(mActiveServices.size());
+ for (JobServiceContext jsc : mActiveServices) {
+ final JobStatus job = jsc.getRunningJobLocked();
+ if (job != null) {
+ runningJobs.add(job.getJob());
+ }
+ }
+ }
+
+ return runningJobs;
+ }
+
+ /**
+ * <b>For internal system user only!</b>
+ * Returns a snapshot of the state of all jobs known to the system.
+ *
+ * <p class="note">This is a slow operation, so it should be called sparingly.
+ */
+ @Override
+ public List<JobSnapshot> getAllJobSnapshots() {
+ final int uid = Binder.getCallingUid();
+ if (uid != Process.SYSTEM_UID) {
+ throw new SecurityException(
+ "getAllJobSnapshots() is system internal use only.");
+ }
+ synchronized (mLock) {
+ final ArrayList<JobSnapshot> snapshots = new ArrayList<>(mJobs.size());
+ mJobs.forEachJob((job) -> snapshots.add(
+ new JobSnapshot(job.getJob(), job.getSatisfiedConstraintFlags(),
+ isReadyToBeExecutedLocked(job))));
+ return snapshots;
+ }
+ }
};
// Shell command infrastructure: run the given job immediately
diff --git a/services/core/java/com/android/server/job/controllers/JobStatus.java b/services/core/java/com/android/server/job/controllers/JobStatus.java
index a1e066e..3f8941d 100644
--- a/services/core/java/com/android/server/job/controllers/JobStatus.java
+++ b/services/core/java/com/android/server/job/controllers/JobStatus.java
@@ -694,6 +694,10 @@
mInternalFlags |= flags;
}
+ public int getSatisfiedConstraintFlags() {
+ return satisfiedConstraints;
+ }
+
public void maybeAddForegroundExemption(Predicate<Integer> uidForegroundChecker) {
// Jobs with time constraints shouldn't be exempted.
if (job.hasEarlyConstraint() || job.hasLateConstraint()) {
diff --git a/services/core/java/com/android/server/net/OWNERS b/services/core/java/com/android/server/net/OWNERS
index 64dc98e..2e91f99 100644
--- a/services/core/java/com/android/server/net/OWNERS
+++ b/services/core/java/com/android/server/net/OWNERS
@@ -1,9 +1,11 @@
set noparent
+codewiz@google.com
ek@google.com
jchalard@google.com
jsharkey@android.com
lorenzo@google.com
+reminv@google.com
satk@google.com
silberst@google.com
sudheersai@google.com
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java
index de53427..f487200 100644
--- a/services/core/java/com/android/server/notification/NotificationManagerService.java
+++ b/services/core/java/com/android/server/notification/NotificationManagerService.java
@@ -2144,6 +2144,10 @@
enforceSystemOrSystemUI("setNotificationsEnabledForPackage");
mPreferencesHelper.setEnabled(pkg, uid, enabled);
+ mMetricsLogger.write(new LogMaker(MetricsEvent.ACTION_BAN_APP_NOTES)
+ .setType(MetricsEvent.TYPE_ACTION)
+ .setPackageName(pkg)
+ .setSubtype(enabled ? 1 : 0));
// Now, cancel any outstanding notifications that are part of a just-disabled app
if (!enabled) {
cancelAllNotificationsInt(MY_UID, MY_PID, pkg, null, 0, 0, true,
@@ -5033,11 +5037,11 @@
Thread.sleep(waitMs);
} catch (InterruptedException e) { }
mVibrator.vibrate(record.sbn.getUid(), record.sbn.getOpPkg(),
- effect, record.getAudioAttributes());
+ effect, "Notification (delayed)", record.getAudioAttributes());
}).start();
} else {
mVibrator.vibrate(record.sbn.getUid(), record.sbn.getOpPkg(),
- effect, record.getAudioAttributes());
+ effect, "Notification", record.getAudioAttributes());
}
return true;
} finally{
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index bfa45e1..3b67663 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -8912,10 +8912,10 @@
+ " better than this " + pkg.getLongVersionCode());
}
- // Verify certificates against what was last scanned. If it is an updated priv app, we will
- // force re-collecting certificate.
- final boolean forceCollect = PackageManagerServiceUtils.isApkVerificationForced(
- disabledPkgSetting);
+ // Verify certificates against what was last scanned. If there was an upgrade or this is an
+ // updated priv app, we will force re-collecting certificate.
+ final boolean forceCollect = mIsUpgrade ||
+ PackageManagerServiceUtils.isApkVerificationForced(disabledPkgSetting);
// Full APK verification can be skipped during certificate collection, only if the file is
// in verified partition, or can be verified on access (when apk verity is enabled). In both
// cases, only data in Signing Block is verified instead of the whole file.
@@ -21220,7 +21220,8 @@
}
@Override
- public int getComponentEnabledSetting(ComponentName component, int userId) {
+ public int getComponentEnabledSetting(@NonNull ComponentName component, int userId) {
+ if (component == null) return COMPONENT_ENABLED_STATE_DEFAULT;
if (!sUserManager.exists(userId)) return COMPONENT_ENABLED_STATE_DISABLED;
int callingUid = Binder.getCallingUid();
mPermissionManager.enforceCrossUserPermission(callingUid, userId,
@@ -22063,9 +22064,6 @@
//TODO: b/111402650
private void disableSkuSpecificApps() {
- if (!mIsUpgrade && !mFirstBoot) {
- return;
- }
String apkList[] = mContext.getResources().getStringArray(
R.array.config_disableApksUnlessMatchedSku_apk_list);
String skuArray[] = mContext.getResources().getStringArray(
@@ -22079,7 +22077,9 @@
}
for (String packageName : apkList) {
setSystemAppHiddenUntilInstalled(packageName, true);
- setSystemAppInstallState(packageName, false, ActivityManager.getCurrentUser());
+ for (UserInfo user : sUserManager.getUsers(false)) {
+ setSystemAppInstallState(packageName, false, user.id);
+ }
}
}
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java
index a8b92a6..12e1adb 100644
--- a/services/core/java/com/android/server/policy/PhoneWindowManager.java
+++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java
@@ -990,7 +990,8 @@
public void onWakeUp() {
synchronized (mLock) {
if (shouldEnableWakeGestureLp()) {
- performHapticFeedbackLw(null, HapticFeedbackConstants.VIRTUAL_KEY, false);
+ performHapticFeedbackLw(null, HapticFeedbackConstants.VIRTUAL_KEY, false,
+ "Wake Up");
wakeUp(SystemClock.uptimeMillis(), mAllowTheaterModeWakeFromWakeGesture,
"android.policy:GESTURE");
}
@@ -1427,19 +1428,22 @@
break;
case LONG_PRESS_POWER_GLOBAL_ACTIONS:
mPowerKeyHandled = true;
- performHapticFeedbackLw(null, HapticFeedbackConstants.LONG_PRESS, false);
+ performHapticFeedbackLw(null, HapticFeedbackConstants.LONG_PRESS, false,
+ "Power - Long Press - Global Actions");
showGlobalActionsInternal();
break;
case LONG_PRESS_POWER_SHUT_OFF:
case LONG_PRESS_POWER_SHUT_OFF_NO_CONFIRM:
mPowerKeyHandled = true;
- performHapticFeedbackLw(null, HapticFeedbackConstants.LONG_PRESS, false);
+ performHapticFeedbackLw(null, HapticFeedbackConstants.LONG_PRESS, false,
+ "Power - Long Press - Shut Off");
sendCloseSystemWindows(SYSTEM_DIALOG_REASON_GLOBAL_ACTIONS);
mWindowManagerFuncs.shutdown(behavior == LONG_PRESS_POWER_SHUT_OFF);
break;
case LONG_PRESS_POWER_GO_TO_VOICE_ASSIST:
mPowerKeyHandled = true;
- performHapticFeedbackLw(null, HapticFeedbackConstants.LONG_PRESS, false);
+ performHapticFeedbackLw(null, HapticFeedbackConstants.LONG_PRESS, false,
+ "Power - Long Press - Go To Voice Assist");
final boolean keyguardActive = mKeyguardDelegate == null
? false
: mKeyguardDelegate.isShowing();
@@ -1461,7 +1465,8 @@
break;
case VERY_LONG_PRESS_POWER_GLOBAL_ACTIONS:
mPowerKeyHandled = true;
- performHapticFeedbackLw(null, HapticFeedbackConstants.LONG_PRESS, false);
+ performHapticFeedbackLw(null, HapticFeedbackConstants.LONG_PRESS, false,
+ "Power - Very Long Press - Show Global Actions");
showGlobalActionsInternal();
break;
}
@@ -1616,7 +1621,8 @@
@Override
public void run() {
mEndCallKeyHandled = true;
- performHapticFeedbackLw(null, HapticFeedbackConstants.LONG_PRESS, false);
+ performHapticFeedbackLw(null, HapticFeedbackConstants.LONG_PRESS, false,
+ "End Call - Long Press - Show Global Actions");
showGlobalActionsInternal();
}
};
@@ -1743,7 +1749,8 @@
return;
}
mHomeConsumed = true;
- performHapticFeedbackLw(null, HapticFeedbackConstants.LONG_PRESS, false);
+ performHapticFeedbackLw(null, HapticFeedbackConstants.LONG_PRESS, false,
+ "Home - Long Press");
switch (mLongPressOnHomeBehavior) {
case LONG_PRESS_HOME_ALL_APPS:
launchAllAppsAction();
@@ -3925,7 +3932,8 @@
}
private void launchAssistLongPressAction() {
- performHapticFeedbackLw(null, HapticFeedbackConstants.LONG_PRESS, false);
+ performHapticFeedbackLw(null, HapticFeedbackConstants.LONG_PRESS, false,
+ "Assist - Long Press");
sendCloseSystemWindows(SYSTEM_DIALOG_REASON_ASSIST);
// launch the search activity
@@ -6029,7 +6037,8 @@
}
if (useHapticFeedback) {
- performHapticFeedbackLw(null, HapticFeedbackConstants.VIRTUAL_KEY, false);
+ performHapticFeedbackLw(null, HapticFeedbackConstants.VIRTUAL_KEY, false,
+ "Virtual Key - Press");
}
if (isWakeKey) {
@@ -6862,7 +6871,8 @@
public void setSafeMode(boolean safeMode) {
mSafeMode = safeMode;
if (safeMode) {
- performHapticFeedbackLw(null, HapticFeedbackConstants.SAFE_MODE_ENABLED, true);
+ performHapticFeedbackLw(null, HapticFeedbackConstants.SAFE_MODE_ENABLED, true,
+ "Safe Mode Enabled");
}
}
@@ -7324,7 +7334,8 @@
}
@Override
- public boolean performHapticFeedbackLw(WindowState win, int effectId, boolean always) {
+ public boolean performHapticFeedbackLw(WindowState win, int effectId, boolean always,
+ String reason) {
if (!mVibrator.hasVibrator()) {
return false;
}
@@ -7348,7 +7359,7 @@
owningUid = android.os.Process.myUid();
owningPackage = mContext.getOpPackageName();
}
- mVibrator.vibrate(owningUid, owningPackage, effect, VIBRATION_ATTRIBUTES);
+ mVibrator.vibrate(owningUid, owningPackage, effect, reason, VIBRATION_ATTRIBUTES);
return true;
}
diff --git a/services/core/java/com/android/server/policy/WindowManagerPolicy.java b/services/core/java/com/android/server/policy/WindowManagerPolicy.java
index cc39217..3ae5ced 100644
--- a/services/core/java/com/android/server/policy/WindowManagerPolicy.java
+++ b/services/core/java/com/android/server/policy/WindowManagerPolicy.java
@@ -1468,7 +1468,8 @@
/**
* Call from application to perform haptic feedback on its window.
*/
- public boolean performHapticFeedbackLw(WindowState win, int effectId, boolean always);
+ public boolean performHapticFeedbackLw(WindowState win, int effectId, boolean always,
+ String reason);
/**
* Called when we have started keeping the screen on because a window
diff --git a/services/core/java/com/android/server/uri/UriGrantsManagerService.java b/services/core/java/com/android/server/uri/UriGrantsManagerService.java
index 1b5ffda..a731e9b 100644
--- a/services/core/java/com/android/server/uri/UriGrantsManagerService.java
+++ b/services/core/java/com/android/server/uri/UriGrantsManagerService.java
@@ -1062,10 +1062,17 @@
}
}
- // If we're extending a persistable grant, then we always need to create
- // the grant data structure so that take/release APIs work
+ // Figure out the value returned when access is allowed
+ final int allowedResult;
if ((modeFlags & Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION) != 0) {
- return targetUid;
+ // If we're extending a persistable grant, then we need to return
+ // "targetUid" so that we always create a grant data structure to
+ // support take/release APIs
+ allowedResult = targetUid;
+ } else {
+ // Otherwise, we can return "-1" to indicate that no grant data
+ // structures need to be created
+ allowedResult = -1;
}
if (targetUid >= 0) {
@@ -1074,7 +1081,7 @@
// No need to grant the target this permission.
if (DEBUG) Slog.v(TAG,
"Target " + targetPkg + " already has full permission to " + grantUri);
- return -1;
+ return allowedResult;
}
} else {
// First... there is no target package, so can anyone access it?
@@ -1109,7 +1116,7 @@
}
}
if (allowed) {
- return -1;
+ return allowedResult;
}
}
diff --git a/services/core/java/com/android/server/webkit/WebViewUpdateServiceShellCommand.java b/services/core/java/com/android/server/webkit/WebViewUpdateServiceShellCommand.java
index 39e28c7..3199ed4 100644
--- a/services/core/java/com/android/server/webkit/WebViewUpdateServiceShellCommand.java
+++ b/services/core/java/com/android/server/webkit/WebViewUpdateServiceShellCommand.java
@@ -66,6 +66,12 @@
private int setWebViewImplementation() throws RemoteException {
final PrintWriter pw = getOutPrintWriter();
String shellChosenPackage = getNextArg();
+ if (shellChosenPackage == null) {
+ pw.println("Failed to switch, no PACKAGE provided.");
+ pw.println("");
+ helpSetWebViewImplementation();
+ return 1;
+ }
String newPackage = mInterface.changeProviderAndSetting(shellChosenPackage);
if (shellChosenPackage.equals(newPackage)) {
pw.println("Success");
@@ -85,6 +91,12 @@
return 0;
}
+ public void helpSetWebViewImplementation() {
+ PrintWriter pw = getOutPrintWriter();
+ pw.println(" set-webview-implementation PACKAGE");
+ pw.println(" Set the WebView implementation to the specified package.");
+ }
+
@Override
public void onHelp() {
PrintWriter pw = getOutPrintWriter();
@@ -99,8 +111,7 @@
pw.println(" disable-redundant-packages");
pw.println(" Disallow installing and enabling fallback packages when a more-preferred");
pw.println(" package is available.");
- pw.println(" set-webview-implementation PACKAGE");
- pw.println(" Set the WebView implementation to the specified package.");
+ helpSetWebViewImplementation();
pw.println(" enable-multiprocess");
pw.println(" Enable multi-process mode for WebView");
pw.println(" disable-multiprocess");
diff --git a/services/core/java/com/android/server/wm/ForcedSeamlessRotator.java b/services/core/java/com/android/server/wm/ForcedSeamlessRotator.java
index ad745a2..f5e6e72 100644
--- a/services/core/java/com/android/server/wm/ForcedSeamlessRotator.java
+++ b/services/core/java/com/android/server/wm/ForcedSeamlessRotator.java
@@ -21,9 +21,13 @@
import android.graphics.Matrix;
import android.view.DisplayInfo;
+import android.view.Surface.Rotation;
import com.android.server.wm.utils.CoordinateTransforms;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+
/**
* Helper class for forced seamless rotation.
*
@@ -37,8 +41,13 @@
private final Matrix mTransform = new Matrix();
private final float[] mFloat9 = new float[9];
+ private final int mOldRotation;
+ private final int mNewRotation;
public ForcedSeamlessRotator(int oldRotation, int newRotation, DisplayInfo info) {
+ mOldRotation = oldRotation;
+ mNewRotation = newRotation;
+
final boolean flipped = info.rotation == ROTATION_90 || info.rotation == ROTATION_270;
final int h = flipped ? info.logicalWidth : info.logicalHeight;
final int w = flipped ? info.logicalHeight : info.logicalWidth;
@@ -58,6 +67,16 @@
}
/**
+ * Returns the rotation of the display before it started rotating.
+ *
+ * @return the old rotation of the display
+ */
+ @Rotation
+ public int getOldRotation() {
+ return mOldRotation;
+ }
+
+ /**
* Removes the transform to the window token's surface that undoes the effect of the global
* display rotation.
*
@@ -77,4 +96,16 @@
win.getFrameNumber());
}
}
+
+ public void dump(PrintWriter pw) {
+ pw.print("{old="); pw.print(mOldRotation); pw.print(", new="); pw.print(mNewRotation);
+ pw.print("}");
+ }
+
+ @Override
+ public String toString() {
+ StringWriter sw = new StringWriter();
+ dump(new PrintWriter(sw));
+ return "ForcedSeamlessRotator" + sw.toString();
+ }
}
diff --git a/services/core/java/com/android/server/wm/RecentsAnimationController.java b/services/core/java/com/android/server/wm/RecentsAnimationController.java
index 3a0cc28..dea4076 100644
--- a/services/core/java/com/android/server/wm/RecentsAnimationController.java
+++ b/services/core/java/com/android/server/wm/RecentsAnimationController.java
@@ -315,12 +315,9 @@
@VisibleForTesting
AnimationAdapter addAnimation(Task task, boolean isRecentTaskInvisible) {
if (DEBUG_RECENTS_ANIMATIONS) Slog.d(TAG, "addAnimation(" + task.getName() + ")");
- // TODO: Refactor this to use the task's animator
- final SurfaceAnimator anim = new SurfaceAnimator(task, null /* animationFinishedCallback */,
- mService);
final TaskAnimationAdapter taskAdapter = new TaskAnimationAdapter(task,
isRecentTaskInvisible);
- anim.startAnimation(task.getPendingTransaction(), taskAdapter, false /* hidden */);
+ task.startAnimation(task.getPendingTransaction(), taskAdapter, false /* hidden */);
task.commitPendingTransaction();
mPendingAnimations.add(taskAdapter);
return taskAdapter;
@@ -364,6 +361,11 @@
new RemoteAnimationTarget[appAnimations.size()]);
mPendingStart = false;
+ // Perform layout if it was scheduled before to make sure that we get correct content
+ // insets for the target app window after a rotation
+ final DisplayContent displayContent = mService.mRoot.getDisplayContent(mDisplayId);
+ displayContent.performLayout(false /* initial */, false /* updateInputWindows */);
+
final Rect minimizedHomeBounds = mTargetAppToken != null
&& mTargetAppToken.inSplitScreenSecondaryWindowingMode()
? mMinimizedHomeBounds
@@ -372,8 +374,7 @@
&& mTargetAppToken.findMainWindow() != null
? mTargetAppToken.findMainWindow().mContentInsets
: null;
- mRunner.onAnimationStart(mController, appTargets, contentInsets,
- minimizedHomeBounds);
+ mRunner.onAnimationStart(mController, appTargets, contentInsets, minimizedHomeBounds);
if (DEBUG_RECENTS_ANIMATIONS) {
Slog.d(TAG, "startAnimation(): Notify animation start:");
for (int i = 0; i < mPendingAnimations.size(); i++) {
diff --git a/services/core/java/com/android/server/wm/Session.java b/services/core/java/com/android/server/wm/Session.java
index 26ddf2c..5cf5e0d 100644
--- a/services/core/java/com/android/server/wm/Session.java
+++ b/services/core/java/com/android/server/wm/Session.java
@@ -287,7 +287,7 @@
try {
return mService.mPolicy.performHapticFeedbackLw(
mService.windowForClientLocked(this, window, true),
- effectId, always);
+ effectId, always, null);
} finally {
Binder.restoreCallingIdentity(ident);
}
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index d53610b..3acecba 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -1901,6 +1901,7 @@
// TODO(b/111504081): Consolidate seamless rotation logic.
if (win.mPendingForcedSeamlessRotate != null && !mWaitingForConfig) {
win.mPendingForcedSeamlessRotate.finish(win.mToken, win);
+ win.mFinishForcedSeamlessRotateFrameNumber = win.getFrameNumber();
win.mPendingForcedSeamlessRotate = null;
}
@@ -6203,6 +6204,17 @@
}
/**
+ * Returns true if the callingUid has any window currently visible to the user.
+ */
+ public boolean isAnyWindowVisibleForUid(int callingUid) {
+ synchronized (mWindowMap) {
+ return mRoot.forAllWindows(w -> {
+ return w.getOwningUid() == callingUid && w.isVisible();
+ }, true /* traverseTopToBottom */);
+ }
+ }
+
+ /**
* Called when a task has been removed from the recent tasks list.
* <p>
* Note: This doesn't go through {@link TaskWindowContainerController} yet as the window
@@ -6925,10 +6937,8 @@
@Override
public void registerDockedStackListener(IDockedStackListener listener) {
- if (!checkCallingPermission(REGISTER_WINDOW_MANAGER_LISTENERS,
- "registerDockedStackListener()")) {
- return;
- }
+ mAtmInternal.enforceCallerIsRecentsOrHasPermission(REGISTER_WINDOW_MANAGER_LISTENERS,
+ "registerDockedStackListener()");
synchronized (mWindowMap) {
// TODO(multi-display): The listener is registered on the default display only.
getDefaultDisplayContentLocked().mDividerControllerLocked.registerDockedStackListener(
diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java
index 9f394ac..58fb7a0 100644
--- a/services/core/java/com/android/server/wm/WindowState.java
+++ b/services/core/java/com/android/server/wm/WindowState.java
@@ -122,6 +122,7 @@
import static com.android.server.wm.WindowStateProto.CONTENT_INSETS;
import static com.android.server.wm.WindowStateProto.DESTROYING;
import static com.android.server.wm.WindowStateProto.DISPLAY_ID;
+import static com.android.server.wm.WindowStateProto.FINISHED_FORCED_SEAMLESS_ROTATION_FRAME;
import static com.android.server.wm.WindowStateProto.GIVEN_CONTENT_INSETS;
import static com.android.server.wm.WindowStateProto.HAS_SURFACE;
import static com.android.server.wm.WindowStateProto.IDENTIFIER;
@@ -130,6 +131,7 @@
import static com.android.server.wm.WindowStateProto.IS_VISIBLE;
import static com.android.server.wm.WindowStateProto.OUTSETS;
import static com.android.server.wm.WindowStateProto.OVERSCAN_INSETS;
+import static com.android.server.wm.WindowStateProto.PENDING_FORCED_SEAMLESS_ROTATION;
import static com.android.server.wm.WindowStateProto.REMOVED;
import static com.android.server.wm.WindowStateProto.REMOVE_ON_EXIT;
import static com.android.server.wm.WindowStateProto.REQUESTED_HEIGHT;
@@ -281,6 +283,7 @@
*/
final boolean mForceSeamlesslyRotate;
ForcedSeamlessRotator mPendingForcedSeamlessRotate;
+ long mFinishForcedSeamlessRotateFrameNumber;
private RemoteCallbackList<IWindowFocusObserver> mFocusCallbacks;
@@ -631,6 +634,10 @@
void forceSeamlesslyRotateIfAllowed(int oldRotation, int rotation) {
if (mForceSeamlesslyRotate) {
+ if (mPendingForcedSeamlessRotate != null) {
+ oldRotation = mPendingForcedSeamlessRotate.getOldRotation();
+ }
+
mPendingForcedSeamlessRotate = new ForcedSeamlessRotator(
oldRotation, rotation, getDisplayInfo());
mPendingForcedSeamlessRotate.unrotate(this.mToken);
@@ -3294,6 +3301,11 @@
proto.write(REMOVED, mRemoved);
proto.write(IS_ON_SCREEN, isOnScreen());
proto.write(IS_VISIBLE, isVisible());
+ if (mForceSeamlesslyRotate) {
+ proto.write(PENDING_FORCED_SEAMLESS_ROTATION, mPendingForcedSeamlessRotate != null);
+ proto.write(FINISHED_FORCED_SEAMLESS_ROTATION_FRAME,
+ mFinishForcedSeamlessRotateFrameNumber);
+ }
proto.end(token);
}
@@ -3449,6 +3461,16 @@
pw.print(prefix); pw.print("mLastFreezeDuration=");
TimeUtils.formatDuration(mLastFreezeDuration, pw); pw.println();
}
+ if (mForceSeamlesslyRotate) {
+ pw.print(prefix); pw.print("forceSeamlesslyRotate: pending=");
+ if (mPendingForcedSeamlessRotate != null) {
+ mPendingForcedSeamlessRotate.dump(pw);
+ } else {
+ pw.print("null");
+ }
+ pw.print(" finishedFrameNumber="); pw.print(mFinishForcedSeamlessRotateFrameNumber);
+ pw.println();
+ }
if (mHScale != 1 || mVScale != 1) {
pw.print(prefix); pw.print("mHScale="); pw.print(mHScale);
pw.print(" mVScale="); pw.println(mVScale);
diff --git a/services/core/jni/Android.bp b/services/core/jni/Android.bp
index 9e1191d..becde73 100644
--- a/services/core/jni/Android.bp
+++ b/services/core/jni/Android.bp
@@ -59,17 +59,6 @@
"frameworks/native/services",
"system/gatekeeper/include",
],
-
- product_variables: {
- arc: {
- cflags: [
- "-DUSE_ARC",
- ],
- srcs: [
- "com_android_server_ArcVideoService.cpp",
- ],
- }
- }
}
cc_defaults {
@@ -144,7 +133,9 @@
shared_libs: [
"libarcbridge",
"libarcbridgeservice",
- "libarcvideobridge",
+ "libarctimer",
+ "libbase",
+ "libcap",
"libchrome",
"libmojo",
],
diff --git a/services/core/jni/BroadcastRadio/NativeCallbackThread.cpp b/services/core/jni/BroadcastRadio/NativeCallbackThread.cpp
index 81d46f3..777d344 100644
--- a/services/core/jni/BroadcastRadio/NativeCallbackThread.cpp
+++ b/services/core/jni/BroadcastRadio/NativeCallbackThread.cpp
@@ -106,7 +106,7 @@
mQueueCond.notify_one();
}
- if (mThread.get_id() == std::thread::id()) {
+ if (mThread.get_id() == std::this_thread::get_id()) {
// you can't self-join a thread, but it's ok when calling from our sub-task
ALOGD("About to stop native callback thread %p", this);
mThread.detach();
diff --git a/services/core/jni/com_android_server_ArcVideoService.cpp b/services/core/jni/com_android_server_ArcVideoService.cpp
deleted file mode 100644
index f93cd90..0000000
--- a/services/core/jni/com_android_server_ArcVideoService.cpp
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * Copyright 2016, 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.
- */
-
-//#define LOG_NDEBUG 0
-#define LOG_TAG "ArcVideoService"
-
-#include <binder/IPCThreadState.h>
-#include <binder/IServiceManager.h>
-#include <media/arcvideobridge/IArcVideoBridge.h>
-#include <utils/Log.h>
-
-#include <base/bind.h>
-#include <base/bind_helpers.h>
-#include <mojo/edk/embedder/embedder.h>
-#include <mojo/public/cpp/bindings/binding.h>
-
-#include <arc/ArcBridgeSupport.h>
-#include <arc/ArcService.h>
-#include <arc/Future.h>
-#include <arc/IArcBridgeService.h>
-#include <arc/MojoProcessSupport.h>
-#include <components/arc/common/video.mojom.h>
-
-namespace {
-
-// [MinVersion] of OnVideoInstanceReady method in arc_bridge.mojom.
-constexpr int kMinimumArcBridgeHostVersion = 6;
-
-void onCaptureResult(arc::Future<arc::MojoBootstrapResult>* future, uint32_t version,
- mojo::ScopedHandle handle, const std::string& token) {
- mojo::edk::ScopedPlatformHandle scoped_platform_handle;
- MojoResult result =
- mojo::edk::PassWrappedPlatformHandle(handle.release().value(), &scoped_platform_handle);
- if (result != MOJO_RESULT_OK) {
- ALOGE("Received invalid file descriptor.");
- future->set(arc::MojoBootstrapResult());
- return;
- }
-
- base::ScopedFD fd(scoped_platform_handle.release().handle);
- future->set(arc::MojoBootstrapResult(std::move(fd), token, version));
-}
-
-} // namespace
-
-namespace arc {
-
-class VideoService : public mojom::VideoInstance,
- public ArcService,
- public android::BnArcVideoBridge {
-public:
- explicit VideoService(MojoProcessSupport* mojoProcessSupport)
- : mMojoProcessSupport(mojoProcessSupport), mBinding(this) {
- mMojoProcessSupport->arc_bridge_support().requestArcBridgeProxyAsync(
- this, kMinimumArcBridgeHostVersion);
- }
-
- ~VideoService() override { mMojoProcessSupport->disconnect(&mBinding, &mHostPtr); }
-
- // VideoInstance overrides:
- void InitDeprecated(mojom::VideoHostPtr hostPtr) override {
- Init(std::move(hostPtr), base::Bind(&base::DoNothing));
- }
-
- void Init(mojom::VideoHostPtr hostPtr, const InitCallback& callback) override {
- ALOGV("Init");
- mHostPtr = std::move(hostPtr);
- // A method must be called while we are still in a Mojo thread so the
- // proxy can perform lazy initialization and be able to be called from
- // non-Mojo threads later.
- // This also caches the version number so it can be obtained by calling
- // .version().
- mHostPtr.QueryVersion(base::Bind(
- [](const InitCallback& callback, uint32_t version) {
- ALOGI("VideoService ready (version=%d)", version);
- callback.Run();
- },
- callback));
- ALOGV("Init done");
- }
-
- // ArcService overrides:
- void ready(mojom::ArcBridgeHostPtr* bridgeHost) override {
- (*bridgeHost)->OnVideoInstanceReady(mBinding.CreateInterfacePtrAndBind());
- }
-
- void versionMismatch(uint32_t version) override {
- ALOGE("ArcBridgeHost version %d, does not support video (version %d)\n", version,
- kMinimumArcBridgeHostVersion);
- }
-
- // BnArcVideoBridge overrides:
- MojoBootstrapResult bootstrapVideoAcceleratorFactory() override {
- ALOGV("VideoService::bootstrapVideoAcceleratorFactory");
-
- Future<MojoBootstrapResult> future;
- mMojoProcessSupport->mojo_thread().getTaskRunner()->PostTask(
- FROM_HERE, base::Bind(&VideoService::bootstrapVideoAcceleratorFactoryOnMojoThread,
- base::Unretained(this), &future));
- return future.get();
- }
-
- int32_t hostVersion() override {
- ALOGV("VideoService::hostVersion");
- return mHostPtr.version();
- }
-
-private:
- void bootstrapVideoAcceleratorFactoryOnMojoThread(Future<MojoBootstrapResult>* future) {
- if (!mHostPtr) {
- ALOGE("mHostPtr is not ready yet");
- future->set(MojoBootstrapResult());
- return;
- }
- mHostPtr->OnBootstrapVideoAcceleratorFactory(
- base::Bind(&onCaptureResult, base::Unretained(future), mHostPtr.version()));
- }
-
- // Outlives VideoService.
- MojoProcessSupport* const mMojoProcessSupport;
- mojo::Binding<mojom::VideoInstance> mBinding;
- mojom::VideoHostPtr mHostPtr;
-};
-
-} // namespace arc
-
-namespace android {
-
-int register_android_server_ArcVideoService() {
- defaultServiceManager()->addService(
- String16("android.os.IArcVideoBridge"),
- new arc::VideoService(arc::MojoProcessSupport::getLeakyInstance()));
- return 0;
-}
-
-} // namespace android
diff --git a/services/core/jni/onload.cpp b/services/core/jni/onload.cpp
index 0ebef37..bb6e684 100644
--- a/services/core/jni/onload.cpp
+++ b/services/core/jni/onload.cpp
@@ -54,9 +54,6 @@
int register_android_server_GraphicsStatsService(JNIEnv* env);
int register_android_hardware_display_DisplayViewport(JNIEnv* env);
int register_android_server_net_NetworkStatsService(JNIEnv* env);
-#ifdef USE_ARC
-int register_android_server_ArcVideoService();
-#endif
};
using namespace android;
@@ -104,8 +101,5 @@
register_android_server_GraphicsStatsService(env);
register_android_hardware_display_DisplayViewport(env);
register_android_server_net_NetworkStatsService(env);
-#ifdef USE_ARC
- register_android_server_ArcVideoService();
-#endif
return JNI_VERSION_1_4;
}
diff --git a/services/net/OWNERS b/services/net/OWNERS
index ce50558..7311eee 100644
--- a/services/net/OWNERS
+++ b/services/net/OWNERS
@@ -1,6 +1,8 @@
set noparent
+codewiz@google.com
ek@google.com
jchalard@google.com
lorenzo@google.com
+reminv@google.com
satk@google.com
diff --git a/services/robotests/src/com/android/server/backup/BackupManagerServiceTest.java b/services/robotests/src/com/android/server/backup/BackupManagerServiceTest.java
index ea9967b..2e0ae02 100644
--- a/services/robotests/src/com/android/server/backup/BackupManagerServiceTest.java
+++ b/services/robotests/src/com/android/server/backup/BackupManagerServiceTest.java
@@ -45,7 +45,7 @@
import android.os.PowerSaveState;
import android.platform.test.annotations.Presubmit;
import android.provider.Settings;
-import com.android.server.backup.internal.BackupRequest;
+import com.android.server.backup.keyvalue.BackupRequest;
import com.android.server.backup.testing.BackupManagerServiceTestUtils;
import com.android.server.backup.testing.TransportData;
import com.android.server.backup.testing.TransportTestUtils.TransportMock;
diff --git a/services/robotests/src/com/android/server/backup/KeyValueBackupTaskTest.java b/services/robotests/src/com/android/server/backup/keyvalue/KeyValueBackupTaskTest.java
similarity index 98%
rename from services/robotests/src/com/android/server/backup/KeyValueBackupTaskTest.java
rename to services/robotests/src/com/android/server/backup/keyvalue/KeyValueBackupTaskTest.java
index 56f5f15..de22201 100644
--- a/services/robotests/src/com/android/server/backup/KeyValueBackupTaskTest.java
+++ b/services/robotests/src/com/android/server/backup/keyvalue/KeyValueBackupTaskTest.java
@@ -14,7 +14,7 @@
* limitations under the License
*/
-package com.android.server.backup;
+package com.android.server.backup.keyvalue;
import static android.app.backup.BackupManager.ERROR_AGENT_FAILURE;
import static android.app.backup.BackupManager.ERROR_BACKUP_NOT_ALLOWED;
@@ -25,9 +25,12 @@
import static android.app.backup.ForwardingBackupAgent.forward;
import static com.android.server.backup.testing.BackupManagerServiceTestUtils.createBackupWakeLock;
-import static com.android.server.backup.testing.BackupManagerServiceTestUtils.createInitializedBackupManagerService;
-import static com.android.server.backup.testing.BackupManagerServiceTestUtils.setUpBackupManagerServiceBasics;
-import static com.android.server.backup.testing.BackupManagerServiceTestUtils.setUpBinderCallerAndApplicationAsSystem;
+import static com.android.server.backup.testing.BackupManagerServiceTestUtils
+ .createInitializedBackupManagerService;
+import static com.android.server.backup.testing.BackupManagerServiceTestUtils
+ .setUpBackupManagerServiceBasics;
+import static com.android.server.backup.testing.BackupManagerServiceTestUtils
+ .setUpBinderCallerAndApplicationAsSystem;
import static com.android.server.backup.testing.PackageData.PM_PACKAGE;
import static com.android.server.backup.testing.PackageData.fullBackupPackage;
import static com.android.server.backup.testing.PackageData.keyValuePackage;
@@ -90,10 +93,14 @@
import com.android.internal.backup.IBackupTransport;
import com.android.server.EventLogTags;
+import com.android.server.backup.BackupManagerService;
+import com.android.server.backup.BackupRestoreTask;
+import com.android.server.backup.DataChangedJournal;
+import com.android.server.backup.KeyValueBackupJob;
+import com.android.server.backup.PackageManagerBackupAgent;
+import com.android.server.backup.TransportManager;
import com.android.server.backup.internal.BackupHandler;
-import com.android.server.backup.internal.BackupRequest;
import com.android.server.backup.internal.OnTaskFinishedListener;
-import com.android.server.backup.internal.KeyValueBackupTask;
import com.android.server.backup.testing.PackageData;
import com.android.server.backup.testing.TransportData;
import com.android.server.backup.testing.TransportTestUtils;
@@ -1577,6 +1584,17 @@
new RuntimeException().toString());
}
+ @Test
+ public void testRunTask_whenBackupRunning_doesNotThrow() throws Exception {
+ TransportMock transportMock = setUpInitializedTransport(mTransport);
+ when(mBackupManagerService.isBackupOperationInProgress()).thenReturn(true);
+ KeyValueBackupTask task =
+ createKeyValueBackupTask(
+ transportMock.transportClient, mTransport.transportDirName);
+
+ runTask(task);
+ }
+
private void runTask(KeyValueBackupTask task) {
// Pretend we are not on the main-thread to prevent RemoteCall from complaining
mShadowMainLooper.setCurrentThread(false);
@@ -1795,10 +1813,10 @@
* <li>The transport being initialized with {@link IBackupTransport#initializeDevice()}
* <li>{@link BackupManagerService#resetBackupState(File)} being called, which will:
* <ul>
- * <li>Call {@link ProcessedPackagesJournal#reset()}
- * <li>Reset current token to 0
- * <li>Delete state files
- * <li>Mark data changed for every key-value participant
+ * <li>Reset processed packages journal.
+ * <li>Reset current token to 0.
+ * <li>Delete state files.
+ * <li>Mark data changed for every key-value participant.
* </ul>
* </ul>
*/
diff --git a/services/robotests/src/com/android/server/testing/shadows/ShadowKeyValueBackupTask.java b/services/robotests/src/com/android/server/testing/shadows/ShadowKeyValueBackupTask.java
index f22cdb8..838902d 100644
--- a/services/robotests/src/com/android/server/testing/shadows/ShadowKeyValueBackupTask.java
+++ b/services/robotests/src/com/android/server/testing/shadows/ShadowKeyValueBackupTask.java
@@ -22,15 +22,14 @@
import com.android.server.backup.BackupManagerService;
import com.android.server.backup.DataChangedJournal;
-import com.android.server.backup.internal.BackupRequest;
import com.android.server.backup.internal.OnTaskFinishedListener;
-import com.android.server.backup.internal.KeyValueBackupTask;
+import com.android.server.backup.keyvalue.BackupRequest;
+import com.android.server.backup.keyvalue.KeyValueBackupTask;
import com.android.server.backup.transport.TransportClient;
import org.robolectric.annotation.Implementation;
import org.robolectric.annotation.Implements;
-import java.util.ArrayList;
import java.util.List;
@Implements(KeyValueBackupTask.class)
diff --git a/services/tests/servicestests/src/com/android/server/am/ActivityStarterTests.java b/services/tests/servicestests/src/com/android/server/am/ActivityStarterTests.java
index 409a2a8..90607ad 100644
--- a/services/tests/servicestests/src/com/android/server/am/ActivityStarterTests.java
+++ b/services/tests/servicestests/src/com/android/server/am/ActivityStarterTests.java
@@ -54,6 +54,7 @@
import org.junit.runner.RunWith;
import org.junit.Test;
+import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;
import static android.content.Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED;
import static com.android.server.am.ActivityManagerService.ANIMATE;
import static com.android.server.am.ActivityStack.REMOVE_TASK_MODE_DESTROYING;
@@ -64,11 +65,13 @@
import static org.mockito.Mockito.anyBoolean;
import static org.mockito.Mockito.anyInt;
import static org.mockito.Mockito.anyObject;
+import static org.mockito.Mockito.clearInvocations;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.eq;
import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.times;
@@ -92,6 +95,7 @@
private ActivityTaskManagerService mService;
private ActivityStarter mStarter;
private ActivityStartController mController;
+ private ActivityMetricsLogger mActivityMetricsLogger;
private static final int PRECONDITION_NO_CALLER_APP = 1;
private static final int PRECONDITION_NO_INTENT_COMPONENT = 1 << 1;
@@ -105,11 +109,17 @@
private static final int PRECONDITION_CANNOT_START_ANY_ACTIVITY = 1 << 9;
private static final int PRECONDITION_DISALLOW_APP_SWITCHING = 1 << 10;
+ private static final int FAKE_CALLING_UID = 666;
+ private static final int FAKE_REAL_CALLING_UID = 667;
+ private static final String FAKE_CALLING_PACKAGE = "com.whatever.dude";
+
@Override
public void setUp() throws Exception {
super.setUp();
mService = createActivityTaskManagerService();
mController = mock(ActivityStartController.class);
+ mActivityMetricsLogger = mock(ActivityMetricsLogger.class);
+ clearInvocations(mActivityMetricsLogger);
mStarter = new ActivityStarter(mController, mService, mService.mStackSupervisor,
mock(ActivityStartInterceptor.class));
}
@@ -480,4 +490,46 @@
assertTrue(stack.getAllTasks().isEmpty());
}
}
+
+ /**
+ * This test ensures that activity starts are not being logged when the logging is disabled.
+ */
+ @Test
+ public void testActivityStartsLogging_noLoggingWhenDisabled() {
+ doReturn(false).when(mService.mAm).isActivityStartsLoggingEnabled();
+ doReturn(mActivityMetricsLogger).when(mService.mStackSupervisor).getActivityMetricsLogger();
+
+ ActivityStarter starter = prepareStarter(FLAG_ACTIVITY_NEW_TASK);
+ starter.setReason("testActivityStartsLogging_noLoggingWhenDisabled").execute();
+
+ // verify logging wasn't done
+ verify(mActivityMetricsLogger, never()).logActivityStart(any(), any(), any(), anyInt(),
+ any(), anyInt(), anyBoolean(), anyInt(), anyInt(), anyBoolean(), anyInt(), any(),
+ anyInt(), anyBoolean(), any(), anyBoolean());
+ }
+
+ /**
+ * This test ensures that activity starts are being logged when the logging is enabled.
+ */
+ @Test
+ public void testActivityStartsLogging_logsWhenEnabled() {
+ // note: conveniently this package doesn't have any activity visible
+ doReturn(true).when(mService.mAm).isActivityStartsLoggingEnabled();
+ doReturn(mActivityMetricsLogger).when(mService.mStackSupervisor).getActivityMetricsLogger();
+
+ ActivityStarter starter = prepareStarter(FLAG_ACTIVITY_NEW_TASK)
+ .setCallingUid(FAKE_CALLING_UID)
+ .setRealCallingUid(FAKE_REAL_CALLING_UID)
+ .setCallingPackage(FAKE_CALLING_PACKAGE)
+ .setOriginatingPendingIntent(null);
+
+ starter.setReason("testActivityStartsLogging_logsWhenEnabled").execute();
+
+ // verify the above activity start was logged
+ verify(mActivityMetricsLogger, times(1)).logActivityStart(any(), any(), any(),
+ eq(FAKE_CALLING_UID), eq(FAKE_CALLING_PACKAGE), anyInt(), anyBoolean(),
+ eq(FAKE_REAL_CALLING_UID), anyInt(), anyBoolean(), anyInt(),
+ eq(ActivityBuilder.getDefaultComponent().getPackageName()), anyInt(), anyBoolean(),
+ any(), eq(false));
+ }
}
diff --git a/services/tests/servicestests/src/com/android/server/wm/TestWindowManagerPolicy.java b/services/tests/servicestests/src/com/android/server/wm/TestWindowManagerPolicy.java
index 735e284..5fb8997 100644
--- a/services/tests/servicestests/src/com/android/server/wm/TestWindowManagerPolicy.java
+++ b/services/tests/servicestests/src/com/android/server/wm/TestWindowManagerPolicy.java
@@ -417,7 +417,7 @@
@Override
public boolean performHapticFeedbackLw(WindowState win, int effectId,
- boolean always) {
+ boolean always, String reason) {
return false;
}
diff --git a/services/tests/uiservicestests/src/com/android/server/notification/BuzzBeepBlinkTest.java b/services/tests/uiservicestests/src/com/android/server/notification/BuzzBeepBlinkTest.java
index dbba2b2..7abf49e 100644
--- a/services/tests/uiservicestests/src/com/android/server/notification/BuzzBeepBlinkTest.java
+++ b/services/tests/uiservicestests/src/com/android/server/notification/BuzzBeepBlinkTest.java
@@ -364,22 +364,23 @@
private void verifyNeverVibrate() {
verify(mVibrator, never()).vibrate(anyInt(), anyString(), (VibrationEffect) anyObject(),
- (AudioAttributes) anyObject());
+ anyString(), (AudioAttributes) anyObject());
}
private void verifyVibrate() {
verify(mVibrator, times(1)).vibrate(anyInt(), anyString(), argThat(mVibrateOnceMatcher),
- (AudioAttributes) anyObject());
+ anyString(), (AudioAttributes) anyObject());
}
private void verifyVibrateLooped() {
verify(mVibrator, times(1)).vibrate(anyInt(), anyString(), argThat(mVibrateLoopMatcher),
- (AudioAttributes) anyObject());
+ anyString(), (AudioAttributes) anyObject());
}
private void verifyDelayedVibrateLooped() {
verify(mVibrator, timeout(MAX_VIBRATION_DELAY).times(1)).vibrate(anyInt(), anyString(),
- argThat(mVibrateLoopMatcher), (AudioAttributes) anyObject());
+ argThat(mVibrateLoopMatcher), anyString(),
+ (AudioAttributes) anyObject());
}
private void verifyStopVibrate() {
@@ -646,7 +647,8 @@
VibrationEffect effect = VibrationEffect.createWaveform(r.getVibration(), -1);
verify(mVibrator, timeout(MAX_VIBRATION_DELAY).times(1)).vibrate(anyInt(), anyString(),
- eq(effect), (AudioAttributes) anyObject());
+ eq(effect), anyString(),
+ (AudioAttributes) anyObject());
assertTrue(r.isInterruptive());
}
@@ -680,7 +682,7 @@
mService.buzzBeepBlinkLocked(r);
verify(mVibrator, timeout(MAX_VIBRATION_DELAY).times(1)).vibrate(anyInt(), anyString(),
- eq(FALLBACK_VIBRATION), (AudioAttributes) anyObject());
+ eq(FALLBACK_VIBRATION), anyString(), (AudioAttributes) anyObject());
verify(mRingtonePlayer, never()).playAsync
(anyObject(), anyObject(), anyBoolean(), anyObject());
assertTrue(r.isInterruptive());
diff --git a/services/usage/java/com/android/server/usage/AppStandbyController.java b/services/usage/java/com/android/server/usage/AppStandbyController.java
index 9c62700..77cb749 100644
--- a/services/usage/java/com/android/server/usage/AppStandbyController.java
+++ b/services/usage/java/com/android/server/usage/AppStandbyController.java
@@ -1452,6 +1452,23 @@
TimeUtils.formatDuration(mAppIdleParoleDurationMillis, pw);
pw.println();
+ pw.print(" mStrongUsageTimeoutMillis=");
+ TimeUtils.formatDuration(mStrongUsageTimeoutMillis, pw);
+ pw.println();
+ pw.print(" mNotificationSeenTimeoutMillis=");
+ TimeUtils.formatDuration(mNotificationSeenTimeoutMillis, pw);
+ pw.println();
+ pw.print(" mSyncAdapterTimeoutMillis=");
+ TimeUtils.formatDuration(mSyncAdapterTimeoutMillis, pw);
+ pw.println();
+ pw.print(" mSystemInteractionTimeoutMillis=");
+ TimeUtils.formatDuration(mSystemInteractionTimeoutMillis, pw);
+ pw.println();
+
+ pw.print(" mPredictionTimeoutMillis=");
+ TimeUtils.formatDuration(mPredictionTimeoutMillis, pw);
+ pw.println();
+
pw.print(" mExemptedSyncScheduledNonDozeTimeoutMillis=");
TimeUtils.formatDuration(mExemptedSyncScheduledNonDozeTimeoutMillis, pw);
pw.println();
@@ -1462,6 +1479,14 @@
TimeUtils.formatDuration(mExemptedSyncStartTimeoutMillis, pw);
pw.println();
+ pw.print(" mSystemUpdateUsageTimeoutMillis=");
+ TimeUtils.formatDuration(mSystemUpdateUsageTimeoutMillis, pw);
+ pw.println();
+
+ pw.print(" mStableChargingThresholdMillis=");
+ TimeUtils.formatDuration(mStableChargingThresholdMillis, pw);
+ pw.println();
+
pw.println();
pw.print("mAppIdleEnabled="); pw.print(mAppIdleEnabled);
pw.print(" mAppIdleTempParoled="); pw.print(mAppIdleTempParoled);
@@ -1910,4 +1935,3 @@
}
}
}
-
diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java
index 1dfe5df..ab94093 100644
--- a/telephony/java/android/telephony/CarrierConfigManager.java
+++ b/telephony/java/android/telephony/CarrierConfigManager.java
@@ -224,6 +224,13 @@
public static final String
KEY_ALLOW_EMERGENCY_NUMBERS_IN_CALL_LOG_BOOL = "allow_emergency_numbers_in_call_log_bool";
+ /**
+ * A string array containing numbers that shouldn't be included in the call log.
+ * @hide
+ */
+ public static final String KEY_UNLOGGABLE_NUMBERS_STRING_ARRAY =
+ "unloggable_numbers_string_array";
+
/** If true, removes the Voice Privacy option from Call Settings */
public static final String KEY_VOICE_PRIVACY_DISABLE_UI_BOOL = "voice_privacy_disable_ui_bool";
@@ -2041,6 +2048,7 @@
sDefaults.putBoolean(KEY_AUTO_RETRY_FAILED_WIFI_EMERGENCY_CALL, false);
sDefaults.putBoolean(KEY_ADDITIONAL_CALL_SETTING_BOOL, true);
sDefaults.putBoolean(KEY_ALLOW_EMERGENCY_NUMBERS_IN_CALL_LOG_BOOL, false);
+ sDefaults.putStringArray(KEY_UNLOGGABLE_NUMBERS_STRING_ARRAY, null);
sDefaults.putBoolean(KEY_ALLOW_LOCAL_DTMF_TONES_BOOL, true);
sDefaults.putBoolean(KEY_PLAY_CALL_RECORDING_TONE_BOOL, false);
sDefaults.putBoolean(KEY_APN_EXPAND_BOOL, true);
diff --git a/telephony/java/android/telephony/SubscriptionManager.java b/telephony/java/android/telephony/SubscriptionManager.java
index 17e7c49..8aa5bf6 100644
--- a/telephony/java/android/telephony/SubscriptionManager.java
+++ b/telephony/java/android/telephony/SubscriptionManager.java
@@ -301,7 +301,7 @@
* <P>Type: TEXT (String)</P>
* @hide
*/
- public static final String CARD_ID = "card_id";
+ public static final String CARD_ID = "card_id";
/**
* TelephonyProvider column name for the encoded {@link UiccAccessRule}s from
@@ -1051,24 +1051,9 @@
*/
public int setIconTint(int tint, int subId) {
if (VDBG) logd("[setIconTint]+ tint:" + tint + " subId:" + subId);
- if (!isValidSubscriptionId(subId)) {
- logd("[setIconTint]- fail");
- return -1;
- }
-
- int result = 0;
-
- try {
- ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
- if (iSub != null) {
- result = iSub.setIconTint(tint, subId);
- }
- } catch (RemoteException ex) {
- // ignore it
- }
-
- return result;
-
+ return setSubscriptionPropertyHelper(subId, "setIconTint",
+ (iSub)-> iSub.setIconTint(tint, subId)
+ );
}
/**
@@ -1096,24 +1081,9 @@
logd("[setDisplayName]+ displayName:" + displayName + " subId:" + subId
+ " nameSource:" + nameSource);
}
- if (!isValidSubscriptionId(subId)) {
- logd("[setDisplayName]- fail");
- return -1;
- }
-
- int result = 0;
-
- try {
- ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
- if (iSub != null) {
- result = iSub.setDisplayNameUsingSrc(displayName, subId, nameSource);
- }
- } catch (RemoteException ex) {
- // ignore it
- }
-
- return result;
-
+ return setSubscriptionPropertyHelper(subId, "setDisplayName",
+ (iSub)-> iSub.setDisplayNameUsingSrc(displayName, subId, nameSource)
+ );
}
/**
@@ -1124,24 +1094,13 @@
* @hide
*/
public int setDisplayNumber(String number, int subId) {
- if (number == null || !isValidSubscriptionId(subId)) {
+ if (number == null) {
logd("[setDisplayNumber]- fail");
return -1;
}
-
- int result = 0;
-
- try {
- ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
- if (iSub != null) {
- result = iSub.setDisplayNumber(number, subId);
- }
- } catch (RemoteException ex) {
- // ignore it
- }
-
- return result;
-
+ return setSubscriptionPropertyHelper(subId, "setDisplayNumber",
+ (iSub)-> iSub.setDisplayNumber(number, subId)
+ );
}
/**
@@ -1153,23 +1112,9 @@
*/
public int setDataRoaming(int roaming, int subId) {
if (VDBG) logd("[setDataRoaming]+ roaming:" + roaming + " subId:" + subId);
- if (roaming < 0 || !isValidSubscriptionId(subId)) {
- logd("[setDataRoaming]- fail");
- return -1;
- }
-
- int result = 0;
-
- try {
- ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
- if (iSub != null) {
- result = iSub.setDataRoaming(roaming, subId);
- }
- } catch (RemoteException ex) {
- // ignore it
- }
-
- return result;
+ return setSubscriptionPropertyHelper(subId, "setDataRoaming",
+ (iSub)->iSub.setDataRoaming(roaming, subId)
+ );
}
/**
@@ -1994,4 +1939,29 @@
}
return false;
}
+
+ private interface CallISubMethodHelper {
+ int callMethod(ISub iSub) throws RemoteException;
+ }
+
+ private int setSubscriptionPropertyHelper(int subId, String methodName,
+ CallISubMethodHelper helper) {
+ if (!isValidSubscriptionId(subId)) {
+ logd("[" + methodName + "]" + "- fail");
+ return -1;
+ }
+
+ int result = 0;
+
+ try {
+ ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
+ if (iSub != null) {
+ result = helper.callMethod(iSub);
+ }
+ } catch (RemoteException ex) {
+ // ignore it
+ }
+
+ return result;
+ }
}
diff --git a/tests/net/OWNERS b/tests/net/OWNERS
index ce50558..7311eee 100644
--- a/tests/net/OWNERS
+++ b/tests/net/OWNERS
@@ -1,6 +1,8 @@
set noparent
+codewiz@google.com
ek@google.com
jchalard@google.com
lorenzo@google.com
+reminv@google.com
satk@google.com
diff --git a/tests/net/java/android/net/NetworkUtilsTest.java b/tests/net/java/android/net/NetworkUtilsTest.java
index a5ee8e3..2b172da 100644
--- a/tests/net/java/android/net/NetworkUtilsTest.java
+++ b/tests/net/java/android/net/NetworkUtilsTest.java
@@ -16,17 +16,32 @@
package android.net;
-import android.net.NetworkUtils;
-import android.test.suitebuilder.annotation.SmallTest;
+import static android.net.NetworkUtils.getImplicitNetmask;
+import static android.net.NetworkUtils.inet4AddressToIntHTH;
+import static android.net.NetworkUtils.inet4AddressToIntHTL;
+import static android.net.NetworkUtils.intToInet4AddressHTH;
+import static android.net.NetworkUtils.intToInet4AddressHTL;
+import static android.net.NetworkUtils.netmaskToPrefixLength;
+import static android.net.NetworkUtils.prefixLengthToV4NetmaskIntHTH;
+import static android.net.NetworkUtils.prefixLengthToV4NetmaskIntHTL;
+
+import static junit.framework.Assert.assertEquals;
+
+import static org.junit.Assert.fail;
+
+import android.support.test.runner.AndroidJUnit4;
import java.math.BigInteger;
import java.net.Inet4Address;
import java.net.InetAddress;
import java.util.TreeSet;
-import junit.framework.TestCase;
+import org.junit.Test;
+import org.junit.runner.RunWith;
-public class NetworkUtilsTest extends TestCase {
+@RunWith(AndroidJUnit4.class)
+@android.support.test.filters.SmallTest
+public class NetworkUtilsTest {
private InetAddress Address(String addr) {
return InetAddress.parseNumericAddress(addr);
@@ -36,41 +51,126 @@
return (Inet4Address) Address(addr);
}
- @SmallTest
+ @Test
public void testGetImplicitNetmask() {
- assertEquals(8, NetworkUtils.getImplicitNetmask(IPv4Address("4.2.2.2")));
- assertEquals(8, NetworkUtils.getImplicitNetmask(IPv4Address("10.5.6.7")));
- assertEquals(16, NetworkUtils.getImplicitNetmask(IPv4Address("173.194.72.105")));
- assertEquals(16, NetworkUtils.getImplicitNetmask(IPv4Address("172.23.68.145")));
- assertEquals(24, NetworkUtils.getImplicitNetmask(IPv4Address("192.0.2.1")));
- assertEquals(24, NetworkUtils.getImplicitNetmask(IPv4Address("192.168.5.1")));
- assertEquals(32, NetworkUtils.getImplicitNetmask(IPv4Address("224.0.0.1")));
- assertEquals(32, NetworkUtils.getImplicitNetmask(IPv4Address("255.6.7.8")));
+ assertEquals(8, getImplicitNetmask(IPv4Address("4.2.2.2")));
+ assertEquals(8, getImplicitNetmask(IPv4Address("10.5.6.7")));
+ assertEquals(16, getImplicitNetmask(IPv4Address("173.194.72.105")));
+ assertEquals(16, getImplicitNetmask(IPv4Address("172.23.68.145")));
+ assertEquals(24, getImplicitNetmask(IPv4Address("192.0.2.1")));
+ assertEquals(24, getImplicitNetmask(IPv4Address("192.168.5.1")));
+ assertEquals(32, getImplicitNetmask(IPv4Address("224.0.0.1")));
+ assertEquals(32, getImplicitNetmask(IPv4Address("255.6.7.8")));
}
private void assertInvalidNetworkMask(Inet4Address addr) {
try {
- NetworkUtils.netmaskToPrefixLength(addr);
+ netmaskToPrefixLength(addr);
fail("Invalid netmask " + addr.getHostAddress() + " did not cause exception");
} catch (IllegalArgumentException expected) {
}
}
- @SmallTest
+ @Test
+ public void testInet4AddressToIntHTL() {
+ assertEquals(0, inet4AddressToIntHTL(IPv4Address("0.0.0.0")));
+ assertEquals(0x000080ff, inet4AddressToIntHTL(IPv4Address("255.128.0.0")));
+ assertEquals(0x0080ff0a, inet4AddressToIntHTL(IPv4Address("10.255.128.0")));
+ assertEquals(0x00feff0a, inet4AddressToIntHTL(IPv4Address("10.255.254.0")));
+ assertEquals(0xfeffa8c0, inet4AddressToIntHTL(IPv4Address("192.168.255.254")));
+ assertEquals(0xffffa8c0, inet4AddressToIntHTL(IPv4Address("192.168.255.255")));
+ }
+
+ @Test
+ public void testIntToInet4AddressHTL() {
+ assertEquals(IPv4Address("0.0.0.0"), intToInet4AddressHTL(0));
+ assertEquals(IPv4Address("255.128.0.0"), intToInet4AddressHTL(0x000080ff));
+ assertEquals(IPv4Address("10.255.128.0"), intToInet4AddressHTL(0x0080ff0a));
+ assertEquals(IPv4Address("10.255.254.0"), intToInet4AddressHTL(0x00feff0a));
+ assertEquals(IPv4Address("192.168.255.254"), intToInet4AddressHTL(0xfeffa8c0));
+ assertEquals(IPv4Address("192.168.255.255"), intToInet4AddressHTL(0xffffa8c0));
+ }
+
+ @Test
+ public void testInet4AddressToIntHTH() {
+ assertEquals(0, inet4AddressToIntHTH(IPv4Address("0.0.0.0")));
+ assertEquals(0xff800000, inet4AddressToIntHTH(IPv4Address("255.128.0.0")));
+ assertEquals(0x0aff8000, inet4AddressToIntHTH(IPv4Address("10.255.128.0")));
+ assertEquals(0x0afffe00, inet4AddressToIntHTH(IPv4Address("10.255.254.0")));
+ assertEquals(0xc0a8fffe, inet4AddressToIntHTH(IPv4Address("192.168.255.254")));
+ assertEquals(0xc0a8ffff, inet4AddressToIntHTH(IPv4Address("192.168.255.255")));
+ }
+
+ @Test
+ public void testIntToInet4AddressHTH() {
+ assertEquals(IPv4Address("0.0.0.0"), intToInet4AddressHTH(0));
+ assertEquals(IPv4Address("255.128.0.0"), intToInet4AddressHTH(0xff800000));
+ assertEquals(IPv4Address("10.255.128.0"), intToInet4AddressHTH(0x0aff8000));
+ assertEquals(IPv4Address("10.255.254.0"), intToInet4AddressHTH(0x0afffe00));
+ assertEquals(IPv4Address("192.168.255.254"), intToInet4AddressHTH(0xc0a8fffe));
+ assertEquals(IPv4Address("192.168.255.255"), intToInet4AddressHTH(0xc0a8ffff));
+ }
+
+ @Test
public void testNetmaskToPrefixLength() {
- assertEquals(0, NetworkUtils.netmaskToPrefixLength(IPv4Address("0.0.0.0")));
- assertEquals(9, NetworkUtils.netmaskToPrefixLength(IPv4Address("255.128.0.0")));
- assertEquals(17, NetworkUtils.netmaskToPrefixLength(IPv4Address("255.255.128.0")));
- assertEquals(23, NetworkUtils.netmaskToPrefixLength(IPv4Address("255.255.254.0")));
- assertEquals(31, NetworkUtils.netmaskToPrefixLength(IPv4Address("255.255.255.254")));
- assertEquals(32, NetworkUtils.netmaskToPrefixLength(IPv4Address("255.255.255.255")));
+ assertEquals(0, netmaskToPrefixLength(IPv4Address("0.0.0.0")));
+ assertEquals(9, netmaskToPrefixLength(IPv4Address("255.128.0.0")));
+ assertEquals(17, netmaskToPrefixLength(IPv4Address("255.255.128.0")));
+ assertEquals(23, netmaskToPrefixLength(IPv4Address("255.255.254.0")));
+ assertEquals(31, netmaskToPrefixLength(IPv4Address("255.255.255.254")));
+ assertEquals(32, netmaskToPrefixLength(IPv4Address("255.255.255.255")));
assertInvalidNetworkMask(IPv4Address("0.0.0.1"));
assertInvalidNetworkMask(IPv4Address("255.255.255.253"));
assertInvalidNetworkMask(IPv4Address("255.255.0.255"));
}
- @SmallTest
+
+ @Test
+ public void testPrefixLengthToV4NetmaskIntHTL() {
+ assertEquals(0, prefixLengthToV4NetmaskIntHTL(0));
+ assertEquals(0x000080ff /* 255.128.0.0 */, prefixLengthToV4NetmaskIntHTL(9));
+ assertEquals(0x0080ffff /* 255.255.128.0 */, prefixLengthToV4NetmaskIntHTL(17));
+ assertEquals(0x00feffff /* 255.255.254.0 */, prefixLengthToV4NetmaskIntHTL(23));
+ assertEquals(0xfeffffff /* 255.255.255.254 */, prefixLengthToV4NetmaskIntHTL(31));
+ assertEquals(0xffffffff /* 255.255.255.255 */, prefixLengthToV4NetmaskIntHTL(32));
+ }
+
+ @Test
+ public void testPrefixLengthToV4NetmaskIntHTH() {
+ assertEquals(0, prefixLengthToV4NetmaskIntHTH(0));
+ assertEquals(0xff800000 /* 255.128.0.0 */, prefixLengthToV4NetmaskIntHTH(9));
+ assertEquals(0xffff8000 /* 255.255.128.0 */, prefixLengthToV4NetmaskIntHTH(17));
+ assertEquals(0xfffffe00 /* 255.255.254.0 */, prefixLengthToV4NetmaskIntHTH(23));
+ assertEquals(0xfffffffe /* 255.255.255.254 */, prefixLengthToV4NetmaskIntHTH(31));
+ assertEquals(0xffffffff /* 255.255.255.255 */, prefixLengthToV4NetmaskIntHTH(32));
+ }
+
+ @Test(expected = IllegalArgumentException.class)
+ public void testPrefixLengthToV4NetmaskIntHTH_NegativeLength() {
+ prefixLengthToV4NetmaskIntHTH(-1);
+ }
+
+ @Test(expected = IllegalArgumentException.class)
+ public void testPrefixLengthToV4NetmaskIntHTH_LengthTooLarge() {
+ prefixLengthToV4NetmaskIntHTH(33);
+ }
+
+ private void checkAddressMasking(String expectedAddr, String addr, int prefixLength) {
+ final int prefix = prefixLengthToV4NetmaskIntHTH(prefixLength);
+ final int addrInt = inet4AddressToIntHTH(IPv4Address(addr));
+ assertEquals(IPv4Address(expectedAddr), intToInet4AddressHTH(prefix & addrInt));
+ }
+
+ @Test
+ public void testPrefixLengthToV4NetmaskIntHTH_MaskAddr() {
+ checkAddressMasking("192.168.0.0", "192.168.128.1", 16);
+ checkAddressMasking("255.240.0.0", "255.255.255.255", 12);
+ checkAddressMasking("255.255.255.255", "255.255.255.255", 32);
+ checkAddressMasking("0.0.0.0", "255.255.255.255", 0);
+ }
+
+ @Test
public void testRoutedIPv4AddressCount() {
final TreeSet<IpPrefix> set = new TreeSet<>(IpPrefix.lengthComparator());
// No routes routes to no addresses.
@@ -118,7 +218,7 @@
assertEquals(7l - 4 + 4 + 16 + 65536, NetworkUtils.routedIPv4AddressCount(set));
}
- @SmallTest
+ @Test
public void testRoutedIPv6AddressCount() {
final TreeSet<IpPrefix> set = new TreeSet<>(IpPrefix.lengthComparator());
// No routes routes to no addresses.
diff --git a/tests/net/java/com/android/server/ConnectivityServiceTest.java b/tests/net/java/com/android/server/ConnectivityServiceTest.java
index 142c88b..e3db7e8 100644
--- a/tests/net/java/com/android/server/ConnectivityServiceTest.java
+++ b/tests/net/java/com/android/server/ConnectivityServiceTest.java
@@ -880,7 +880,7 @@
NetworkAgentInfo networkAgentInfo, NetworkRequest defaultRequest,
IpConnectivityLog log) {
super(context, handler, networkAgentInfo, defaultRequest, log,
- NetworkMonitor.NetworkMonitorSettings.DEFAULT);
+ NetworkMonitor.Dependencies.DEFAULT);
connectivityHandler = handler;
}
diff --git a/tests/net/java/com/android/server/connectivity/NetworkMonitorTest.java b/tests/net/java/com/android/server/connectivity/NetworkMonitorTest.java
index 27a897d..b017130 100644
--- a/tests/net/java/com/android/server/connectivity/NetworkMonitorTest.java
+++ b/tests/net/java/com/android/server/connectivity/NetworkMonitorTest.java
@@ -16,22 +16,35 @@
package com.android.server.connectivity;
-import static org.junit.Assert.assertEquals;
+import static junit.framework.Assert.assertFalse;
+
+import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.any;
import static org.mockito.Mockito.anyInt;
+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 android.content.Context;
+import android.net.ConnectivityManager;
+import android.net.LinkProperties;
import android.net.Network;
+import android.net.NetworkCapabilities;
+import android.net.NetworkInfo;
import android.net.NetworkRequest;
+import android.net.captiveportal.CaptivePortalProbeResult;
import android.net.metrics.IpConnectivityLog;
import android.net.wifi.WifiManager;
import android.os.Handler;
+import android.provider.Settings;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
import android.telephony.TelephonyManager;
+import android.util.ArrayMap;
import org.junit.Before;
import org.junit.Test;
@@ -39,38 +52,273 @@
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.InetAddress;
+import java.net.URL;
+import java.util.Random;
+
+import javax.net.ssl.SSLHandshakeException;
+
@RunWith(AndroidJUnit4.class)
@SmallTest
public class NetworkMonitorTest {
+ private static final String LOCATION_HEADER = "location";
- static final int TEST_ID = 60; // should be less than min netid 100
+ private @Mock Context mContext;
+ private @Mock Handler mHandler;
+ private @Mock IpConnectivityLog mLogger;
+ private @Mock NetworkAgentInfo mAgent;
+ private @Mock NetworkInfo mNetworkInfo;
+ private @Mock NetworkRequest mRequest;
+ private @Mock TelephonyManager mTelephony;
+ private @Mock WifiManager mWifi;
+ private @Mock Network mNetwork;
+ private @Mock HttpURLConnection mHttpConnection;
+ private @Mock HttpURLConnection mHttpsConnection;
+ private @Mock HttpURLConnection mFallbackConnection;
+ private @Mock HttpURLConnection mOtherFallbackConnection;
+ private @Mock Random mRandom;
+ private @Mock NetworkMonitor.Dependencies mDependencies;
- @Mock Context mContext;
- @Mock Handler mHandler;
- @Mock IpConnectivityLog mLogger;
- @Mock NetworkAgentInfo mAgent;
- @Mock NetworkMonitor.NetworkMonitorSettings mSettings;
- @Mock NetworkRequest mRequest;
- @Mock TelephonyManager mTelephony;
- @Mock WifiManager mWifi;
+ private static final String TEST_HTTP_URL = "http://www.google.com/gen_204";
+ private static final String TEST_HTTPS_URL = "https://www.google.com/gen_204";
+ private static final String TEST_FALLBACK_URL = "http://fallback.google.com/gen_204";
+ private static final String TEST_OTHER_FALLBACK_URL = "http://otherfallback.google.com/gen_204";
@Before
- public void setUp() {
+ public void setUp() throws IOException {
MockitoAnnotations.initMocks(this);
+ mAgent.linkProperties = new LinkProperties();
+ mAgent.networkCapabilities = new NetworkCapabilities()
+ .addTransportType(NetworkCapabilities.TRANSPORT_CELLULAR);
+ mAgent.networkInfo = mNetworkInfo;
- when(mAgent.network()).thenReturn(new Network(TEST_ID));
+ when(mAgent.network()).thenReturn(mNetwork);
+ when(mDependencies.getNetwork(any())).thenReturn(mNetwork);
+ when(mDependencies.getRandom()).thenReturn(mRandom);
+ when(mDependencies.getSetting(any(), eq(Settings.Global.CAPTIVE_PORTAL_MODE), anyInt()))
+ .thenReturn(Settings.Global.CAPTIVE_PORTAL_MODE_PROMPT);
+ when(mDependencies.getSetting(any(), eq(Settings.Global.CAPTIVE_PORTAL_USE_HTTPS),
+ anyInt())).thenReturn(1);
+ when(mDependencies.getSetting(any(), eq(Settings.Global.CAPTIVE_PORTAL_HTTP_URL),
+ anyString())).thenReturn(TEST_HTTP_URL);
+ when(mDependencies.getSetting(any(), eq(Settings.Global.CAPTIVE_PORTAL_HTTPS_URL),
+ anyString())).thenReturn(TEST_HTTPS_URL);
+
when(mContext.getSystemService(Context.TELEPHONY_SERVICE)).thenReturn(mTelephony);
when(mContext.getSystemService(Context.WIFI_SERVICE)).thenReturn(mWifi);
+
+ when(mNetworkInfo.getType()).thenReturn(ConnectivityManager.TYPE_WIFI);
+ setFallbackUrl(TEST_FALLBACK_URL);
+ setOtherFallbackUrls(TEST_OTHER_FALLBACK_URL);
+ setFallbackSpecs(null); // Test with no fallback spec by default
+ when(mRandom.nextInt()).thenReturn(0);
+
+ when(mNetwork.openConnection(any())).then((invocation) -> {
+ URL url = invocation.getArgument(0);
+ switch(url.toString()) {
+ case TEST_HTTP_URL:
+ return mHttpConnection;
+ case TEST_HTTPS_URL:
+ return mHttpsConnection;
+ case TEST_FALLBACK_URL:
+ return mFallbackConnection;
+ case TEST_OTHER_FALLBACK_URL:
+ return mOtherFallbackConnection;
+ default:
+ fail("URL not mocked: " + url.toString());
+ return null;
+ }
+ });
+ when(mHttpConnection.getRequestProperties()).thenReturn(new ArrayMap<>());
+ when(mHttpsConnection.getRequestProperties()).thenReturn(new ArrayMap<>());
+ when(mNetwork.getAllByName(any())).thenReturn(new InetAddress[] {
+ InetAddress.parseNumericAddress("192.168.0.0")
+ });
}
NetworkMonitor makeMonitor() {
- return new NetworkMonitor(mContext, mHandler, mAgent, mRequest, mLogger, mSettings);
+ return new NetworkMonitor(
+ mContext, mHandler, mAgent, mRequest, mLogger, mDependencies);
}
@Test
- public void testCreatingNetworkMonitor() {
- NetworkMonitor monitor = makeMonitor();
+ public void testIsCaptivePortal_HttpProbeIsPortal() throws IOException {
+ setSslException(mHttpsConnection);
+ setPortal302(mHttpConnection);
+
+ assertPortal(makeMonitor().isCaptivePortal());
+ }
+
+ @Test
+ public void testIsCaptivePortal_HttpsProbeIsNotPortal() throws IOException {
+ setStatus(mHttpsConnection, 204);
+ setStatus(mHttpConnection, 500);
+
+ assertNotPortal(makeMonitor().isCaptivePortal());
+ }
+
+ @Test
+ public void testIsCaptivePortal_HttpsProbeFailedHttpSuccessNotUsed() throws IOException {
+ setSslException(mHttpsConnection);
+ // Even if HTTP returns a 204, do not use the result unless HTTPS succeeded
+ setStatus(mHttpConnection, 204);
+ setStatus(mFallbackConnection, 500);
+
+ assertFailed(makeMonitor().isCaptivePortal());
+ }
+
+ @Test
+ public void testIsCaptivePortal_FallbackProbeIsPortal() throws IOException {
+ setSslException(mHttpsConnection);
+ setStatus(mHttpConnection, 500);
+ setPortal302(mFallbackConnection);
+
+ assertPortal(makeMonitor().isCaptivePortal());
+ }
+
+ @Test
+ public void testIsCaptivePortal_FallbackProbeIsNotPortal() throws IOException {
+ setSslException(mHttpsConnection);
+ setStatus(mHttpConnection, 500);
+ setStatus(mFallbackConnection, 204);
+
+ // Fallback probe did not see portal, HTTPS failed -> inconclusive
+ assertFailed(makeMonitor().isCaptivePortal());
+ }
+
+ @Test
+ public void testIsCaptivePortal_OtherFallbackProbeIsPortal() throws IOException {
+ // Set all fallback probes but one to invalid URLs to verify they are being skipped
+ setFallbackUrl(TEST_FALLBACK_URL);
+ setOtherFallbackUrls(TEST_FALLBACK_URL + "," + TEST_OTHER_FALLBACK_URL);
+
+ setSslException(mHttpsConnection);
+ setStatus(mHttpConnection, 500);
+ setStatus(mFallbackConnection, 500);
+ setPortal302(mOtherFallbackConnection);
+
+ // TEST_OTHER_FALLBACK_URL is third
+ when(mRandom.nextInt()).thenReturn(2);
+
+ final NetworkMonitor monitor = makeMonitor();
+
+ // First check always uses the first fallback URL: inconclusive
+ assertFailed(monitor.isCaptivePortal());
+ verify(mFallbackConnection, times(1)).getResponseCode();
+ verify(mOtherFallbackConnection, never()).getResponseCode();
+
+ // Second check uses the URL chosen by Random
+ assertPortal(monitor.isCaptivePortal());
+ verify(mOtherFallbackConnection, times(1)).getResponseCode();
+ }
+
+ @Test
+ public void testIsCaptivePortal_AllProbesFailed() throws IOException {
+ setSslException(mHttpsConnection);
+ setStatus(mHttpConnection, 500);
+ setStatus(mFallbackConnection, 404);
+
+ assertFailed(makeMonitor().isCaptivePortal());
+ verify(mFallbackConnection, times(1)).getResponseCode();
+ verify(mOtherFallbackConnection, never()).getResponseCode();
+ }
+
+ @Test
+ public void testIsCaptivePortal_InvalidUrlSkipped() throws IOException {
+ setFallbackUrl("invalid");
+ setOtherFallbackUrls("otherinvalid," + TEST_OTHER_FALLBACK_URL + ",yetanotherinvalid");
+
+ setSslException(mHttpsConnection);
+ setStatus(mHttpConnection, 500);
+ setPortal302(mOtherFallbackConnection);
+
+ assertPortal(makeMonitor().isCaptivePortal());
+ verify(mOtherFallbackConnection, times(1)).getResponseCode();
+ verify(mFallbackConnection, never()).getResponseCode();
+ }
+
+ private void setupFallbackSpec() throws IOException {
+ setFallbackSpecs("http://example.com@@/@@204@@/@@"
+ + "@@,@@"
+ + TEST_OTHER_FALLBACK_URL + "@@/@@30[12]@@/@@https://(www\\.)?google.com/?.*");
+
+ setSslException(mHttpsConnection);
+ setStatus(mHttpConnection, 500);
+
+ // Use the 2nd fallback spec
+ when(mRandom.nextInt()).thenReturn(1);
+ }
+
+ @Test
+ public void testIsCaptivePortal_FallbackSpecIsNotPortal() throws IOException {
+ setupFallbackSpec();
+ set302(mOtherFallbackConnection, "https://www.google.com/test?q=3");
+
+ // HTTPS failed, fallback spec did not see a portal -> inconclusive
+ assertFailed(makeMonitor().isCaptivePortal());
+ verify(mOtherFallbackConnection, times(1)).getResponseCode();
+ verify(mFallbackConnection, never()).getResponseCode();
+ }
+
+ @Test
+ public void testIsCaptivePortal_FallbackSpecIsPortal() throws IOException {
+ setupFallbackSpec();
+ set302(mOtherFallbackConnection, "http://login.portal.example.com");
+
+ assertPortal(makeMonitor().isCaptivePortal());
+ }
+
+ private void setFallbackUrl(String url) {
+ when(mDependencies.getSetting(any(),
+ eq(Settings.Global.CAPTIVE_PORTAL_FALLBACK_URL), any())).thenReturn(url);
+ }
+
+ private void setOtherFallbackUrls(String urls) {
+ when(mDependencies.getSetting(any(),
+ eq(Settings.Global.CAPTIVE_PORTAL_OTHER_FALLBACK_URLS), any())).thenReturn(urls);
+ }
+
+ private void setFallbackSpecs(String specs) {
+ when(mDependencies.getSetting(any(),
+ eq(Settings.Global.CAPTIVE_PORTAL_FALLBACK_PROBE_SPECS), any())).thenReturn(specs);
+ }
+
+ private void assertPortal(CaptivePortalProbeResult result) {
+ assertTrue(result.isPortal());
+ assertFalse(result.isFailed());
+ assertFalse(result.isSuccessful());
+ }
+
+ private void assertNotPortal(CaptivePortalProbeResult result) {
+ assertFalse(result.isPortal());
+ assertFalse(result.isFailed());
+ assertTrue(result.isSuccessful());
+ }
+
+ private void assertFailed(CaptivePortalProbeResult result) {
+ assertFalse(result.isPortal());
+ assertTrue(result.isFailed());
+ assertFalse(result.isSuccessful());
+ }
+
+ private void setSslException(HttpURLConnection connection) throws IOException {
+ when(connection.getResponseCode()).thenThrow(new SSLHandshakeException("Invalid cert"));
+ }
+
+ private void set302(HttpURLConnection connection, String location) throws IOException {
+ setStatus(connection, 302);
+ when(connection.getHeaderField(LOCATION_HEADER)).thenReturn(location);
+ }
+
+ private void setPortal302(HttpURLConnection connection) throws IOException {
+ set302(connection, "http://login.example.com");
+ }
+
+ private void setStatus(HttpURLConnection connection, int status) throws IOException {
+ when(connection.getResponseCode()).thenReturn(status);
}
}
diff --git a/tests/permission/src/com/android/framework/permission/tests/VibratorServicePermissionTest.java b/tests/permission/src/com/android/framework/permission/tests/VibratorServicePermissionTest.java
index 2757296..388c7d0 100644
--- a/tests/permission/src/com/android/framework/permission/tests/VibratorServicePermissionTest.java
+++ b/tests/permission/src/com/android/framework/permission/tests/VibratorServicePermissionTest.java
@@ -52,7 +52,7 @@
final VibrationEffect effect =
VibrationEffect.createOneShot(100, VibrationEffect.DEFAULT_AMPLITUDE);
mVibratorService.vibrate(Process.myUid(), null, effect, AudioManager.STREAM_ALARM,
- new Binder());
+ "testVibrate", new Binder());
fail("vibrate did not throw SecurityException as expected");
} catch (SecurityException e) {
// expected
diff --git a/tools/aapt2/cmd/Link.h b/tools/aapt2/cmd/Link.h
index fb8796f..e58a93e 100644
--- a/tools/aapt2/cmd/Link.h
+++ b/tools/aapt2/cmd/Link.h
@@ -159,8 +159,10 @@
&options_.manifest_fixer_options.target_sdk_version_default);
AddOptionalFlag("--version-code",
"Version code (integer) to inject into the AndroidManifest.xml if none is\n"
- "present.",
- &options_.manifest_fixer_options.version_code_default);
+ "present.", &options_.manifest_fixer_options.version_code_default);
+ AddOptionalFlag("--version-code-major",
+ "Version code major (integer) to inject into the AndroidManifest.xml if none is\n"
+ "present.", &options_.manifest_fixer_options.version_code_major_default);
AddOptionalFlag("--version-name",
"Version name to inject into the AndroidManifest.xml if none is present.",
&options_.manifest_fixer_options.version_name_default);
diff --git a/tools/aapt2/link/ManifestFixer.cpp b/tools/aapt2/link/ManifestFixer.cpp
index ee4e702..55a32c8 100644
--- a/tools/aapt2/link/ManifestFixer.cpp
+++ b/tools/aapt2/link/ManifestFixer.cpp
@@ -282,6 +282,17 @@
}
}
+ if (options_.version_code_major_default) {
+ if (options_.replace_version) {
+ el->RemoveAttribute(xml::kSchemaAndroid, "versionCodeMajor");
+ }
+ if (el->FindAttribute(xml::kSchemaAndroid, "versionCodeMajor") == nullptr) {
+ el->attributes.push_back(
+ xml::Attribute{xml::kSchemaAndroid, "versionCodeMajor",
+ options_.version_code_major_default.value()});
+ }
+ }
+
if (el->FindAttribute("", "platformBuildVersionCode") == nullptr) {
auto versionCode = el->FindAttribute(xml::kSchemaAndroid, "versionCode");
if (versionCode != nullptr) {
diff --git a/tools/aapt2/link/ManifestFixer.h b/tools/aapt2/link/ManifestFixer.h
index 98d06fd..3ef57d0 100644
--- a/tools/aapt2/link/ManifestFixer.h
+++ b/tools/aapt2/link/ManifestFixer.h
@@ -52,6 +52,10 @@
// replace_version is set.
Maybe<std::string> version_code_default;
+ // The version code to set if 'android:versionCodeMajor' is not defined in <manifest> or if
+ // replace_version is set.
+ Maybe<std::string> version_code_major_default;
+
// The version of the framework being compiled against to set for 'android:compileSdkVersion' in
// the <manifest> tag.
Maybe<std::string> compile_sdk_version;
diff --git a/tools/aapt2/link/ManifestFixer_test.cpp b/tools/aapt2/link/ManifestFixer_test.cpp
index 5bc004d..adea627 100644
--- a/tools/aapt2/link/ManifestFixer_test.cpp
+++ b/tools/aapt2/link/ManifestFixer_test.cpp
@@ -329,6 +329,7 @@
ManifestFixerOptions options;
options.version_name_default = std::string("Beta");
options.version_code_default = std::string("0x10000000");
+ options.version_code_major_default = std::string("0x20000000");
std::unique_ptr<xml::XmlResource> doc = VerifyWithOptions(R"EOF(
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
@@ -347,136 +348,199 @@
attr = manifest_el->FindAttribute(xml::kSchemaAndroid, "versionCode");
ASSERT_THAT(attr, NotNull());
EXPECT_THAT(attr->value, StrEq("0x10000000"));
+
+ attr = manifest_el->FindAttribute(xml::kSchemaAndroid, "versionCodeMajor");
+ ASSERT_THAT(attr, NotNull());
+ EXPECT_THAT(attr->value, StrEq("0x20000000"));
}
TEST_F(ManifestFixerTest, DontUseDefaultVersionNameAndCode) {
-ManifestFixerOptions options;
-options.version_name_default = std::string("Beta");
-options.version_code_default = std::string("0x10000000");
+ ManifestFixerOptions options;
+ options.version_name_default = std::string("Beta");
+ options.version_code_default = std::string("0x10000000");
+ options.version_code_major_default = std::string("0x20000000");
-std::unique_ptr<xml::XmlResource> doc = VerifyWithOptions(R"EOF(
- <manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="android"
- android:versionCode="0x20000000"
- android:versionName="Alpha" />)EOF",
- options);
-ASSERT_THAT(doc, NotNull());
+ std::unique_ptr<xml::XmlResource> doc = VerifyWithOptions(R"EOF(
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android"
+ android:versionCode="0x00000001"
+ android:versionCodeMajor="0x00000002"
+ android:versionName="Alpha" />)EOF",
+ options);
+ ASSERT_THAT(doc, NotNull());
-xml::Element* manifest_el = doc->root.get();
-ASSERT_THAT(manifest_el, NotNull());
+ xml::Element* manifest_el = doc->root.get();
+ ASSERT_THAT(manifest_el, NotNull());
-xml::Attribute* attr =
- manifest_el->FindAttribute(xml::kSchemaAndroid, "versionName");
-ASSERT_THAT(attr, NotNull());
-EXPECT_THAT(attr->value, StrEq("Alpha"));
+ xml::Attribute* attr =
+ manifest_el->FindAttribute(xml::kSchemaAndroid, "versionName");
+ ASSERT_THAT(attr, NotNull());
+ EXPECT_THAT(attr->value, StrEq("Alpha"));
-attr = manifest_el->FindAttribute(xml::kSchemaAndroid, "versionCode");
-ASSERT_THAT(attr, NotNull());
-EXPECT_THAT(attr->value, StrEq("0x20000000"));
+ attr = manifest_el->FindAttribute(xml::kSchemaAndroid, "versionCode");
+ ASSERT_THAT(attr, NotNull());
+ EXPECT_THAT(attr->value, StrEq("0x00000001"));
+
+ attr = manifest_el->FindAttribute(xml::kSchemaAndroid, "versionCodeMajor");
+ ASSERT_THAT(attr, NotNull());
+ EXPECT_THAT(attr->value, StrEq("0x00000002"));
}
TEST_F(ManifestFixerTest, ReplaceVersionNameAndCode) {
-ManifestFixerOptions options;
-options.replace_version = true;
-options.version_name_default = std::string("Beta");
-options.version_code_default = std::string("0x10000000");
+ ManifestFixerOptions options;
+ options.replace_version = true;
+ options.version_name_default = std::string("Beta");
+ options.version_code_default = std::string("0x10000000");
+ options.version_code_major_default = std::string("0x20000000");
-std::unique_ptr<xml::XmlResource> doc = VerifyWithOptions(R"EOF(
- <manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="android"
- android:versionCode="0x20000000"
- android:versionName="Alpha" />)EOF",
- options);
-ASSERT_THAT(doc, NotNull());
+ std::unique_ptr<xml::XmlResource> doc = VerifyWithOptions(R"EOF(
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android"
+ android:versionCode="0x00000001"
+ android:versionCodeMajor="0x00000002"
+ android:versionName="Alpha" />)EOF",
+ options);
+ ASSERT_THAT(doc, NotNull());
-xml::Element* manifest_el = doc->root.get();
-ASSERT_THAT(manifest_el, NotNull());
+ xml::Element* manifest_el = doc->root.get();
+ ASSERT_THAT(manifest_el, NotNull());
-xml::Attribute* attr =
- manifest_el->FindAttribute(xml::kSchemaAndroid, "versionName");
-ASSERT_THAT(attr, NotNull());
-EXPECT_THAT(attr->value, StrEq("Beta"));
+ xml::Attribute* attr =
+ manifest_el->FindAttribute(xml::kSchemaAndroid, "versionName");
+ ASSERT_THAT(attr, NotNull());
+ EXPECT_THAT(attr->value, StrEq("Beta"));
-attr = manifest_el->FindAttribute(xml::kSchemaAndroid, "versionCode");
-ASSERT_THAT(attr, NotNull());
-EXPECT_THAT(attr->value, StrEq("0x10000000"));
+ attr = manifest_el->FindAttribute(xml::kSchemaAndroid, "versionCode");
+ ASSERT_THAT(attr, NotNull());
+ EXPECT_THAT(attr->value, StrEq("0x10000000"));
+
+ attr = manifest_el->FindAttribute(xml::kSchemaAndroid, "versionCodeMajor");
+ ASSERT_THAT(attr, NotNull());
+ EXPECT_THAT(attr->value, StrEq("0x20000000"));
}
TEST_F(ManifestFixerTest, ReplaceVersionName) {
-ManifestFixerOptions options;
-options.replace_version = true;
-options.version_name_default = std::string("Beta");
+ ManifestFixerOptions options;
+ options.replace_version = true;
+ options.version_name_default = std::string("Beta");
-std::unique_ptr<xml::XmlResource> doc = VerifyWithOptions(R"EOF(
- <manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="android"
- android:versionCode="0x20000000"
- android:versionName="Alpha" />)EOF",
- options);
-ASSERT_THAT(doc, NotNull());
-xml::Element* manifest_el = doc->root.get();
-ASSERT_THAT(manifest_el, NotNull());
+ std::unique_ptr<xml::XmlResource> doc = VerifyWithOptions(R"EOF(
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android"
+ android:versionCode="0x00000001"
+ android:versionCodeMajor="0x00000002"
+ android:versionName="Alpha" />)EOF",
+ options);
+ ASSERT_THAT(doc, NotNull());
-xml::Attribute* attr =
- manifest_el->FindAttribute(xml::kSchemaAndroid, "versionName");
-ASSERT_THAT(attr, NotNull());
-EXPECT_THAT(attr->value, StrEq("Beta"));
+ xml::Element* manifest_el = doc->root.get();
+ ASSERT_THAT(manifest_el, NotNull());
-attr = manifest_el->FindAttribute(xml::kSchemaAndroid, "versionCode");
-ASSERT_THAT(attr, NotNull());
-EXPECT_THAT(attr->value, StrEq("0x20000000"));
+ xml::Attribute* attr =
+ manifest_el->FindAttribute(xml::kSchemaAndroid, "versionName");
+ ASSERT_THAT(attr, NotNull());
+ EXPECT_THAT(attr->value, StrEq("Beta"));
+
+ attr = manifest_el->FindAttribute(xml::kSchemaAndroid, "versionCode");
+ ASSERT_THAT(attr, NotNull());
+ EXPECT_THAT(attr->value, StrEq("0x00000001"));
+
+ attr = manifest_el->FindAttribute(xml::kSchemaAndroid, "versionCodeMajor");
+ ASSERT_THAT(attr, NotNull());
+ EXPECT_THAT(attr->value, StrEq("0x00000002"));
}
TEST_F(ManifestFixerTest, ReplaceVersionCode) {
-ManifestFixerOptions options;
-options.replace_version = true;
-options.version_code_default = std::string("0x10000000");
+ ManifestFixerOptions options;
+ options.replace_version = true;
+ options.version_code_default = std::string("0x10000000");
-std::unique_ptr<xml::XmlResource> doc = VerifyWithOptions(R"EOF(
+ std::unique_ptr<xml::XmlResource> doc = VerifyWithOptions(R"EOF(
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android"
+ android:versionCode="0x00000001"
+ android:versionCodeMajor="0x00000002"
+ android:versionName="Alpha" />)EOF",
+ options);
+ ASSERT_THAT(doc, NotNull());
+
+ xml::Element* manifest_el = doc->root.get();
+ ASSERT_THAT(manifest_el, NotNull());
+
+ xml::Attribute* attr =
+ manifest_el->FindAttribute(xml::kSchemaAndroid, "versionName");
+ ASSERT_THAT(attr, NotNull());
+ EXPECT_THAT(attr->value, StrEq("Alpha"));
+
+ attr = manifest_el->FindAttribute(xml::kSchemaAndroid, "versionCode");
+ ASSERT_THAT(attr, NotNull());
+ EXPECT_THAT(attr->value, StrEq("0x10000000"));
+
+ attr = manifest_el->FindAttribute(xml::kSchemaAndroid, "versionCodeMajor");
+ ASSERT_THAT(attr, NotNull());
+ EXPECT_THAT(attr->value, StrEq("0x00000002"));
+}
+
+TEST_F(ManifestFixerTest, ReplaceVersionCodeMajor) {
+ ManifestFixerOptions options;
+ options.replace_version = true;
+ options.version_code_major_default = std::string("0x20000000");
+
+ std::unique_ptr<xml::XmlResource> doc = VerifyWithOptions(R"EOF(
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="android"
- android:versionCode="0x20000000"
- android:versionName="Alpha" />)EOF",
- options);
-ASSERT_THAT(doc, NotNull());
+ package="android"
+ android:versionCode="0x00000001"
+ android:versionCodeMajor="0x00000002"
+ android:versionName="Alpha" />)EOF",
+ options);
+ ASSERT_THAT(doc, NotNull());
-xml::Element* manifest_el = doc->root.get();
-ASSERT_THAT(manifest_el, NotNull());
+ xml::Element* manifest_el = doc->root.get();
+ ASSERT_THAT(manifest_el, NotNull());
-xml::Attribute* attr =
- manifest_el->FindAttribute(xml::kSchemaAndroid, "versionName");
-ASSERT_THAT(attr, NotNull());
-EXPECT_THAT(attr->value, StrEq("Alpha"));
+ xml::Attribute* attr =
+ manifest_el->FindAttribute(xml::kSchemaAndroid, "versionName");
+ ASSERT_THAT(attr, NotNull());
+ EXPECT_THAT(attr->value, StrEq("Alpha"));
-attr = manifest_el->FindAttribute(xml::kSchemaAndroid, "versionCode");
-ASSERT_THAT(attr, NotNull());
-EXPECT_THAT(attr->value, StrEq("0x10000000"));
+ attr = manifest_el->FindAttribute(xml::kSchemaAndroid, "versionCode");
+ ASSERT_THAT(attr, NotNull());
+ EXPECT_THAT(attr->value, StrEq("0x00000001"));
+
+ attr = manifest_el->FindAttribute(xml::kSchemaAndroid, "versionCodeMajor");
+ ASSERT_THAT(attr, NotNull());
+ EXPECT_THAT(attr->value, StrEq("0x20000000"));
}
TEST_F(ManifestFixerTest, DontReplaceVersionNameOrCode) {
-ManifestFixerOptions options;
-options.replace_version = true;
+ ManifestFixerOptions options;
+ options.replace_version = true;
-std::unique_ptr<xml::XmlResource> doc = VerifyWithOptions(R"EOF(
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="android"
- android:versionCode="0x20000000"
- android:versionName="Alpha" />)EOF",
- options);
-ASSERT_THAT(doc, NotNull());
+ std::unique_ptr<xml::XmlResource> doc = VerifyWithOptions(R"EOF(
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android"
+ android:versionCode="0x00000001"
+ android:versionCodeMajor="0x00000002"
+ android:versionName="Alpha" />)EOF",
+ options);
+ ASSERT_THAT(doc, NotNull());
-xml::Element* manifest_el = doc->root.get();
-ASSERT_THAT(manifest_el, NotNull());
+ xml::Element* manifest_el = doc->root.get();
+ ASSERT_THAT(manifest_el, NotNull());
-xml::Attribute* attr =
- manifest_el->FindAttribute(xml::kSchemaAndroid, "versionName");
-ASSERT_THAT(attr, NotNull());
-EXPECT_THAT(attr->value, StrEq("Alpha"));
+ xml::Attribute* attr =
+ manifest_el->FindAttribute(xml::kSchemaAndroid, "versionName");
+ ASSERT_THAT(attr, NotNull());
+ EXPECT_THAT(attr->value, StrEq("Alpha"));
-attr = manifest_el->FindAttribute(xml::kSchemaAndroid, "versionCode");
-ASSERT_THAT(attr, NotNull());
-EXPECT_THAT(attr->value, StrEq("0x20000000"));
+ attr = manifest_el->FindAttribute(xml::kSchemaAndroid, "versionCode");
+ ASSERT_THAT(attr, NotNull());
+ EXPECT_THAT(attr->value, StrEq("0x00000001"));
+
+ attr = manifest_el->FindAttribute(xml::kSchemaAndroid, "versionCodeMajor");
+ ASSERT_THAT(attr, NotNull());
+ EXPECT_THAT(attr->value, StrEq("0x00000002"));
}
TEST_F(ManifestFixerTest, EnsureManifestAttributesAreTyped) {
diff --git a/tools/aapt2/link/TableMerger.cpp b/tools/aapt2/link/TableMerger.cpp
index 91a55b3..afb8ae0 100644
--- a/tools/aapt2/link/TableMerger.cpp
+++ b/tools/aapt2/link/TableMerger.cpp
@@ -281,8 +281,17 @@
dst_config_value->value = std::move(new_file_ref);
} else {
+ Maybe<std::string> original_comment = (dst_config_value->value)
+ ? dst_config_value->value->GetComment() : Maybe<std::string>();
+
dst_config_value->value = std::unique_ptr<Value>(
src_config_value->value->Clone(&master_table_->string_pool));
+
+ // Keep the comment from the original resource and ignore all comments from overlaying
+ // resources
+ if (overlay && original_comment) {
+ dst_config_value->value->SetComment(original_comment.value());
+ }
}
}
}
diff --git a/tools/aapt2/link/TableMerger_test.cpp b/tools/aapt2/link/TableMerger_test.cpp
index cf504c4..79a734b 100644
--- a/tools/aapt2/link/TableMerger_test.cpp
+++ b/tools/aapt2/link/TableMerger_test.cpp
@@ -178,6 +178,49 @@
Pointee(Field(&BinaryPrimitive::value, Field(&android::Res_value::data, Eq(0u)))));
}
+TEST_F(TableMergerTest, DoNotOverrideResourceComment) {
+ std::unique_ptr<Value> foo_original = ResourceUtils::TryParseBool("true");
+ foo_original->SetComment(android::StringPiece("Original foo comment"));
+ std::unique_ptr<Value> bar_original = ResourceUtils::TryParseBool("true");
+
+ std::unique_ptr<Value> foo_overlay = ResourceUtils::TryParseBool("false");
+ foo_overlay->SetComment(android::StringPiece("Overlay foo comment"));
+ std::unique_ptr<Value> bar_overlay = ResourceUtils::TryParseBool("false");
+ bar_overlay->SetComment(android::StringPiece("Overlay bar comment"));
+ std::unique_ptr<Value> baz_overlay = ResourceUtils::TryParseBool("false");
+ baz_overlay->SetComment(android::StringPiece("Overlay baz comment"));
+
+ std::unique_ptr<ResourceTable> base =
+ test::ResourceTableBuilder()
+ .SetPackageId("", 0x00)
+ .AddValue("bool/foo", std::move(foo_original))
+ .AddValue("bool/bar", std::move(bar_original))
+ .Build();
+
+ std::unique_ptr<ResourceTable> overlay =
+ test::ResourceTableBuilder()
+ .SetPackageId("", 0x00)
+ .AddValue("bool/foo", std::move(foo_overlay))
+ .AddValue("bool/bar", std::move(bar_overlay))
+ .AddValue("bool/baz", std::move(baz_overlay))
+ .Build();
+
+ ResourceTable final_table;
+ TableMergerOptions options;
+ options.auto_add_overlay = true;
+ TableMerger merger(context_.get(), &final_table, options);
+
+ ASSERT_TRUE(merger.Merge({}, base.get(), false /*overlay*/));
+ ASSERT_TRUE(merger.Merge({}, overlay.get(), true /*overlay*/));
+
+ BinaryPrimitive* foo = test::GetValue<BinaryPrimitive>(&final_table, "com.app.a:bool/foo");
+ EXPECT_THAT(foo, Pointee(Property(&BinaryPrimitive::GetComment, StrEq("Original foo comment"))));
+ BinaryPrimitive* bar = test::GetValue<BinaryPrimitive>(&final_table, "com.app.a:bool/bar");
+ EXPECT_THAT(bar, Pointee(Property(&BinaryPrimitive::GetComment, StrEq(""))));
+ BinaryPrimitive* baz = test::GetValue<BinaryPrimitive>(&final_table, "com.app.a:bool/baz");
+ EXPECT_THAT(baz, Pointee(Property(&BinaryPrimitive::GetComment, StrEq("Overlay baz comment"))));
+}
+
TEST_F(TableMergerTest, OverrideSameResourceIdsWithOverlay) {
std::unique_ptr<ResourceTable> base =
test::ResourceTableBuilder()
diff --git a/tools/genprotos.sh b/tools/genprotos.sh
new file mode 100755
index 0000000..f901c9f
--- /dev/null
+++ b/tools/genprotos.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+# TODO This should not be needed. If you set a custom OUT_DIR or OUT_DIR_COMMON_BASE you can
+# end up with a command that is extremely long, potentially going passed MAX_ARG_STRLEN due to
+# the way sbox rewrites the command. See b/70221552.
+
+set -e
+
+location_aprotoc=$1
+location_protoc=$2
+location_soong_zip=$3
+genDir=$4
+depfile=$5
+in=$6
+out=$7
+
+mkdir -p ${genDir}/${in} && \
+ ${location_aprotoc} --plugin=${location_protoc} \
+ --dependency_out=${depfile} \
+ --javastream_out=${genDir}/${in} \
+ -Iexternal/protobuf/src \
+ -I . \
+ ${in} && \
+ ${location_soong_zip} -jar -o ${out} -C ${genDir}/${in} -D ${genDir}/${in}